Call Media - Recognize
通話からメディアを認識します。
POST {endpoint}/calling/callConnections/{callConnectionId}:recognize?api-version=2024-09-15
URI パラメーター
名前 | / | 必須 | 型 | 説明 |
---|---|---|---|---|
call
|
path | True |
string |
呼び出し接続 ID |
endpoint
|
path | True |
string url |
Azure Communication リソースのエンドポイント。 |
api-version
|
query | True |
string |
呼び出す API のバージョン。 |
要求ヘッダー
名前 | 必須 | 型 | 説明 |
---|---|---|---|
Authorization | True |
string |
Azure Communication Services ユーザー アクセス トークン。 |
要求本文
名前 | 必須 | 型 | 説明 |
---|---|---|---|
recognizeInputType | True |
認識の種類を決定します。 |
|
recognizeOptions | True |
認識のオプションを定義します。 |
|
interruptCallMediaOperation |
boolean |
set recognize が他の既存のキューに登録されている要求または現在処理中の要求に割り込むことができます。 |
|
operationCallbackUri |
string |
この操作の CreateCall/AnswerCall によって設定された既定のコールバック URI をオーバーライドするコールバック URI を設定します。 このセットアップはアクションごとに行われます。 これが設定されていない場合は、CreateCall/AnswerCall によって設定された既定のコールバック URI が使用されます。 |
|
operationContext |
string |
操作のコンテキストを識別する値。 |
|
playPrompt |
認識のために再生するオーディオのソース。 |
||
playPrompts |
認識のために再生するオーディオのソース。 |
応答
名前 | 型 | 説明 |
---|---|---|
202 Accepted |
サービスは認識要求を受け入れ、処理を開始します。 指定したコールバック URI で RecognizeCompleted イベントまたは RecognizeFailed イベントを受け取り、要求の状態を更新します。 |
|
Other Status Codes |
Communication |
エラー |
セキュリティ
Authorization
Azure Communication Services ユーザー アクセス トークン。
型:
apiKey
/:
header
例
CallMedia_Recognize
要求のサンプル
POST https://contoso.communications.azure.com/calling/callConnections/18dea47f-b081-4107-9a5c-4300819d2c6c:recognize?api-version=2024-09-15
{
"recognizeInputType": "dtmf",
"playPrompt": {
"kind": "file",
"file": {
"uri": "https://some.file.azure.com/sample.wav"
}
},
"recognizeOptions": {
"interruptPrompt": true,
"initialSilenceTimeoutInSeconds": 5,
"targetParticipant": {
"kind": "communicationUser",
"communicationUser": {
"id": "8:acs:b9614373-fd0b-480c-8fd2-cb58b70eab9f_da7be3a9-8788-42a6-85c6-56b2cf784fce"
}
},
"dtmfOptions": {
"interToneTimeoutInSeconds": 3,
"maxTonesToCollect": 5,
"stopTones": [
"pound"
]
}
},
"operationCallbackUri": "https://app.contoso.com/callback"
}
応答のサンプル
定義
名前 | 説明 |
---|---|
Choice | |
Dtmf |
DTMF 認識のオプション |
File |
|
Play |
|
Play |
再生ソースの種類を定義します |
Recognize |
認識の種類を決定します。 |
Recognize |
|
Recognize |
|
Speech |
継続的な音声認識のオプション |
Ssml |
|
Text |
|
Tone | |
Voice |
音声の種類 |
Choice
名前 | 型 | 説明 |
---|---|---|
label |
string |
特定の選択肢の識別子 |
phrases |
string[] |
認識する語句の一覧 |
tone |
DtmfOptions
DTMF 認識のオプション
名前 | 型 | 説明 |
---|---|---|
interToneTimeoutInSeconds |
integer |
DTMF 入力が認識を停止するまで待機する時間。 |
maxTonesToCollect |
integer |
収集する DTMF トーンの最大数。 |
stopTones |
Tone[] |
認識を停止するトーンの一覧。 |
FileSource
名前 | 型 | 説明 |
---|---|---|
uri |
string |
再生するオーディオ ファイルの URI |
PlaySource
名前 | 型 | 説明 |
---|---|---|
file |
再生に使用するファイル ソース情報を定義します |
|
kind |
再生ソースの種類を定義します |
|
playSourceCacheId |
string |
関連メディアのキャッシュに使用する識別子を定義します |
ssml |
再生に使用する ssml(Speech Synthesis Markup Language) ソース情報を定義します |
|
text |
再生に使用するテキスト ソース情報を定義します |
PlaySourceType
再生ソースの種類を定義します
名前 | 型 | 説明 |
---|---|---|
file |
string |
|
ssml |
string |
|
text |
string |
RecognizeInputType
認識の種類を決定します。
名前 | 型 | 説明 |
---|---|---|
choices |
string |
|
dtmf |
string |
|
speech |
string |
|
speechOrDtmf |
string |
RecognizeOptions
名前 | 型 | 説明 |
---|---|---|
choices |
Choice[] |
認識の Ivr の選択肢を定義します。 |
dtmfOptions |
DTMF の構成を定義します。 |
|
initialSilenceTimeoutInSeconds |
integer |
プロンプトの後に最初の入力を待機する時間 (ある場合)。 |
interruptPrompt |
boolean |
プロンプトを中断して認識を開始するかどうかを決定します。 |
speechLanguage |
string |
認識される音声言語、既定値が設定されていない場合は en-US |
speechOptions |
継続的な音声認識オプションを定義します。 |
|
speechRecognitionModelEndpointId |
string |
カスタム モデルがデプロイされたエンドポイント。 |
targetParticipant |
Communication |
RecognizeRequest
名前 | 型 | 説明 |
---|---|---|
interruptCallMediaOperation |
boolean |
set recognize が他の既存のキューに登録されている要求または現在処理中の要求に割り込むことができます。 |
operationCallbackUri |
string |
この操作の CreateCall/AnswerCall によって設定された既定のコールバック URI をオーバーライドするコールバック URI を設定します。 このセットアップはアクションごとに行われます。 これが設定されていない場合は、CreateCall/AnswerCall によって設定された既定のコールバック URI が使用されます。 |
operationContext |
string |
操作のコンテキストを識別する値。 |
playPrompt |
認識のために再生するオーディオのソース。 |
|
playPrompts |
認識のために再生するオーディオのソース。 |
|
recognizeInputType |
認識の種類を決定します。 |
|
recognizeOptions |
認識のオプションを定義します。 |
SpeechOptions
継続的な音声認識のオプション
名前 | 型 | 説明 |
---|---|---|
endSilenceTimeoutInMs |
integer |
ユーザーが話しを停止し、cogservice が応答を送信するときの終了無音の長さ。 |
SsmlSource
名前 | 型 | 説明 |
---|---|---|
customVoiceEndpointId |
string |
カスタム音声がデプロイされたエンドポイント。 |
ssmlText |
string |
再生するコグニティブ サービスの Ssml 文字列 |
TextSource
名前 | 型 | 説明 |
---|---|---|
customVoiceEndpointId |
string |
カスタム音声がデプロイされたエンドポイント。 |
sourceLocale |
string |
再生するソース言語ロケール ここで使用可能なロケールを参照してください。 |
text |
string |
再生するコグニティブ サービスのテキスト |
voiceKind |
音声の種類 |
|
voiceName |
string |
再生する音声名 ここで使用可能なテキスト読み上げ音声を参照してください。 |
Tone
名前 | 型 | 説明 |
---|---|---|
a |
string |
|
asterisk |
string |
|
b |
string |
|
c |
string |
|
d |
string |
|
eight |
string |
|
five |
string |
|
four |
string |
|
nine |
string |
|
one |
string |
|
pound |
string |
|
seven |
string |
|
six |
string |
|
three |
string |
|
two |
string |
|
zero |
string |
VoiceKind
音声の種類
名前 | 型 | 説明 |
---|---|---|
female |
string |
|
male |
string |