类:VertexSpeechClient
java.lang.Object
com.google.adk.flows.llmflows.audio.VertexSpeechClient
- All Implemented Interfaces:
SpeechClientInterface, AutoCloseable
使用 Vertex AI SpeechClient 实现 SpeechClientInterface。
-
构造函数概述
ConstructorsConstructorDescription用于创建一个 `VertexSpeechClient` 对象,并初始化其底层的 Google Cloud SpeechClient。 -
方法概述
-
构造函数详细信息
-
VertexSpeechClient
用于创建一个 `VertexSpeechClient` 对象,并初始化其底层的 Google Cloud SpeechClient。- Throws:
IOException- if SpeechClient creation fails.
-
-
方法详细信息(Method Details)
-
recognize
public com.google.cloud.speech.v1.RecognizeResponse recognize(com.google.cloud.speech.v1.RecognitionConfig config, com.google.cloud.speech.v1.RecognitionAudio audio) 对给定的音频输入执行同步语音识别。- Specified by:
recognizein interfaceSpeechClientInterface- Parameters:
config- Recognition configuration (e.g., language, encoding).audio- Audio data to recognize.- Returns:
- The recognition result.
-
close
描述内容复制自接口文档:SpeechClientInterface关闭客户端并释放所有资源。- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceSpeechClientInterface- Throws:
Exception- if an error occurs during closing.
-