다음을 통해 공유


인식 작업으로 사용자 입력 수집

이 가이드는 Azure Communication Services 통화 자동화 SDK를 통해 참가자가 제공하는 DTMF 입력을 인식하는 데 도움을 줍니다.

필수 조건

AI 기능의 경우

기술 사양

다음 매개 변수를 사용하여 Recognize 함수를 사용자 지정할 수 있습니다.

매개 변수 형식 기본값(지정되지 않은 경우) 설명 필수 또는 선택 사항
Prompt

(자세한 내용은 재생 작업을 사용하여 사용자에게 음성 프롬프트 사용자 지정 참조)
FileSource, TextSource 설정 안 함 입력을 인식하기 전에 재생할 메시지. 선택 사항
InterToneTimeout TimeSpan 2초

최소: 1초
최대: 60초
통화 참여자가 다른 숫자를 누를 때까지 Azure Communication Services가 대기하는 시간(초)을 제한합니다(숫자 간 시간 제한). 선택 사항
InitialSegmentationSilenceTimeoutInSeconds 정수 0.5초 인식 작업이 시간 초과로 간주되기 전에 입력을 기다리는 시간입니다. 음성을 인식하는 방법을 참조하세요. 선택 사항
RecognizeInputsType 열거형 dtmf 인식할 입력의 형식입니다. 옵션은 dtmf, choices, speechspeechordtmf입니다. Required
InitialSilenceTimeout TimeSpan 5초

최소: 0초
최대: 300초(DTMF)
최대: 20초(선택)
최대: 20초(음성)
초기 무음 시간 제한은 인식 시도가 "일치하지 않는" 결과로 끝나기 전의 구 앞에서 음성이 아닌 오디오가 허용되는 양을 조정합니다. 음성을 인식하는 방법을 참조하세요. 선택 사항
MaxTonesToCollect 정수 기본값 없음

최소: 1
개발자가 참가자의 입력으로 예상하는 자릿수입니다. Required
StopTones IEnumeration<DtmfTone> 설정 안 함 숫자 참가자는 일괄 처리 DTMF 이벤트에서 이스케이프하기 위해 누를 수 있습니다. 선택 사항
InterruptPrompt Bool True 참가자가 숫자를 눌러 playMessage를 중단하는 기능이 있는 경우 선택 사항
InterruptCallMediaOperation Bool True 이 플래그가 설정되면 현재 통화 미디어 작업이 중단됩니다. 예를 들어 오디오가 재생되는 경우 해당 작업이 중단되고 인식이 시작됩니다. 선택 사항
OperationContext 문자열 설정 안 함 개발자가 중간 작업을 전달할 수 있는 문자열로, 개발자가 수신하는 이벤트에 대한 컨텍스트를 저장할 수 있도록 하는 데 유용합니다. 선택 사항
Phrases 문자열 설정 안 함 레이블에 연결된 문구 목록. 이러한 문구를 하나라도 들으면 인식은 성공한 것입니다. Required
Tone 문자열 설정 안 함 사용자가 음성을 사용하는 대신 숫자를 누르기로 결정했는지 여부를 인식하는 톤입니다. 선택 사항
Label 문자열 설정 안 함 인식을 위한 키 값입니다. Required
Language 문자열 En-us 음성을 인식하는 데 사용할 언어입니다. 선택 사항
EndSilenceTimeout TimeSpan 0.5초 음성으로 생성되는 최종 결과를 검색하는 데 사용되는, 발표자가 마지막으로 멈추는 부분입니다. 선택 사항

참고 항목

DTMF와 음성이 모두 recognizeInputsType에 있는 경우 인식 작업은 수신된 첫 번째 입력 형식에 따라 작동합니다. 예를 들어 사용자가 먼저 키패드 번호를 누르면 인식 작업은 이를 DTMF 이벤트로 간주하고 DTMF 톤을 계속 수신합니다. 사용자가 먼저 말하는 경우 인식 작업은 이를 음성 인식 이벤트로 간주하고 음성 입력을 수신합니다.

새 C# 애플리케이션 만들기

운영 체제의 콘솔 창에서 dotnet 명령을 사용하여 새 웹 애플리케이션을 만듭니다.

dotnet new web -n MyApplication

NuGet 패키지 설치

NuGet 갤러리 | Azure.Communication.CallAutomation에서 NuGet 패키지를 가져옵니다. 지침에 따라 패키지를 설치합니다.

통화 설정

이 시점이면 통화를 시작하는 데 익숙해야 합니다. 전화 걸기에 대한 자세한 내용은 빠른 시작: 전화 걸기 및 발신을 참조하세요. 여기에 제공된 코드 조각을 사용하여 통화에 응답하는 방법을 이해할 수도 있습니다.

var callAutomationClient = new CallAutomationClient("<Azure Communication Services connection string>");

var answerCallOptions = new AnswerCallOptions("<Incoming call context once call is connected>", new Uri("<https://sample-callback-uri>"))  
{  
    CallIntelligenceOptions = new CallIntelligenceOptions() { CognitiveServicesEndpoint = new Uri("<Azure Cognitive Services Endpoint>") } 
};  

var answerCallResult = await callAutomationClient.AnswerCallAsync(answerCallOptions); 

인식 작업 호출

애플리케이션이 통화에 응답할 때 참가자 입력을 인식하고 프롬프트를 재생하는 방법에 대한 정보를 제공할 수 있습니다.

DTMF

var maxTonesToCollect = 3;
String textToPlay = "Welcome to Contoso, please enter 3 DTMF.";
var playSource = new TextSource(textToPlay, "en-US-ElizabethNeural");
var recognizeOptions = new CallMediaRecognizeDtmfOptions(targetParticipant, maxTonesToCollect) {
  InitialSilenceTimeout = TimeSpan.FromSeconds(30),
    Prompt = playSource,
    InterToneTimeout = TimeSpan.FromSeconds(5),
    InterruptPrompt = true,
    StopTones = new DtmfTone[] {
      DtmfTone.Pound
    },
};
var recognizeResult = await callAutomationClient.GetCallConnection(callConnectionId)
  .GetCallMedia()
  .StartRecognizingAsync(recognizeOptions);

음성 텍스트 변환 흐름의 경우 통화 자동화 인식 작업도 사용자 지정 음성 모델의 사용을 지원합니다. 사용자 지정 음성 모델과 같은 기능은 기본 음성 텍스트 변환 모델이 이해할 수 없는 복잡한 단어를 수신해야 하는 애플리케이션을 빌드할 때 유용할 수 있습니다. 한 가지 예는 원격 산업용 애플리케이션을 빌드하는 경우 가상 에이전트가 의료 용어를 인식해야 하는 경우입니다. 사용자 지정 음성 프로젝트 만들기에서 자세히 알아볼 수 있습니다.

