mirror of
https://github.com/jambonz/freeswitch-modules.git
synced 2026-01-25 02:08:27 +00:00
Compare commits
2 Commits
1.0.8-debug-2
...
1.0.9
| Author | SHA1 | Date | |
|---|---|---|---|
| 06ab877f68 | |||
| 92dd3fc854 |
@@ -326,8 +326,8 @@ static void *SWITCH_THREAD_FUNC aws_transcribe_thread(switch_thread_t *thread, v
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "transcribe_thread: Error allocating streamer\n");
|
||||
return nullptr;
|
||||
}
|
||||
if (!cb->vad) pStreamer->connect();
|
||||
cb->streamer = pStreamer;
|
||||
if (!cb->vad) pStreamer->connect();
|
||||
pStreamer->processData(); //blocks until done
|
||||
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "transcribe_thread: stopping cb %p\n", (void *) cb);
|
||||
|
||||
@@ -135,6 +135,13 @@ public:
|
||||
properties.SetProperty(PropertyId::Speech_SegmentationSilenceTimeoutMs, segmentationInterval);
|
||||
}
|
||||
|
||||
//https://learn.microsoft.com/en-us/azure/ai-services/speech-service/language-identification?tabs=once&pivots=programming-language-cpp#at-start-and-continuous-language-identification
|
||||
const char* languageIdMode = switch_channel_get_variable(channel, "AZURE_LANGUAGE_ID_MODE");
|
||||
if (languageIdMode) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(psession), SWITCH_LOG_DEBUG, "setting SpeechServiceConnection_LanguageIdMode to %s \n", languageIdMode);
|
||||
properties.SetProperty(PropertyId::SpeechServiceConnection_LanguageIdMode, languageIdMode);
|
||||
}
|
||||
|
||||
// recognition mode - readonly according to Azure docs:
|
||||
// https://docs.microsoft.com/en-us/javascript/api/microsoft-cognitiveservices-speech-sdk/propertyid?view=azure-node-latest
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user