Interface SpeechClientInterface
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
VertexSpeechClient
Interface for a speech-to-text client. Allows for different implementations (e.g., Cloud, Mocks).
-
Method Summary
-
Method Details
-
recognize
com.google.cloud.speech.v1.RecognizeResponse recognize(com.google.cloud.speech.v1.RecognitionConfig config, com.google.cloud.speech.v1.RecognitionAudio audio) throws Exception Performs synchronous speech recognition.- Parameters:
config
- The recognition configuration.audio
- The audio data to transcribe.- Returns:
- The recognition response.
- Throws:
Exception
- if an error occurs during recognition.
-
close
Closes the client and releases any resources.- Specified by:
close
in interfaceAutoCloseable
- Throws:
Exception
- if an error occurs during closing.
-