음성 텍스트 변환 선택 사항

var choices = new List < RecognitionChoice > {
  new RecognitionChoice("Confirm", new List < string > {
    "Confirm",
    "First",
    "One"
  }) {
    Tone = DtmfTone.One
  },
  new RecognitionChoice("Cancel", new List < string > {
    "Cancel",
    "Second",
    "Two"
  }) {
    Tone = DtmfTone.Two
  }
};
String textToPlay = "Hello, This is a reminder for your appointment at 2 PM, Say Confirm to confirm your appointment or Cancel to cancel the appointment. Thank you!";

var playSource = new TextSource(textToPlay, "en-US-ElizabethNeural");
var recognizeOptions = new CallMediaRecognizeChoiceOptions(targetParticipant, choices) {
  InterruptPrompt = true,
    InitialSilenceTimeout = TimeSpan.FromSeconds(30),
    Prompt = playSource,
    OperationContext = "AppointmentReminderMenu",
    //Only add the SpeechModelEndpointId if you have a custom speech model you would like to use
    SpeechModelEndpointId = "YourCustomSpeechModelEndpointId"
};
var recognizeResult = await callAutomationClient.GetCallConnection(callConnectionId)
  .GetCallMedia()
  .StartRecognizingAsync(recognizeOptions);

음성 텍스트 변환

String textToPlay = "Hi, how can I help you today?";
var playSource = new TextSource(textToPlay, "en-US-ElizabethNeural");
var recognizeOptions = new CallMediaRecognizeSpeechOptions(targetParticipant) {
  Prompt = playSource,
    EndSilenceTimeout = TimeSpan.FromMilliseconds(1000),
    OperationContext = "OpenQuestionSpeech",
    //Only add the SpeechModelEndpointId if you have a custom speech model you would like to use
    SpeechModelEndpointId = "YourCustomSpeechModelEndpointId"
};
var recognizeResult = await callAutomationClient.GetCallConnection(callConnectionId)
  .GetCallMedia()
  .StartRecognizingAsync(recognizeOptions);

음성 텍스트 변환 또는 DTMF

var maxTonesToCollect = 1; 
String textToPlay = "Hi, how can I help you today, you can press 0 to speak to an agent?"; 
var playSource = new TextSource(textToPlay, "en-US-ElizabethNeural"); 
var recognizeOptions = new CallMediaRecognizeSpeechOrDtmfOptions(targetParticipant, maxTonesToCollect) 
{ 
    Prompt = playSource, 
    EndSilenceTimeout = TimeSpan.FromMilliseconds(1000), 
    InitialSilenceTimeout = TimeSpan.FromSeconds(30), 
    InterruptPrompt = true, 
    OperationContext = "OpenQuestionSpeechOrDtmf",
    //Only add the SpeechModelEndpointId if you have a custom speech model you would like to use
    SpeechModelEndpointId = "YourCustomSpeechModelEndpointId" 
}; 
var recognizeResult = await callAutomationClient.GetCallConnection(callConnectionId) 
    .GetCallMedia() 
    .StartRecognizingAsync(recognizeOptions); 

참고 항목

매개 변수가 설정되지 않으면 가능한 경우 기본값이 적용됩니다.

인식 이벤트 업데이트 수신

개발자는 등록된 웹후크 콜백에서 RecognizeCompletedRecognizeFailed 이벤트를 구독할 수 있습니다. 애플리케이션에서 비즈니스 논리와 함께 이 콜백을 사용하여 이벤트 중 하나가 발생하는 경우 다음 단계를 결정합니다.

RecognizeCompleted 이벤트를 역직렬화하는 방법의 예:

if (acsEvent is RecognizeCompleted recognizeCompleted) 
{ 
    switch (recognizeCompleted.RecognizeResult) 
    { 
        case DtmfResult dtmfResult: 
            //Take action for Recognition through DTMF 
            var tones = dtmfResult.Tones; 
            logger.LogInformation("Recognize completed succesfully, tones={tones}", tones); 
            break; 
        case ChoiceResult choiceResult: 
            // Take action for Recognition through Choices 
            var labelDetected = choiceResult.Label; 
            var phraseDetected = choiceResult.RecognizedPhrase; 
            // If choice is detected by phrase, choiceResult.RecognizedPhrase will have the phrase detected, 
            // If choice is detected using dtmf tone, phrase will be null 
            logger.LogInformation("Recognize completed succesfully, labelDetected={labelDetected}, phraseDetected={phraseDetected}", labelDetected, phraseDetected);
            break; 
        case SpeechResult speechResult: 
            // Take action for Recognition through Choices 
            var text = speechResult.Speech; 
            logger.LogInformation("Recognize completed succesfully, text={text}", text); 
            break; 
        default: 
            logger.LogInformation("Recognize completed succesfully, recognizeResult={recognizeResult}", recognizeCompleted.RecognizeResult); 
            break; 
    } 
} 

RecognizeFailed 이벤트를 역직렬화하는 방법의 예:

if (acsEvent is RecognizeFailed recognizeFailed) 
{ 
    if (MediaEventReasonCode.RecognizeInitialSilenceTimedOut.Equals(recognizeFailed.ReasonCode)) 
    { 
        // Take action for time out 
        logger.LogInformation("Recognition failed: initial silencev time out"); 
    } 
    else if (MediaEventReasonCode.RecognizeSpeechOptionNotMatched.Equals(recognizeFailed.ReasonCode)) 
    { 
        // Take action for option not matched 
        logger.LogInformation("Recognition failed: speech option not matched"); 
    } 
    else if (MediaEventReasonCode.RecognizeIncorrectToneDetected.Equals(recognizeFailed.ReasonCode)) 
    { 
        // Take action for incorrect tone 
        logger.LogInformation("Recognition failed: incorrect tone detected"); 
    } 
    else 
    { 
        logger.LogInformation("Recognition failed, result={result}, context={context}", recognizeFailed.ResultInformation?.Message, recognizeFailed.OperationContext); 
    } 
} 

RecognizeCanceled 이벤트를 역직렬화하는 방법의 예:

if (acsEvent is RecognizeCanceled { OperationContext: "AppointmentReminderMenu" })
        {
            logger.LogInformation($"RecognizeCanceled event received for call connection id: {@event.CallConnectionId}");
            //Take action on recognize canceled operation
           await callConnection.HangUpAsync(forEveryone: true);
        }

필수 조건

AI 기능의 경우

기술 사양

다음 매개 변수를 사용하여 Recognize 함수를 사용자 지정할 수 있습니다.

