mirror of
https://github.com/jambonz/freeswitch-modules.git
synced 2025-12-18 22:27:43 +00:00
fixed google asr max duration exceeded or no audio raised jambonz_transcribe::error (#120)
Co-authored-by: root <root@af6633a5cfe8>
This commit is contained in:
@@ -233,6 +233,10 @@ static void *SWITCH_THREAD_FUNC grpc_read_thread(switch_thread_t *thread, void *
|
||||
auto speech_event_type = response.speech_event_type();
|
||||
if (response.has_error()) {
|
||||
Status status = response.error();
|
||||
//error 11 is handled in finished session, avoid sending jambonz_transcribe::error event for this here.
|
||||
if (11 == status.code()) {
|
||||
continue;
|
||||
}
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "grpc_read_thread: error %s (%d)\n", status.message().c_str(), status.code()) ;
|
||||
cJSON* json = cJSON_CreateObject();
|
||||
cJSON_AddStringToObject(json, "type", "error");
|
||||
|
||||
Reference in New Issue
Block a user