mirror of
https://github.com/jambonz/freeswitch-modules.git
synced 2026-01-25 02:08:27 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d6e246d84c | |||
| de676ddc81 | |||
| d41bd15816 |
@@ -141,6 +141,11 @@ int AudioPipe::lws_callback(struct lws *wsi,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ap->m_state == LWS_CLIENT_DISCONNECTING) {
|
||||||
|
lwsl_notice("AudioPipe::lws_service_thread race condition: got incoming message while closing the connection.\n");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (lws_frame_is_binary(wsi)) {
|
if (lws_frame_is_binary(wsi)) {
|
||||||
if (ap->is_bidirectional_audio_stream()) {
|
if (ap->is_bidirectional_audio_stream()) {
|
||||||
ap->m_callback(ap->m_uuid.c_str(), ap->m_bugname.c_str(), AudioPipe::BINARY, NULL, (char *) in, len);
|
ap->m_callback(ap->m_uuid.c_str(), ap->m_bugname.c_str(), AudioPipe::BINARY, NULL, (char *) in, len);
|
||||||
|
|||||||
@@ -382,22 +382,18 @@ private:
|
|||||||
|
|
||||||
const char* endpoint = switch_channel_get_variable(channel, "AZURE_SERVICE_ENDPOINT");
|
const char* endpoint = switch_channel_get_variable(channel, "AZURE_SERVICE_ENDPOINT");
|
||||||
const char* endpointId = switch_channel_get_variable(channel, "AZURE_SERVICE_ENDPOINT_ID");
|
const char* endpointId = switch_channel_get_variable(channel, "AZURE_SERVICE_ENDPOINT_ID");
|
||||||
configuration_stream <<
|
configuration_stream << (endpoint ? endpoint : "") << ";"
|
||||||
endpoint << ";" <<
|
<< (endpointId ? endpointId : "") << ";";
|
||||||
endpointId << ";";
|
|
||||||
if (switch_true(switch_channel_get_variable(channel, "AZURE_USE_OUTPUT_FORMAT_DETAILED"))) {
|
if (switch_true(switch_channel_get_variable(channel, "AZURE_USE_OUTPUT_FORMAT_DETAILED"))) {
|
||||||
configuration_stream << "output_format_detailed;";
|
configuration_stream << "output_format_detailed;";
|
||||||
}
|
}
|
||||||
if (switch_true(switch_channel_get_variable(channel, "AZURE_AUDIO_LOGGING"))) {
|
if (switch_true(switch_channel_get_variable(channel, "AZURE_AUDIO_LOGGING"))) {
|
||||||
configuration_stream << "audio_logging;";
|
configuration_stream << "audio_logging;";
|
||||||
}
|
}
|
||||||
if (nullptr != proxyIP && nullptr != proxyPort) {
|
configuration_stream << (proxyIP ? proxyIP : "") << ";"
|
||||||
configuration_stream <<
|
<< (proxyPort ? proxyPort : "") << ";"
|
||||||
proxyIP << ";" <<
|
<< (proxyUsername ? proxyUsername : "") << ";"
|
||||||
proxyPort << ";" <<
|
<< (proxyPassword ? proxyPassword : "") << ";";
|
||||||
proxyUsername << ";" <<
|
|
||||||
proxyPassword << ";";
|
|
||||||
}
|
|
||||||
const char* var;
|
const char* var;
|
||||||
if (var = switch_channel_get_variable(channel, "AZURE_SPEECH_ALTERNATIVE_LANGUAGE_CODES")) {
|
if (var = switch_channel_get_variable(channel, "AZURE_SPEECH_ALTERNATIVE_LANGUAGE_CODES")) {
|
||||||
configuration_stream << var << ";";
|
configuration_stream << var << ";";
|
||||||
|
|||||||
Reference in New Issue
Block a user