쿠키 기본 설정 선택

당사는 사이트와 서비스를 제공하는 데 필요한 필수 쿠키 및 유사한 도구를 사용합니다. 고객이 사이트를 어떻게 사용하는지 파악하고 개선할 수 있도록 성능 쿠키를 사용해 익명의 통계를 수집합니다. 필수 쿠키는 비활성화할 수 없지만 '사용자 지정' 또는 ‘거부’를 클릭하여 성능 쿠키를 거부할 수 있습니다.

사용자가 동의하는 경우 AWS와 승인된 제3자도 쿠키를 사용하여 유용한 사이트 기능을 제공하고, 사용자의 기본 설정을 기억하고, 관련 광고를 비롯한 관련 콘텐츠를 표시합니다. 필수가 아닌 모든 쿠키를 수락하거나 거부하려면 ‘수락’ 또는 ‘거부’를 클릭하세요. 더 자세한 내용을 선택하려면 ‘사용자 정의’를 클릭하세요.

음성 입력을 사용하여 봇 테스트(AWS CLI)

포커스 모드
음성 입력을 사용하여 봇 테스트(AWS CLI) - Amazon Lex V1

지원 종료 공지: 2025년 9월 15 AWS 일에는 Amazon Lex V1에 대한 지원을 중단합니다. 2025년 9월 15일 이후에는 Amazon Lex V1 콘솔 또는 Amazon Lex V1 리소스에 더 이상 액세스할 수 없습니다. Amazon Lex V2를 사용하는 경우 대신 Amazon Lex V2 가이드를 참조하세요.

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

지원 종료 공지: 2025년 9월 15 AWS 일에는 Amazon Lex V1에 대한 지원을 중단합니다. 2025년 9월 15일 이후에는 Amazon Lex V1 콘솔 또는 Amazon Lex V1 리소스에 더 이상 액세스할 수 없습니다. Amazon Lex V2를 사용하는 경우 대신 Amazon Lex V2 가이드를 참조하세요.

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

오디오 파일을 사용하여 봇을 테스트하려면 PostContent 작업을 사용합니다. Amazon Polly 텍스트 음성 변환 작업을 사용하여 오디오 파일을 생성합니다.

이 연습에서 명령을 실행하려면 Amazon Lex 및 Amazon Polly 명령이 실행될 리전을 알아야 합니다. Amazon Lex의 지역 목록은 런타임 서비스 할당량을 참조하십시오. Amazon Polly 리전 목록은 Amazon Web Services 일반 참조에서 AWS 리전 및 엔드포인트를 참조하세요.

참고

다음 AWS CLI 예제는 Unix, Linux 및 macOS용 형식입니다. Windows의 경우 "\$LATEST"$LATEST로 바꾸고, 각 줄의 끝에 있는 백슬래시(\) 연속 문자를 캐럿(^)으로 변경합니다.

음성 입력을 사용하여 봇을 테스트하려면(AWS CLI)
  1. 에서 Amazon Polly를 사용하여 오디오 파일을 AWS CLI생성합니다. 다음은 Unix, Linux, macOS용 형식으로 지정된 예제입니다. Windows의 경우 각 줄의 끝에 있는 백슬래시(\) Unix 연속 문자를 캐럿(^)으로 바꿉니다.

    aws polly synthesize-speech \ --region region \ --output-format pcm \ --text "i would like to order flowers" \ --voice-id "Salli" \ IntentSpeech.mpg
  2. Amazon Lex 에서 오디오 파일을 보내려면 다음 명령을 실행합니다. Amazon Lex는 오디오 응답을 지정된 출력 파일에 저장합니다.

    aws lex-runtime post-content \ --region region \ --bot-name OrderFlowersBot \ --bot-alias "\$LATEST" \ --user-id UserOne \ --content-type "audio/l16; rate=16000; channels=1" \ --input-stream IntentSpeech.mpg \ IntentOutputSpeech.mpg

    Amazon Lex는 첫 번째 슬롯에 대한 요청으로 응답합니다. 오디오 응답을 지정된 출력 파일에 저장합니다.

    {
        "contentType": "audio/mpeg", 
        "slotToElicit": "FlowerType", 
        "dialogState": "ElicitSlot", 
        "intentName": "OrderFlowers", 
        "inputTranscript": "i would like to order some flowers", 
        "slots": {
            "PickupDate": null, 
            "PickupTime": null, 
            "FlowerType": null
        }, 
        "message": "What type of flowers would you like to order?"
    }
  3. 장미를 주문하려면 다음 오디오 파일을 생성하여 Amazon Lex에 보냅니다.

    aws polly synthesize-speech \ --region region \ --output-format pcm \ --text "roses" \ --voice-id "Salli" \ FlowerTypeSpeech.mpg
    aws lex-runtime post-content \ --region region \ --bot-name OrderFlowersBot \ --bot-alias "\$LATEST" \ --user-id UserOne \ --content-type "audio/l16; rate=16000; channels=1" \ --input-stream FlowerTypeSpeech.mpg \ FlowerTypeOutputSpeech.mpg
  4. 배달 날짜를 설정하려면 다음 오디오 파일을 만들어 Amazon Lex로 보냅니다.

    aws polly synthesize-speech \ --region region \ --output-format pcm \ --text "tuesday" \ --voice-id "Salli" \ DateSpeech.mpg
    aws lex-runtime post-content \ --region region \ --bot-name OrderFlowersBot \ --bot-alias "\$LATEST" \ --user-id UserOne \ --content-type "audio/l16; rate=16000; channels=1" \ --input-stream DateSpeech.mpg \ DateOutputSpeech.mpg
  5. 배달 날짜를 설정하려면 다음 오디오 파일을 만들어 Amazon Lex 로 보냅니다.

    aws polly synthesize-speech \ --region region \ --output-format pcm \ --text "10:00 a.m." \ --voice-id "Salli" \ TimeSpeech.mpg
    aws lex-runtime post-content \ --region region \ --bot-name OrderFlowersBot \ --bot-alias "\$LATEST" \ --user-id UserOne \ --content-type "audio/l16; rate=16000; channels=1" \ --input-stream TimeSpeech.mpg \ TimeOutputSpeech.mpg
  6. 배달 여부를 확인하려면 다음 오디오 파일을 만들어 Amazon Lex로 보냅니다.

    aws polly synthesize-speech \ --region region \ --output-format pcm \ --text "yes" \ --voice-id "Salli" \ ConfirmSpeech.mpg
    aws lex-runtime post-content \ --region region \ --bot-name OrderFlowersBot \ --bot-alias "\$LATEST" \ --user-id UserOne \ --content-type "audio/l16; rate=16000; channels=1" \ --input-stream ConfirmSpeech.mpg \ ConfirmOutputSpeech.mpg

    배달 확인 후에는 Amazon Lex가 의도 이행을 확인하는 응답을 보냅니다.

    {
        "contentType": "text/plain;charset=utf-8", 
        "dialogState": "ReadyForFulfillment", 
        "intentName": "OrderFlowers", 
        "inputTranscript": "yes", 
        "slots": {
            "PickupDate": "2017-05-16", 
            "PickupTime": "10:00", 
            "FlowerType": "roses"
        }
    }
    

다음 단계

연습 2: 새 표현 추가(AWS CLI)

이 페이지에서

프라이버시사이트 이용 약관쿠키 기본 설정
© 2025, Amazon Web Services, Inc. 또는 계열사. All rights reserved.