매개 변수 형식 기본값(지정되지 않은 경우) 설명 필수 또는 선택 사항
Prompt

(자세한 내용은 재생 작업을 사용하여 사용자에게 음성 프롬프트 사용자 지정 참조)
FileSource, TextSource 설정 안 함 입력을 인식하기 전에 재생할 메시지. 선택 사항
InterToneTimeout TimeSpan 2초

최소: 1초
최대: 60초
통화 참여자가 다른 숫자를 누를 때까지 Azure Communication Services가 대기하는 시간(초)을 제한합니다(숫자 간 시간 제한). 선택 사항
InitialSegmentationSilenceTimeoutInSeconds 정수 0.5초 인식 작업이 시간 초과로 간주되기 전에 입력을 기다리는 시간입니다. 음성을 인식하는 방법을 참조하세요. 선택 사항
RecognizeInputsType 열거형 dtmf 인식할 입력의 형식입니다. 옵션은 dtmf, choices, speechspeechordtmf입니다. Required
InitialSilenceTimeout TimeSpan 5초

최소: 0초
최대: 300초(DTMF)
최대: 20초(선택)
최대: 20초(음성)
초기 무음 시간 제한은 인식 시도가 "일치하지 않는" 결과로 끝나기 전의 구 앞에서 음성이 아닌 오디오가 허용되는 양을 조정합니다. 음성을 인식하는 방법을 참조하세요. 선택 사항
MaxTonesToCollect 정수 기본값 없음

최소: 1
개발자가 참가자의 입력으로 예상하는 자릿수입니다. Required
StopTones IEnumeration<DtmfTone> 설정 안 함 숫자 참가자는 일괄 처리 DTMF 이벤트에서 이스케이프하기 위해 누를 수 있습니다. 선택 사항
InterruptPrompt Bool True 참가자가 숫자를 눌러 playMessage를 중단하는 기능이 있는 경우 선택 사항
InterruptCallMediaOperation Bool True 이 플래그가 설정되면 현재 통화 미디어 작업이 중단됩니다. 예를 들어 오디오가 재생되는 경우 해당 작업이 중단되고 인식이 시작됩니다. 선택 사항
OperationContext 문자열 설정 안 함 개발자가 중간 작업을 전달할 수 있는 문자열로, 개발자가 수신하는 이벤트에 대한 컨텍스트를 저장할 수 있도록 하는 데 유용합니다. 선택 사항
Phrases 문자열 설정 안 함 레이블에 연결된 문구 목록. 이러한 문구를 하나라도 들으면 인식은 성공한 것입니다. Required
Tone 문자열 설정 안 함 사용자가 음성을 사용하는 대신 숫자를 누르기로 결정했는지 여부를 인식하는 톤입니다. 선택 사항
Label 문자열 설정 안 함 인식을 위한 키 값입니다. Required
Language 문자열 En-us 음성을 인식하는 데 사용할 언어입니다. 선택 사항
EndSilenceTimeout TimeSpan 0.5초 음성으로 생성되는 최종 결과를 검색하는 데 사용되는, 발표자가 마지막으로 멈추는 부분입니다. 선택 사항

참고 항목

DTMF와 음성이 모두 recognizeInputsType에 있는 경우 인식 작업은 수신된 첫 번째 입력 형식에 따라 작동합니다. 예를 들어 사용자가 먼저 키패드 번호를 누르면 인식 작업은 이를 DTMF 이벤트로 간주하고 DTMF 톤을 계속 수신합니다. 사용자가 먼저 말하는 경우 인식 작업은 이를 음성 인식 이벤트로 간주하고 음성 입력을 수신합니다.

새 Java 애플리케이션 만들기

터미널 또는 명령 창에서 Java 애플리케이션을 만들려는 디렉터리로 이동합니다. mvn 명령을 실행하여 maven-archetype-quickstart 템플릿에서 Java 프로젝트를 생성합니다.

mvn archetype:generate -DgroupId=com.communication.quickstart -DartifactId=communication-quickstart -DarchetypeArtifactId=maven-archetype-quickstart -DarchetypeVersion=1.4 -DinteractiveMode=false

mvn 명령은 artifactId 인수와 동일한 이름으로 디렉터리를 만듭니다. src/main/java 디렉터리에는 프로젝트 소스 코드가 포함되어 있습니다. src/test/java 디렉터리에는 테스트 소스가 포함되어 있습니다.

generate 단계에서 artifactId와 동일한 이름의 디렉터리를 만들었습니다. src/main/java 디렉터리에는 소스 코드가 포함되어 있습니다. src/test/java 디렉터리에는 테스트가 포함되어 있습니다. pom.xml 파일은 프로젝트의 POM(프로젝트 개체 모델)입니다.

Java 8 이상을 사용하도록 애플리케이션 POM 파일을 업데이트합니다.

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
</properties>

패키지 참조 추가

POM 파일에서 프로젝트에 대한 다음 참조를 추가합니다.

azure-communication-callautomation

<dependency>
  <groupId>com.azure</groupId>
  <artifactId>azure-communication-callautomation</artifactId>
  <version>1.0.0</version>
</dependency>

통화 설정

이 시점이면 통화를 시작하는 데 익숙해야 합니다. 전화 걸기에 대한 자세한 내용은 빠른 시작: 전화 걸기 및 발신을 참조하세요. 여기에 제공된 코드 조각을 사용하여 통화에 응답하는 방법을 이해할 수도 있습니다.

CallIntelligenceOptions callIntelligenceOptions = new CallIntelligenceOptions().setCognitiveServicesEndpoint("https://sample-cognitive-service-resource.cognitiveservices.azure.com/"); 
answerCallOptions = new AnswerCallOptions("<Incoming call context>", "<https://sample-callback-uri>").setCallIntelligenceOptions(callIntelligenceOptions); 
Response < AnswerCallResult > answerCallResult = callAutomationClient
  .answerCallWithResponse(answerCallOptions)
  .block();

인식 작업 호출

애플리케이션이 통화에 응답할 때 참가자 입력을 인식하고 프롬프트를 재생하는 방법에 대한 정보를 제공할 수 있습니다.

DTMF

var maxTonesToCollect = 3;
String textToPlay = "Welcome to Contoso, please enter 3 DTMF.";
var playSource = new TextSource() 
    .setText(textToPlay) 
    .setVoiceName("en-US-ElizabethNeural");

var recognizeOptions = new CallMediaRecognizeDtmfOptions(targetParticipant, maxTonesToCollect) 
    .setInitialSilenceTimeout(Duration.ofSeconds(30)) 
    .setPlayPrompt(playSource) 
    .setInterToneTimeout(Duration.ofSeconds(5)) 
    .setInterruptPrompt(true) 
    .setStopTones(Arrays.asList(DtmfTone.POUND));

