VoiceAgentLiveClient class
連接使用 GPT Live 的 Foundry 語音代理程式。
建構函式
| Voice |
建立一個 GPT Live 客戶端。 |
方法
| connect(string, Voice |
連接語音代理並等待服務開始 GPT Live 工作階段。 |
建構函式詳細資料
VoiceAgentLiveClient(string, TokenCredential, VoiceAgentLiveClientOptions)
建立一個 GPT Live 客戶端。
new VoiceAgentLiveClient(endpoint: string, credential: TokenCredential, options?: VoiceAgentLiveClientOptions)
參數
- endpoint
-
string
Foundry 的專案端點。
- credential
- TokenCredential
Microsoft Entra 驗證的憑證。
- options
- VoiceAgentLiveClientOptions
預設連線設定。
方法詳細資料
connect(string, VoiceAgentLiveClientConnectOptions)
連接語音代理並等待服務開始 GPT Live 工作階段。
function connect(agentName: string, options?: VoiceAgentLiveClientConnectOptions): Promise<VoiceAgentLiveConnection>
參數
- agentName
-
string
現有的 GPT Live 語音代理名稱。
此連線的設定。
傳回
Promise<VoiceAgentLiveConnection>
已連接的工作階段,準備傳送音訊並接收事件。