Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request includes several changes to enhance the functionality and flexibility of the audio processing system, specifically by adding support for saving audio data as Ogg files and handling additional header information.
Enhancements to audio processing:
amazon_transcribe_handler.go
,packet_dump_handler.go
,speech_to_text_handler.go
,test_handler.go
,service_handler.go
: Modified theHandle
method signatures to include asoraHeader
parameter for handling additional header information. [1] [2] [3] [4] [5]handler.go
: Added a newsoraHeader
struct to encapsulate header information, and updated relevant methods to utilize this struct. [1] [2] [3]Ogg file output support:
config.go
,config_example.ini
: Added new configuration optionsEnableOggFileOutput
andOggDir
to control the output of Ogg files and specify the directory for saving them. [1] [2] [3]handler.go
: Updated theopus2ogg
function to support writing Ogg files to disk when enabled, and handle potential errors such as missing directories or permission issues. [1] [2]Testing:
handler_test.go
: Added new tests to verify the functionality of Ogg file writing, including scenarios for successful writes, disabled output, permission errors, and non-existent directories.