var recognizeResponse = callAutomationClient.getCallConnectionAsync(callConnectionId) 
    .getCallMediaAsync() 
    .startRecognizingWithResponse(recognizeOptions) 
    .block(); 

log.info("Start recognizing result: " + recognizeResponse.getStatusCode()); 

음성 텍스트 변환 흐름의 경우 통화 자동화 인식 작업도 사용자 지정 음성 모델의 사용을 지원합니다. 사용자 지정 음성 모델과 같은 기능은 기본 음성 텍스트 변환 모델이 이해할 수 없는 복잡한 단어를 수신해야 하는 애플리케이션을 빌드할 때 유용할 수 있습니다. 한 가지 예는 원격 산업용 애플리케이션을 빌드하는 경우 가상 에이전트가 의료 용어를 인식해야 하는 경우입니다. 사용자 지정 음성 프로젝트 만들기에서 자세히 알아볼 수 있습니다.

음성 텍스트 변환 선택 사항

var choices = Arrays.asList(
  new RecognitionChoice()
  .setLabel("Confirm")
  .setPhrases(Arrays.asList("Confirm", "First", "One"))
  .setTone(DtmfTone.ONE),
  new RecognitionChoice()
  .setLabel("Cancel")
  .setPhrases(Arrays.asList("Cancel", "Second", "Two"))
  .setTone(DtmfTone.TWO)
);

String textToPlay = "Hello, This is a reminder for your appointment at 2 PM, Say Confirm to confirm your appointment or Cancel to cancel the appointment. Thank you!";
var playSource = new TextSource()
  .setText(textToPlay)
  .setVoiceName("en-US-ElizabethNeural");
var recognizeOptions = new CallMediaRecognizeChoiceOptions(targetParticipant, choices)
  .setInterruptPrompt(true)
  .setInitialSilenceTimeout(Duration.ofSeconds(30))
  .setPlayPrompt(playSource)
  .setOperationContext("AppointmentReminderMenu")
  //Only add the SpeechRecognitionModelEndpointId if you have a custom speech model you would like to use
  .setSpeechRecognitionModelEndpointId("YourCustomSpeechModelEndpointID"); 
var recognizeResponse = callAutomationClient.getCallConnectionAsync(callConnectionId)
  .getCallMediaAsync()
  .startRecognizingWithResponse(recognizeOptions)
  .block();

음성 텍스트 변환

String textToPlay = "Hi, how can I help you today?"; 
var playSource = new TextSource() 
    .setText(textToPlay) 
    .setVoiceName("en-US-ElizabethNeural"); 
var recognizeOptions = new CallMediaRecognizeSpeechOptions(targetParticipant, Duration.ofMillis(1000)) 
    .setPlayPrompt(playSource) 
    .setOperationContext("OpenQuestionSpeech")
    //Only add the SpeechRecognitionModelEndpointId if you have a custom speech model you would like to use
    .setSpeechRecognitionModelEndpointId("YourCustomSpeechModelEndpointID");  
var recognizeResponse = callAutomationClient.getCallConnectionAsync(callConnectionId) 
    .getCallMediaAsync() 
    .startRecognizingWithResponse(recognizeOptions) 
    .block(); 

음성 텍스트 변환 또는 DTMF

var maxTonesToCollect = 1; 
String textToPlay = "Hi, how can I help you today, you can press 0 to speak to an agent?"; 
var playSource = new TextSource() 
    .setText(textToPlay) 
    .setVoiceName("en-US-ElizabethNeural"); 
var recognizeOptions = new CallMediaRecognizeSpeechOrDtmfOptions(targetParticipant, maxTonesToCollect, Duration.ofMillis(1000)) 
    .setPlayPrompt(playSource) 
    .setInitialSilenceTimeout(Duration.ofSeconds(30)) 
    .setInterruptPrompt(true) 
    .setOperationContext("OpenQuestionSpeechOrDtmf")
    //Only add the SpeechRecognitionModelEndpointId if you have a custom speech model you would like to use
    .setSpeechRecognitionModelEndpointId("YourCustomSpeechModelEndpointID");  
var recognizeResponse = callAutomationClient.getCallConnectionAsync(callConnectionId) 
    .getCallMediaAsync() 
    .startRecognizingWithResponse(recognizeOptions) 
    .block(); 

참고 항목

매개 변수가 설정되지 않으면 가능한 경우 기본값이 적용됩니다.

인식 이벤트 업데이트 수신

개발자는 등록된 웹후크 콜백에서 RecognizeCompletedRecognizeFailed 이벤트를 구독할 수 있습니다. 애플리케이션에서 비즈니스 논리와 함께 이 콜백을 사용하여 이벤트 중 하나가 발생하는 경우 다음 단계를 결정합니다.

RecognizeCompleted 이벤트를 역직렬화하는 방법의 예:

if (acsEvent instanceof RecognizeCompleted) { 
    RecognizeCompleted event = (RecognizeCompleted) acsEvent; 
    RecognizeResult recognizeResult = event.getRecognizeResult().get(); 
    if (recognizeResult instanceof DtmfResult) { 
        // Take action on collect tones 
        DtmfResult dtmfResult = (DtmfResult) recognizeResult; 
        List<DtmfTone> tones = dtmfResult.getTones(); 
        log.info("Recognition completed, tones=" + tones + ", context=" + event.getOperationContext()); 
    } else if (recognizeResult instanceof ChoiceResult) { 
        ChoiceResult collectChoiceResult = (ChoiceResult) recognizeResult; 
        String labelDetected = collectChoiceResult.getLabel(); 
        String phraseDetected = collectChoiceResult.getRecognizedPhrase(); 
        log.info("Recognition completed, labelDetected=" + labelDetected + ", phraseDetected=" + phraseDetected + ", context=" + event.getOperationContext()); 
    } else if (recognizeResult instanceof SpeechResult) { 
        SpeechResult speechResult = (SpeechResult) recognizeResult; 
        String text = speechResult.getSpeech(); 
        log.info("Recognition completed, text=" + text + ", context=" + event.getOperationContext()); 
    } else { 
        log.info("Recognition completed, result=" + recognizeResult + ", context=" + event.getOperationContext()); 
    } 
} 

RecognizeFailed 이벤트를 역직렬화하는 방법의 예:

