Comments (16)
ok, thanks that was helpful. It looks like google simply limits the length of a long-running recognize operation. Perhaps I just need to respond to this error under the covers by starting another one, or else send an event to the application so that it can restart it. Let me think about that.
By the way, note the GOOGLE_SPEECH_SINGLE_UTTERANCE
channel variable option -- not sure of your use case, but if you are doing a command and response type of use case, you may want to use this. If you are just wanting to transcribe a complete phone call or something, then the current way you are doing it is better.
from drachtio-freeswitch-modules.
could you turn freeswitch log levels to debug and recreate, then send me the (entire) log? Feel free to either send me a link to a private gist or email it to me directly
from drachtio-freeswitch-modules.
This also happend to me. Only these three lines are relevant in the log:
2019-08-12 15:47:59.633164 [ERR] google_glue.cpp:165 grpc_read_thread: error Exceeded maximum allowed stream duration of 305 seconds. (11)
2019-08-12 15:47:59.633164 [DEBUG] google_glue.cpp:221 grpc_read_thread: got 0 responses
2019-08-12 15:47:59.633164 [DEBUG] google_glue.cpp:231 grpc_read_thread: finish() status Exceeded maximum allowed stream duration of 305 seconds. (11)
from drachtio-freeswitch-modules.
OK, just wondering about the scenario where this happens. Was there literally 5 minutes with no spoken audio? Or was it five minutes with some sort of speech input, but it just wasn't recognized as an intent?
from drachtio-freeswitch-modules.
There was continuous speech on the call, and detection returned several transcripts correctly.
However only on one channel of the two, the other one was completely silent. Maybe I should set GOOGLE_SPEECH_SEPARATE_RECOGNITION_PER_CHANNEL
on this call?
from drachtio-freeswitch-modules.
OK, just to confirm: you are using mod_google_transcribe, correct?
from drachtio-freeswitch-modules.
actually, how are the two channels arranged? Are they bridged together, and you want to transcribe each? are you calling uuid_google_transcribe
on each separately?
Looking at the code, it doesn't look like I implemented support for sending two channels at once to google (and transcribing each separately) so perhaps I should implement that.
But I would like to understand how you are trying to transcribe the two channels in your app.
from drachtio-freeswitch-modules.
Two channels are bridged, yes. One has no mic, so no sound.
uuid_google_transcribe
is started only on the channel uuid which has incoming speech.
from drachtio-freeswitch-modules.
ok, then I am confused. The channel that has speech -- the one you are transcribing -- was returning transcripts correctly? Or it was for a bit, and then eventually it went 305 seconds without returning a transcript?
Assuming the latter, I think all I could (should) do is to return a timeout event to your application. Do you agree?
from drachtio-freeswitch-modules.
The channel that has speech -- the one you are transcribing -- was returning transcripts correctly? Or it was for a bit, and then eventually it went 305 seconds without returning a transcript?
It did returned transcripts correctly, but after 305 seconds, it stopped.
A bridged call has 2 channels (uuid-s), each channel (uuid) has 2 audio streams (sent and received). As I mentioned earlier, the uuid_google_transcribe
was only started on one channel, but that still means 2 audio streams. One of these contained speech, but the other one was mute. Could this be the issue?
from drachtio-freeswitch-modules.
no, if you called uuid_google_transcribe
on a single channel, then it would be sending only the received audio on that channel to google speech.
Are you saying it returned several transcripts correctly, THEN there was a pause of 305 seconds, followed by that error? Or are you saying that 305 seconds from calling uuid_google_transcribe
that error was returned, even though several transcripts were returned during that 305 seconds?
from drachtio-freeswitch-modules.
no, if you called uuid_google_transcribe on a single channel, then it would be sending only the received audio on that channel to google speech.
Ok ,thanks, good to know.
Are you saying it returned several transcripts correctly, THEN there was a pause of 305 seconds, followed by that error? Or are you saying that 305 seconds from calling uuid_google_transcribe that error was returned, even though several transcripts were returned during that 305 seconds?
There was no pause. I was talking, it returned the transcriptions almost continuously. It stopped 305 seconds from uuid_google_transcribe start
.
from drachtio-freeswitch-modules.
and you got a final transcription during that time ?
I'd really like to see the entire freeswitch log (debug level) from the time of the call to uuid_google_transcribe start
to the error
from drachtio-freeswitch-modules.
Here you go. Timestamp difference is exactly 305s.
call.log
from drachtio-freeswitch-modules.
Actually it is Google limitation (GSR), they recommend to refresh the grpc channel every 5 mins. i.e destroy and recreate every 5 mins.
from drachtio-freeswitch-modules.
OK, I (finally) have a partial fix for this -- I've addressed the issue with using google speech to text where transcriptions end after 305 seconds.
There is some work on the application side to handle this -- see the updated google_transcribe example to see a working example.
FIrst, of all, I have added a new freeswitch event (google_transcribe::max_duration_exceeded
) that the application will receive when google terminates a transcription due to the 305 second limit.
The application is responsible for handling that event and restarting the transcription, as shown here.
This requires a build of mod_google_transcribe with the commit referenced above.
The similar dialogflow issue is still outstanding (probably needs a similar fix), but @prady77 if possible please test and let me know if this resolves your issue.
from drachtio-freeswitch-modules.
Related Issues (20)
- Facing issue with Azure Transcribe module HOT 2
- mod_aws_transcribe locks when calls is destroyed before transcription is stopped HOT 3
- How to play the audio to caller? HOT 1
- How to activate mod_dialogflow in fusionpbx HOT 2
- lws_glue.cpp:185 connection failed: read failed HOT 1
- Smart Formatting on Deepgram HOT 1
- add support for Azure speech segmentation
- add support for google voice activity timeout
- mod_google_transcribe: Feature Request: Support for `google::cloud::speech::v2` HOT 2
- mod_google_transcribe: Feature Request: Make the sample rate in `RecognitionConfig` configurable
- mod_google_transcribe: Bug: Calling transcribe2_function in mod_google_transcribe.c sometimes crashes HOT 2
- mod_google_transcribe: Feature Request: Allow google speech to text endpoint to be configurable
- deepgram websocket connection closed after few seconds of transcription HOT 4
- mod_audio_fork: Do we need to disconnect audio fork connection?
- Executed the last dialplan instruction after use dialogflow_start
- freeswitch restart issue HOT 3
- **/usr/local/freeswitch/mod/mod_audio_fork.so: undefined symbol: fork_session_send_text**
- mod_audio_fork: memory leak in mod audio fork
- Ability to audio_fork callee channel mono to a wss-url
- Deepgram module latency issue
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from drachtio-freeswitch-modules.