Expose stream cancellation in speech streaming generator
See original GitHub issueOriginally from python-docs-samples#963, filed by @datspike
How do you stop recognition correctly in the new client?
With the GRPC client, you can do
recognize_stream = service.StreamingRecognize(
requests, self.DEADLINE_SECS)
...
recognize_stream.cancel()
But this client lib only exposes the streaming_recognize
call as a generator of alternatives. It would be useful to be able to cancel the stream from another thread, eg in case you need to close the stream before a response is returned.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:6 (5 by maintainers)
Top Results From Across the Web
Transcribe audio from streaming input | Cloud Speech-to-Text ...
This section demonstrates how to transcribe streaming audio, like the input from a microphone, to text. Streaming speech recognition allows you to stream...
Read more >gRPC and C# 8 Async stream cancellation - Laurent Kempé
I need to extend a bit the original code of the GreeterService to take care of the client request to stop the streaming....
Read more >Speech service release notes - Azure - Microsoft Learn
A running log of Speech Service feature releases, improvements, bug fixes, and known issues.
Read more >Web Audio API - W3C
suspend and close allow authors to release system resources , including threads, processes and audio streams. Suspending a BaseAudioContext ...
Read more >12 Social Media Platforms that Honor Freedom of Speech and ...
Rumble is a free-speech video streaming platform alternative to YouTube. It supports live-streams, channels and subscriptions as well as ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@Tadly Can you please open a new issue? This one is a) long-closed, and b) only tangentially related to the problem you are experiencing.
Pardon my intrusion but I’m kind of stuck on this.
As far as I can tell,
streaming_recognize
straight up blocks if the backend can’t resolve a anything from the given stream (e.g. mic is muted, no one is speaking etc.).As I’m trying to get this implemented in an
asyncio
environment this is kind of bad. Even if I’d add threading (which I’d like to prevent) I’d still have the issue of it blocking -> no_Rendezvous
instance.Am I missing something obvious here?