if (acsEvent instanceof RecognizeFailed) { 
    RecognizeFailed event = (RecognizeFailed) acsEvent; 
    if (ReasonCode.Recognize.INITIAL_SILENCE_TIMEOUT.equals(event.getReasonCode())) { 
        // Take action for time out 
        log.info("Recognition failed: initial silence time out"); 
    } else if (ReasonCode.Recognize.SPEECH_OPTION_NOT_MATCHED.equals(event.getReasonCode())) { 
        // Take action for option not matched 
        log.info("Recognition failed: speech option not matched"); 
    } else if (ReasonCode.Recognize.DMTF_OPTION_MATCHED.equals(event.getReasonCode())) { 
        // Take action for incorrect tone 
        log.info("Recognition failed: incorrect tone detected"); 
    } else { 
        log.info("Recognition failed, result=" + event.getResultInformation().getMessage() + ", context=" + event.getOperationContext()); 
    } 
} 

RecognizeCanceled 이벤트를 역직렬화하는 방법의 예:

if (acsEvent instanceof RecognizeCanceled) { 
    RecognizeCanceled event = (RecognizeCanceled) acsEvent; 
    log.info("Recognition canceled, context=" + event.getOperationContext()); 
}

필수 조건

AI 기능의 경우

기술 사양

다음 매개 변수를 사용하여 Recognize 함수를 사용자 지정할 수 있습니다.

매개 변수 형식 기본값(지정되지 않은 경우) 설명 필수 또는 선택 사항
Prompt

(자세한 내용은 재생 작업을 사용하여 사용자에게 음성 프롬프트 사용자 지정 참조)
FileSource, TextSource 설정 안 함 입력을 인식하기 전에 재생할 메시지. 선택 사항
InterToneTimeout TimeSpan 2초

최소: 1초
최대: 60초
통화 참여자가 다른 숫자를 누를 때까지 Azure Communication Services가 대기하는 시간(초)을 제한합니다(숫자 간 시간 제한). 선택 사항
InitialSegmentationSilenceTimeoutInSeconds 정수 0.5초 인식 작업이 시간 초과로 간주되기 전에 입력을 기다리는 시간입니다. 음성을 인식하는 방법을 참조하세요. 선택 사항
RecognizeInputsType 열거형 dtmf 인식할 입력의 형식입니다. 옵션은 dtmf, choices, speechspeechordtmf입니다. Required
InitialSilenceTimeout TimeSpan 5초

최소: 0초
최대: 300초(DTMF)
최대: 20초(선택)
최대: 20초(음성)
초기 무음 시간 제한은 인식 시도가 "일치하지 않는" 결과로 끝나기 전의 구 앞에서 음성이 아닌 오디오가 허용되는 양을 조정합니다. 음성을 인식하는 방법을 참조하세요. 선택 사항
MaxTonesToCollect 정수 기본값 없음

최소: 1
개발자가 참가자의 입력으로 예상하는 자릿수입니다. Required
StopTones IEnumeration<DtmfTone> 설정 안 함 숫자 참가자는 일괄 처리 DTMF 이벤트에서 이스케이프하기 위해 누를 수 있습니다. 선택 사항
InterruptPrompt Bool True 참가자가 숫자를 눌러 playMessage를 중단하는 기능이 있는 경우 선택 사항
InterruptCallMediaOperation Bool True 이 플래그가 설정되면 현재 통화 미디어 작업이 중단됩니다. 예를 들어 오디오가 재생되는 경우 해당 작업이 중단되고 인식이 시작됩니다. 선택 사항
OperationContext 문자열 설정 안 함 개발자가 중간 작업을 전달할 수 있는 문자열로, 개발자가 수신하는 이벤트에 대한 컨텍스트를 저장할 수 있도록 하는 데 유용합니다. 선택 사항
Phrases 문자열 설정 안 함 레이블에 연결된 문구 목록. 이러한 문구를 하나라도 들으면 인식은 성공한 것입니다. Required
Tone 문자열 설정 안 함 사용자가 음성을 사용하는 대신 숫자를 누르기로 결정했는지 여부를 인식하는 톤입니다. 선택 사항
Label 문자열 설정 안 함 인식을 위한 키 값입니다. Required
Language 문자열 En-us 음성을 인식하는 데 사용할 언어입니다. 선택 사항
EndSilenceTimeout TimeSpan 0.5초 음성으로 생성되는 최종 결과를 검색하는 데 사용되는, 발표자가 마지막으로 멈추는 부분입니다. 선택 사항

참고 항목

DTMF와 음성이 모두 recognizeInputsType에 있는 경우 인식 작업은 수신된 첫 번째 입력 형식에 따라 작동합니다. 예를 들어 사용자가 먼저 키패드 번호를 누르면 인식 작업은 이를 DTMF 이벤트로 간주하고 DTMF 톤을 계속 수신합니다. 사용자가 먼저 말하는 경우 인식 작업은 이를 음성 인식 이벤트로 간주하고 음성 입력을 수신합니다.

새 JavaScript 애플리케이션 만들기

프로젝트 디렉터리에 새 JavaScript 애플리케이션을 만듭니다. 다음 명령으로 새 Node.js 프로젝트를 초기화합니다. 이를 통해 프로젝트의 종속성을 관리하는 프로젝트에 대한 package.json 파일이 만들어집니다.

npm init -y

Azure Communication Services 통화 자동화 패키지 설치

npm install @azure/communication-call-automation

프로젝트 디렉터리에 새 JavaScript 파일을 만듭니다. 예를 들어 이름을 app.js라고 짓습니다. 이 파일에 JavaScript 코드를 작성합니다.

다음 명령을 통해 Node.js를 사용하여 애플리케이션을 실행합니다.

node app.js

통화 설정

이 시점이면 통화를 시작하는 데 익숙해야 합니다. 전화 걸기에 대한 자세한 내용은 빠른 시작: 전화 걸기 및 발신을 참조하세요.

인식 작업 호출

애플리케이션이 통화에 응답할 때 참가자 입력을 인식하고 프롬프트를 재생하는 방법에 대한 정보를 제공할 수 있습니다.

DTMF

const maxTonesToCollect = 3; 
const textToPlay = "Welcome to Contoso, please enter 3 DTMF."; 
const playSource: TextSource = { text: textToPlay, voiceName: "en-US-ElizabethNeural", kind: "textSource" }; 
const recognizeOptions: CallMediaRecognizeDtmfOptions = { 
    maxTonesToCollect: maxTonesToCollect, 
    initialSilenceTimeoutInSeconds: 30, 
    playPrompt: playSource, 
    interToneTimeoutInSeconds: 5, 
    interruptPrompt: true, 
    stopDtmfTones: [ DtmfTone.Pound ], 
    kind: "callMediaRecognizeDtmfOptions" 
}; 

await callAutomationClient.getCallConnection(callConnectionId) 
    .getCallMedia() 
    .startRecognizing(targetParticipant, recognizeOptions); 

