Cloud Speech-to-Text API C++, Regarding initial silence timeout and end silence timeout #10302
Answered
by
coryan
gauravG2021
asked this question in
Q&A
-
Hi,
Thanks |
Beta Was this translation helpful? Give feedback.
Answered by
coryan
Nov 25, 2022
Replies: 1 comment 2 replies
-
I think these features are only available with Speech V2. They are both documented here: Assuming you are using That is, something like: google::cloud::speech::v2::StreamingRecognize request;
auto& features = *request.mutable_streaming_config()->mutable_streaming_features();
features.set_enable_voice_activity_events(true);
auto& va = features.mutable_voice_activity_timeout();
va.mutable_speech_start_timeout().set_seconds(5);
va.mutable_speech_end_timeout().set_seconds(10); Note that only the first You can specify sub-second timeouts too (see Duration). In general, the service documentation is the best way to find this type of information. Either in the service guides or the |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
coryan
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think these features are only available with Speech V2. They are both documented here:
https://cloud.google.com/speech-to-text/v2/docs/reference/rpc/google.cloud.speech.v2#voiceactivitytimeout
Assuming you are using
AsyncStreamingRecognize()
you need to fill the right fields in theStreamingRecognizeRequest
message:https://cloud.google.com/speech-to-text/v2/docs/reference/rpc/google.cloud.speech.v2#streamingrecognizerequest
That is, something like: