mirror of
https://github.com/jambonz/freeswitch-modules.git
synced 2026-01-25 02:08:27 +00:00
enable audio logging if env AZURE_AUDIO_LOGGING is set
This commit is contained in:
@@ -15,6 +15,8 @@ typedef boost::circular_buffer<uint16_t> CircularBuffer_t;
|
||||
|
||||
using namespace Microsoft::CognitiveServices::Speech;
|
||||
|
||||
static const char* audioLogging = std::getenv("AZURE_AUDIO_LOGGING");
|
||||
|
||||
static std::string fullDirPath;
|
||||
|
||||
static void start_synthesis(std::shared_ptr<SpeechSynthesizer> speechSynthesizer, const char* text, azure_t* a) {
|
||||
@@ -168,6 +170,11 @@ extern "C" {
|
||||
speechConfig->SetEndpointId(a->endpointId);
|
||||
}
|
||||
|
||||
if (audioLogging) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "azure_speech_feed_tts enabling audio logging\n");
|
||||
speechConfig->EnableAudioLogging();
|
||||
}
|
||||
|
||||
try {
|
||||
auto speechSynthesizer = SpeechSynthesizer::FromConfig(speechConfig);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user