음성 텍스트 변환 흐름의 경우 통화 자동화 인식 작업도 사용자 지정 음성 모델의 사용을 지원합니다. 사용자 지정 음성 모델과 같은 기능은 기본 음성 텍스트 변환 모델이 이해할 수 없는 복잡한 단어를 수신해야 하는 애플리케이션을 빌드할 때 유용할 수 있습니다. 한 가지 예는 원격 산업용 애플리케이션을 빌드하는 경우 가상 에이전트가 의료 용어를 인식해야 하는 경우입니다. 사용자 지정 음성 프로젝트 만들기에서 자세히 알아볼 수 있습니다.

음성 텍스트 변환 선택 사항

const choices = [ 
    {  
        label: "Confirm", 
        phrases: [ "Confirm", "First", "One" ], 
        tone: DtmfTone.One 
    }, 
    { 
        label: "Cancel", 
        phrases: [ "Cancel", "Second", "Two" ], 
        tone: DtmfTone.Two 
    } 
]; 

const textToPlay = "Hello, This is a reminder for your appointment at 2 PM, Say Confirm to confirm your appointment or Cancel to cancel the appointment. Thank you!"; 
const playSource: TextSource = { text: textToPlay, voiceName: "en-US-ElizabethNeural", kind: "textSource" }; 
const recognizeOptions: CallMediaRecognizeChoiceOptions = { 
    choices: choices, 
    interruptPrompt: true, 
    initialSilenceTimeoutInSeconds: 30, 
    playPrompt: playSource, 
    operationContext: "AppointmentReminderMenu", 
    kind: "callMediaRecognizeChoiceOptions",
    //Only add the speechRecognitionModelEndpointId if you have a custom speech model you would like to use
    speechRecognitionModelEndpointId: "YourCustomSpeechEndpointId"
}; 

await callAutomationClient.getCallConnection(callConnectionId) 
    .getCallMedia() 
    .startRecognizing(targetParticipant, recognizeOptions); 

음성 텍스트 변환

const textToPlay = "Hi, how can I help you today?"; 
const playSource: TextSource = { text: textToPlay, voiceName: "en-US-ElizabethNeural", kind: "textSource" }; 
const recognizeOptions: CallMediaRecognizeSpeechOptions = { 
    endSilenceTimeoutInSeconds: 1, 
    playPrompt: playSource, 
    operationContext: "OpenQuestionSpeech", 
    kind: "callMediaRecognizeSpeechOptions",
    //Only add the speechRecognitionModelEndpointId if you have a custom speech model you would like to use
    speechRecognitionModelEndpointId: "YourCustomSpeechEndpointId"
}; 

await callAutomationClient.getCallConnection(callConnectionId) 
    .getCallMedia() 
    .startRecognizing(targetParticipant, recognizeOptions); 

음성 텍스트 변환 또는 DTMF

const maxTonesToCollect = 1; 
const textToPlay = "Hi, how can I help you today, you can press 0 to speak to an agent?"; 
const playSource: TextSource = { text: textToPlay, voiceName: "en-US-ElizabethNeural", kind: "textSource" }; 
const recognizeOptions: CallMediaRecognizeSpeechOrDtmfOptions = { 
    maxTonesToCollect: maxTonesToCollect, 
    endSilenceTimeoutInSeconds: 1, 
    playPrompt: playSource, 
    initialSilenceTimeoutInSeconds: 30, 
    interruptPrompt: true, 
    operationContext: "OpenQuestionSpeechOrDtmf", 
    kind: "callMediaRecognizeSpeechOrDtmfOptions",
    //Only add the speechRecognitionModelEndpointId if you have a custom speech model you would like to use
    speechRecognitionModelEndpointId: "YourCustomSpeechEndpointId"
}; 

await callAutomationClient.getCallConnection(callConnectionId) 
    .getCallMedia() 
    .startRecognizing(targetParticipant, recognizeOptions); 

참고 항목

매개 변수가 설정되지 않으면 가능한 경우 기본값이 적용됩니다.

인식 이벤트 업데이트 수신

개발자는 등록된 웹후크 콜백에서 RecognizeCompletedRecognizeFailed 이벤트를 구독할 수 있습니다. 애플리케이션에서 비즈니스 논리와 함께 이 콜백을 사용하여 이벤트 중 하나가 발생하는 경우 다음 단계를 결정합니다.

RecognizeCompleted 이벤트를 역직렬화하는 방법의 예:

if (event.type === "Microsoft.Communication.RecognizeCompleted") { 
    if (eventData.recognitionType === "dtmf") { 
        const tones = eventData.dtmfResult.tones; 
        console.log("Recognition completed, tones=%s, context=%s", tones, eventData.operationContext); 
    } else if (eventData.recognitionType === "choices") { 
        const labelDetected = eventData.choiceResult.label; 
        const phraseDetected = eventData.choiceResult.recognizedPhrase; 
        console.log("Recognition completed, labelDetected=%s, phraseDetected=%s, context=%s", labelDetected, phraseDetected, eventData.operationContext); 
    } else if (eventData.recognitionType === "speech") { 
        const text = eventData.speechResult.speech; 
        console.log("Recognition completed, text=%s, context=%s", text, eventData.operationContext); 
    } else { 
        console.log("Recognition completed: data=%s", JSON.stringify(eventData, null, 2)); 
    } 
} 

RecognizeFailed 이벤트를 역직렬화하는 방법의 예:

if (event.type === "Microsoft.Communication.RecognizeFailed") {
    console.log("Recognize failed: data=%s", JSON.stringify(eventData, null, 2));
}

RecognizeCanceled 이벤트를 역직렬화하는 방법의 예:

if (event.type === "Microsoft.Communication.RecognizeCanceled") {
    console.log("Recognize canceled, context=%s", eventData.operationContext);
}

필수 조건

AI 기능의 경우

기술 사양

다음 매개 변수를 사용하여 Recognize 함수를 사용자 지정할 수 있습니다.

매개 변수 형식 기본값(지정되지 않은 경우) 설명 필수 또는 선택 사항
Prompt

(자세한 내용은 재생 작업을 사용하여 사용자에게 음성 프롬프트 사용자 지정 참조)
FileSource, TextSource 설정 안 함 입력을 인식하기 전에 재생할 메시지. 선택 사항
InterToneTimeout TimeSpan 2초

