提供: Bright Pattern Documentation
• English
getVoiceTranscript
音声通話インタラクションの音声トランスクリプトを取得し、そのコールから抽出した音声トランスクリプトチャンクのリストを返します。Communicator ウィジェット 2.0でのみ利用可能です。
リクエスト
構文
| getVoiceTranscript(interactionId?: string): Promise<OperationResult<VoiceTranscript>> |
注:
| type VoiceTranscript = {
chunks: VoiceTranscriptChunk[] } type VoiceTranscriptChunk = { id: string startTime: number endTime: number text: string senderName: string confidence?: number } |
パラメータ
| パラメータ | パラメータ値 | データ型 | オプション/必須 | 説明 |
| interactionId | 文字列 | オプション | トランスクリプトを取得する音声インタラクションです。interactionId を省略した場合は、現在アクティブなインタラクションが使用されます。 |
リクエスト例
getVoiceTranscriptButton.onclick = async () => {
const interactionId = interactionsList[0]?.interactionId;
const result = await adApi.getVoiceTranscript(interactionId);
if (result.status === "成功") {
console.log(result.data.chunks);
}
};
戻り値
| オブジェクト | オブジェクトの値 | データ型 | オプションですか?(はい/いいえ) | 値の説明 |
| VoiceTranscript | ||||
| チャンク | VoiceTranscriptChunk[] | N | トランスクリプトチャンクの配列 | |
| id | 文字列 | N | 一意のチャンクid | |
| 開始時刻 | 数値 | N | チャンクの開始時刻(ミリ秒単位) | |
| endTime | 数値 | N | チャンクの終了時刻(ミリ秒単位) | |
| テキスト | 文字列 | N | 転写されたテキスト | |
| senderName | 文字列 | N | スピーカーの名前 | |
| 信頼度 | 数値 | Y | トランスクリプトの信頼度スコア(0~1) |