Compare commits

...

2 Commits

Author SHA1 Message Date
Dave Horton b9bb746191 wip 2024-06-06 14:33:38 -04:00
Dave Horton e0ea13d83b enable audio logging if env AZURE_AUDIO_LOGGING is set 2024-06-06 14:07:07 -04:00
+8
View File
@@ -15,6 +15,8 @@ typedef boost::circular_buffer<uint16_t> CircularBuffer_t;
using namespace Microsoft::CognitiveServices::Speech;
static const char* audioLogFile= 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,12 @@ extern "C" {
speechConfig->SetEndpointId(a->endpointId);
}
if (audioLogFile) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "azure_speech_feed_tts enabling audio logging to %s\n", audioLogFile);
speechConfig->SetProperty(PropertyId::Speech_LogFilename, audioLogFile);
speechConfig->EnableAudioLogging();
}
try {
auto speechSynthesizer = SpeechSynthesizer::FromConfig(speechConfig);