최소: 1초
최대: 60초
통화 참여자가 다른 숫자를 누를 때까지 Azure Communication Services가 대기하는 시간(초)을 제한합니다(숫자 간 시간 제한). 선택 사항
InitialSegmentationSilenceTimeoutInSeconds 정수 0.5초 인식 작업이 시간 초과로 간주되기 전에 입력을 기다리는 시간입니다. 음성을 인식하는 방법을 참조하세요. 선택 사항
RecognizeInputsType 열거형 dtmf 인식할 입력의 형식입니다. 옵션은 dtmf, choices, speechspeechordtmf입니다. Required
InitialSilenceTimeout TimeSpan 5초

최소: 0초
최대: 300초(DTMF)
최대: 20초(선택)
최대: 20초(음성)
초기 무음 시간 제한은 인식 시도가 "일치하지 않는" 결과로 끝나기 전의 구 앞에서 음성이 아닌 오디오가 허용되는 양을 조정합니다. 음성을 인식하는 방법을 참조하세요. 선택 사항
MaxTonesToCollect 정수 기본값 없음

최소: 1
개발자가 참가자의 입력으로 예상하는 자릿수입니다. Required
StopTones IEnumeration<DtmfTone> 설정 안 함 숫자 참가자는 일괄 처리 DTMF 이벤트에서 이스케이프하기 위해 누를 수 있습니다. 선택 사항
InterruptPrompt Bool True 참가자가 숫자를 눌러 playMessage를 중단하는 기능이 있는 경우 선택 사항
InterruptCallMediaOperation Bool True 이 플래그가 설정되면 현재 통화 미디어 작업이 중단됩니다. 예를 들어 오디오가 재생되는 경우 해당 작업이 중단되고 인식이 시작됩니다. 선택 사항
OperationContext 문자열 설정 안 함 개발자가 중간 작업을 전달할 수 있는 문자열로, 개발자가 수신하는 이벤트에 대한 컨텍스트를 저장할 수 있도록 하는 데 유용합니다. 선택 사항
Phrases 문자열 설정 안 함 레이블에 연결된 문구 목록. 이러한 문구를 하나라도 들으면 인식은 성공한 것입니다. Required
Tone 문자열 설정 안 함 사용자가 음성을 사용하는 대신 숫자를 누르기로 결정했는지 여부를 인식하는 톤입니다. 선택 사항
Label 문자열 설정 안 함 인식을 위한 키 값입니다. Required
Language 문자열 En-us 음성을 인식하는 데 사용할 언어입니다. 선택 사항
EndSilenceTimeout TimeSpan 0.5초 음성으로 생성되는 최종 결과를 검색하는 데 사용되는, 발표자가 마지막으로 멈추는 부분입니다. 선택 사항

참고 항목

DTMF와 음성이 모두 recognizeInputsType에 있는 경우 인식 작업은 수신된 첫 번째 입력 형식에 따라 작동합니다. 예를 들어 사용자가 먼저 키패드 번호를 누르면 인식 작업은 이를 DTMF 이벤트로 간주하고 DTMF 톤을 계속 수신합니다. 사용자가 먼저 말하는 경우 인식 작업은 이를 음성 인식 이벤트로 간주하고 음성 입력을 수신합니다.

새 Python 애플리케이션 만들기

프로젝트의 Python 가상 환경 설정

python -m venv play-audio-app

가상 환경 활성화

Windows에서 다음 명령을 사용합니다.

.\ play-audio-quickstart \Scripts\activate

Unix의 경우 다음 명령을 사용합니다.

source play-audio-quickstart /bin/activate

Azure Communication Services 통화 자동화 패키지 설치

pip install azure-communication-callautomation

프로젝트 디렉터리에 애플리케이션 파일을 만듭니다. 예를 들어 이름을 app.py라고 짓습니다. 이 파일에 Python 코드를 작성합니다.

다음 명령을 통해 Python을 사용하여 애플리케이션을 실행합니다.

python app.py

통화 설정

이 시점이면 통화를 시작하는 데 익숙해야 합니다. 전화 걸기에 대한 자세한 내용은 빠른 시작: 전화 걸기 및 발신을 참조하세요.

인식 작업 호출

애플리케이션이 통화에 응답할 때 참가자 입력을 인식하고 프롬프트를 재생하는 방법에 대한 정보를 제공할 수 있습니다.

DTMF

max_tones_to_collect = 3 
text_to_play = "Welcome to Contoso, please enter 3 DTMF." 
play_source = TextSource(text=text_to_play, voice_name="en-US-ElizabethNeural") 
call_automation_client.get_call_connection(call_connection_id).start_recognizing_media( 
    dtmf_max_tones_to_collect=max_tones_to_collect, 
    input_type=RecognizeInputType.DTMF, 
    target_participant=target_participant, 
    initial_silence_timeout=30, 
    play_prompt=play_source, 
    dtmf_inter_tone_timeout=5, 
    interrupt_prompt=True, 
    dtmf_stop_tones=[ DtmfTone.Pound ]) 

음성 텍스트 변환 흐름의 경우 통화 자동화 인식 작업도 사용자 지정 음성 모델의 사용을 지원합니다. 사용자 지정 음성 모델과 같은 기능은 기본 음성 텍스트 변환 모델이 이해할 수 없는 복잡한 단어를 수신해야 하는 애플리케이션을 빌드할 때 유용할 수 있습니다. 한 가지 예는 원격 산업용 애플리케이션을 빌드하는 경우 가상 에이전트가 의료 용어를 인식해야 하는 경우입니다. 사용자 지정 음성 프로젝트 만들기에서 자세히 알아볼 수 있습니다.

음성 텍스트 변환 선택 사항

choices = [ 
    RecognitionChoice( 
        label="Confirm", 
        phrases=[ "Confirm", "First", "One" ], 
        tone=DtmfTone.ONE 
    ), 
    RecognitionChoice( 
        label="Cancel", 
        phrases=[ "Cancel", "Second", "Two" ], 
        tone=DtmfTone.TWO 
    ) 
] 
text_to_play = "Hello, This is a reminder for your appointment at 2 PM, Say Confirm to confirm your appointment or Cancel to cancel the appointment. Thank you!" 
play_source = TextSource(text=text_to_play, voice_name="en-US-ElizabethNeural") 
call_automation_client.get_call_connection(call_connection_id).start_recognizing_media( 
    input_type=RecognizeInputType.CHOICES, 
    target_participant=target_participant, 
    choices=choices, 
    interrupt_prompt=True, 
    initial_silence_timeout=30, 
    play_prompt=play_source, 
    operation_context="AppointmentReminderMenu",
    # Only add the speech_recognition_model_endpoint_id if you have a custom speech model you would like to use
    speech_recognition_model_endpoint_id="YourCustomSpeechModelEndpointId")  

음성 텍스트 변환

