Enable speech-to-text transcription
Enable speech-to-text transcription.
阅读时间1 分钟最后更新于 12 天前
To enable speech-to-text transcription in a channel, issue a
vx_req_session_transcription_controlsession_handleaccess_tokentrxn
The Vivox SDK responds to the
vx_req_session_transcription_controlvx_resp_session_transcription_control. . .vx_req_session_transcription_control_t *req;vx_req_session_transcription_control_create(&req);req->session_handle = vx_strdup("mychannel");req->enable = 1;req->access_token = vx_strdup (access_token.c_str());vx_issue_request2(&req->base);. . .void HandleResponse(vx_resp_session_transcription_control *resp){ if (resp->base.return_code != 0) { printf("Failed to set transcription status (status: %s) \n", vx_get_error_string(resp->base.status_code)); } else { printf("Transcription status successfully updated\n"); }}. . .