text_to_play = "Hi, how can I help you today?" 
play_source = TextSource(text=text_to_play, voice_name="en-US-ElizabethNeural") 
call_automation_client.get_call_connection(call_connection_id).start_recognizing_media( 
    input_type=RecognizeInputType.SPEECH, 
    target_participant=target_participant, 
    end_silence_timeout=1, 
    play_prompt=play_source, 
    operation_context="OpenQuestionSpeech",
    # Only add the speech_recognition_model_endpoint_id if you have a custom speech model you would like to use
    speech_recognition_model_endpoint_id="YourCustomSpeechModelEndpointId") 

음성 텍스트 변환 또는 DTMF

max_tones_to_collect = 1 
text_to_play = "Hi, how can I help you today, you can also press 0 to speak to an agent." 
play_source = TextSource(text=text_to_play, voice_name="en-US-ElizabethNeural") 
call_automation_client.get_call_connection(call_connection_id).start_recognizing_media( 
    dtmf_max_tones_to_collect=max_tones_to_collect, 
    input_type=RecognizeInputType.SPEECH_OR_DTMF, 
    target_participant=target_participant, 
    end_silence_timeout=1, 
    play_prompt=play_source, 
    initial_silence_timeout=30, 
    interrupt_prompt=True, 
    operation_context="OpenQuestionSpeechOrDtmf",
    # Only add the speech_recognition_model_endpoint_id if you have a custom speech model you would like to use
    speech_recognition_model_endpoint_id="YourCustomSpeechModelEndpointId")  
app.logger.info("Start recognizing") 

참고 항목

매개 변수가 설정되지 않으면 가능한 경우 기본값이 적용됩니다.

인식 이벤트 업데이트 수신

개발자는 등록된 웹후크 콜백에서 RecognizeCompletedRecognizeFailed 이벤트를 구독할 수 있습니다. 애플리케이션에서 비즈니스 논리와 함께 이 콜백을 사용하여 이벤트 중 하나가 발생하는 경우 다음 단계를 결정합니다.

RecognizeCompleted 이벤트를 역직렬화하는 방법의 예:

if event.type == "Microsoft.Communication.RecognizeCompleted": 
    app.logger.info("Recognize completed: data=%s", event.data) 
    if event.data['recognitionType'] == "dtmf": 
        tones = event.data['dtmfResult']['tones'] 
        app.logger.info("Recognition completed, tones=%s, context=%s", tones, event.data.get('operationContext')) 
    elif event.data['recognitionType'] == "choices": 
        labelDetected = event.data['choiceResult']['label']; 
        phraseDetected = event.data['choiceResult']['recognizedPhrase']; 
        app.logger.info("Recognition completed, labelDetected=%s, phraseDetected=%s, context=%s", labelDetected, phraseDetected, event.data.get('operationContext')); 
    elif event.data['recognitionType'] == "speech": 
        text = event.data['speechResult']['speech']; 
        app.logger.info("Recognition completed, text=%s, context=%s", text, event.data.get('operationContext')); 
    else: 
        app.logger.info("Recognition completed: data=%s", event.data); 

RecognizeFailed 이벤트를 역직렬화하는 방법의 예:

if event.type == "Microsoft.Communication.RecognizeFailed": 
    app.logger.info("Recognize failed: data=%s", event.data); 

RecognizeCanceled 이벤트를 역직렬화하는 방법의 예:

if event.type == "Microsoft.Communication.RecognizeCanceled":
    # Handle the RecognizeCanceled event according to your application logic

이벤트 코드

상태 코드 하위 코드 메시지
RecognizeCompleted 200 8531 작업이 완료되고 받은 최대 자릿수입니다.
RecognizeCompleted 200 8514 중지 톤이 감지되면서 작업이 완료되었습니다.
RecognizeCompleted 400 8508 작업이 실패하여 작업이 취소되었습니다.
RecognizeCompleted 400 8532 작업이 실패하고 숫자 간 무음 시간 제한에 도달했습니다.
RecognizeCanceled 400 8508 작업이 실패하여 작업이 취소되었습니다.
RecognizeFailed 400 8510 작업 실패, 초기 무음 시간 제한에 도달했습니다.
RecognizeFailed 500 8511 프롬프트를 재생하는 동안 작업이 실패하고 오류가 발생했습니다.
RecognizeFailed 500 8512 알 수 없는 내부 서버 오류입니다.
RecognizeFailed 400 8510 작업이 실패하고 초기 무음 시간 제한에 도달했습니다.
RecognizeFailed 400 8532 작업이 실패하고 숫자 간 무음 시간 제한에 도달했습니다.
RecognizeFailed 400 8565 작업 실패, Azure AI 서비스에 대한 잘못된 요청이 발생했습니다. 입력 매개 변수를 확인하세요.
RecognizeFailed 400 8565 작업 실패, Azure AI 서비스에 대한 잘못된 요청이 발생했습니다. 제공된 페이로드를 처리할 수 없으니 재생 원본 입력을 확인하세요.
RecognizeFailed 401 8565 작업 실패, Azure AI 서비스 인증 오류가 발생했습니다.
RecognizeFailed 403 8565 작업 실패, Azure AI 서비스에 대한 요청이 금지되었으며, 해당 요청에서 사용하는 무료 구독 할당량이 부족합니다.
RecognizeFailed 429 8565 작업 실패, 요청이 Azure AI 서비스 구독에 대해 허용되는 동시 요청 수를 초과했습니다.
RecognizeFailed 408 8565 작업 실패, Azure AI 서비스에 대한 요청 시간이 초과되었습니다.
RecognizeFailed 500 8511 프롬프트를 재생하는 동안 작업이 실패하고 오류가 발생했습니다.
RecognizeFailed 500 8512 알 수 없는 내부 서버 오류입니다.

알려진 제한 사항

  • 대역 내 DTMF는 지원되지 않습니다. 대신 RFC 2833 DTMF를 사용합니다.
  • 텍스트 음성 변환 텍스트 프롬프트는 최대 400자를 지원합니다. 프롬프트가 이보다 긴 경우 텍스트 음성 변환 기반 재생 작업에 SSML을 사용하는 것이 좋습니다.
  • 음성 서비스 할당량 한도를 초과하는 시나리오의 경우 음성 서비스 할당량 및 한도에 설명된 단계에 따라 이 한도를 늘리도록 요청할 수 있습니다.

리소스 정리

Communication Services 구독을 정리하고 제거하려면 리소스 또는 리소스 그룹을 삭제하면 됩니다. 리소스 그룹을 삭제하면 해당 리소스 그룹에 연결된 다른 모든 리소스가 함께 삭제됩니다. 리소스 정리에 대해 자세히 알아보세요.

다음 단계