사용자 지정 음성 모델 배포

이 문서에서는 사용자 지정 음성 모델에 대한 엔드포인트를 배포하는 방법을 알아봅니다. 일괄 처리 전사를 제외하고 사용자 지정 음성 모델을 사용하려면 사용자 지정 엔드포인트를 배포해야 합니다.

호스트된 배포 엔드포인트의 경우 사용자 지정 음성을 일괄 대화 내용 기록 API와 함께 사용할 필요가 없습니다. 사용자 지정 음성 모델이 일괄 대화 내용 기록에만 사용되는 경우 리소스를 보존할 수 있습니다. 자세한 내용은 Speech Service 가격 책정을 참조하세요.

기본 또는 사용자 지정 모델에 대한 엔드포인트를 배포한 다음, 나중에 더 나은 학습된 모델을 사용하도록 엔드포인트를 업데이트할 수 있습니다.

참고 항목

F0 음성 리소스에서 사용하는 엔드포인트는 7일 후에 삭제됩니다.

배포 엔드포인트 추가

사용자 지정 엔드포인트를 만들려면 다음 단계를 수행합니다.

  1. Speech Studio에 로그인합니다.

  2. 사용자 지정 음성> 내 프로젝트 이름 >모델 배포를 선택합니다.

    첫 번째 엔드포인트인 경우에는 표에 나열된 엔드포인트가 없다는 것을 알 수 있습니다. 엔드포인트를 만든 후 이 페이지를 사용하여 배포된 각 엔드포인트를 추적할 수 있습니다.

  3. 모델 배포를 선택하여 새 엔드포인트 마법사를 시작합니다.

  4. 새 엔드포인트 페이지에서 사용자 지정 엔드포인트에 대한 이름 및 설명을 입력합니다.

  5. 엔드포인트와 연결하려는 사용자 지정 모델을 선택합니다.

  6. 필요에 따라 확인란을 선택하여 엔드포인트 트래픽의 오디오 및 진단 로깅을 사용하도록 설정할 수 있습니다.

    로깅을 사용하도록 설정하는 확인란이 표시된 새 엔드포인트 페이지의 스크린샷

  7. 추가를 선택하여 엔드포인트를 저장하고 배포합니다.

기본 모델 배포 페이지에서 이름, 설명, 상태 및 만료 날짜와 같은 새 엔드포인트에 대한 세부 정보가 테이블에 표시됩니다. 사용자 지정 모델을 사용하는 새 엔드포인트를 인스턴스화하는 데 최대 30분이 걸릴 수 있습니다. 배포 상태가 성공이면 엔드포인트를 사용할 준비가 완료된 것입니다.

Important

모델 만료 날짜를 적어 두세요. 음성 인식을 위해 사용자 지정 모델을 사용할 수 있는 마지막 날짜입니다. 자세한 내용은 모델 및 엔드포인트 수명 주기를 참조하세요.

엔드포인트 키, 엔드포인트 URL 및 샘플 코드와 같은 특정 정보를 표시하려면 엔드포인트 링크를 선택합니다.

엔드포인트를 만들고 모델을 배포하려면 spx csr endpoint create 명령을 사용합니다. 다음 지침에 따라 요청 매개 변수를 생성합니다.

  • project 매개 변수를 기존 프로젝트의 ID로 설정합니다. Speech Studio에서도 엔드포인트를 보고 관리할 수 있도록 이렇게 하는 것이 좋습니다. spx csr project list 명령을 실행하여 사용 가능한 프로젝트를 가져올 수 있습니다.
  • 필수 model 매개 변수를 엔드포인트에 배포하려는 모델의 ID로 설정합니다.
  • 필수 language 매개 변수를 설정합니다. 엔드포인트 로캘은 모델의 로캘과 일치해야 합니다. 로캘은 나중에 변경할 수 없습니다. Speech CLI language 매개 변수는 JSON 요청 및 응답의 locale 속성에 해당합니다.
  • 필수 name 매개 변수를 설정합니다. 이는 Speech Studio에 표시되는 이름입니다. Speech CLI name 매개 변수는 JSON 요청 및 응답의 displayName 속성에 해당합니다.
  • 필요에 따라 logging 매개 변수를 설정할 수 있습니다. 엔드포인트 트래픽의 오디오 및 진단 로깅을 사용하도록 설정하려면 이 매개 변수를 enabled로 설정합니다. 기본값은 false입니다.

엔드포인트를 만들고 모델을 배포하는 Speech CLI 명령 예제는 다음과 같습니다.

spx csr endpoint create --api-version v3.1 --project YourProjectId --model YourModelId --name "My Endpoint" --description "My Endpoint Description" --language "en-US"

응답 본문은 다음 형식으로 표시되어야 합니다.

{
  "self": "https://eastus.api.cognitive.microsoft.com/speechtotext/v3.1/endpoints/98375aaa-40c2-42c4-b65c-f76734fc7790",
  "model": {
    "self": "https://eastus.api.cognitive.microsoft.com/speechtotext/v3.1/models/base/ae8d1643-53e4-4554-be4c-221dcfb471c5"
  },
  "links": {
    "logs": "https://eastus.api.cognitive.microsoft.com/speechtotext/v3.1/endpoints/98375aaa-40c2-42c4-b65c-f76734fc7790/files/logs",
    "restInteractive": "https://eastus.stt.speech.microsoft.com/speech/recognition/interactive/cognitiveservices/v1?cid=98375aaa-40c2-42c4-b65c-f76734fc7790",
    "restConversation": "https://eastus.stt.speech.microsoft.com/speech/recognition/conversation/cognitiveservices/v1?cid=98375aaa-40c2-42c4-b65c-f76734fc7790",
    "restDictation": "https://eastus.stt.speech.microsoft.com/speech/recognition/dictation/cognitiveservices/v1?cid=98375aaa-40c2-42c4-b65c-f76734fc7790",
    "webSocketInteractive": "wss://eastus.stt.speech.microsoft.com/speech/recognition/interactive/cognitiveservices/v1?cid=98375aaa-40c2-42c4-b65c-f76734fc7790",
    "webSocketConversation": "wss://eastus.stt.speech.microsoft.com/speech/recognition/conversation/cognitiveservices/v1?cid=98375aaa-40c2-42c4-b65c-f76734fc7790",
    "webSocketDictation": "wss://eastus.stt.speech.microsoft.com/speech/recognition/dictation/cognitiveservices/v1?cid=98375aaa-40c2-42c4-b65c-f76734fc7790"
  },
  "project": {
    "self": "https://eastus.api.cognitive.microsoft.com/speechtotext/v3.1/projects/d40f2eb8-1abf-4f72-9008-a5ae8add82a4"
  },
  "properties": {
    "loggingEnabled": true
  },
  "lastActionDateTime": "2022-05-19T15:27:51Z",
  "status": "NotStarted",
  "createdDateTime": "2022-05-19T15:27:51Z",
  "locale": "en-US",
  "displayName": "My Endpoint",
  "description": "My Endpoint Description"
}

응답 본문의 최상위 self 속성은 엔드포인트의 URI입니다. 이 URI를 사용하여 엔드포인트의 프로젝트, 모델 및 로그에 대한 세부 정보를 가져옵니다. 또한 이 URI를 사용하여 엔드포인트를 업데이트합니다.

엔드포인트와 관련된 Speech CLI 도움말을 보려면 다음 명령을 실행합니다.

spx help csr endpoint

엔드포인트를 만들고 모델을 배포하려면 음성 텍스트 변환 REST APIEndpoints_Create 작업을 사용합니다. 다음 지침에 따라 요청 본문을 생성합니다.

  • project 속성을 기존 프로젝트의 URI로 설정합니다. Speech Studio에서도 엔드포인트를 보고 관리할 수 있도록 이렇게 하는 것이 좋습니다. Projects_List 요청을 수행하여 사용 가능한 프로젝트를 가져올 수 있습니다.
  • 필수 model 속성을 엔드포인트에 배포하려는 모델의 URI로 설정합니다.
  • 필수 locale 속성을 설정합니다. 엔드포인트 로캘은 모델의 로캘과 일치해야 합니다. 로캘은 나중에 변경할 수 없습니다.
  • 필수 displayName 속성을 설정합니다. 이는 Speech Studio에 표시되는 이름입니다.
  • 필요에 따라 properties 내에서 loggingEnabled 속성을 설정할 수 있습니다. 엔드포인트 트래픽의 오디오 및 진단 로깅을 사용하도록 설정하려면 이 매개 변수를 true로 설정합니다. 기본값은 false입니다.

다음 Endpoints_Create 예제와 같이 URI를 사용하여 HTTP POST 요청을 수행합니다. YourSubscriptionKey를 Speech 리소스 키로 바꾸고, YourServiceRegion을 Speech 리소스 영역으로 바꾸고, 앞에서 설명한 대로 요청 본문 속성을 설정합니다.

curl -v -X POST -H "Ocp-Apim-Subscription-Key: YourSubscriptionKey" -H "Content-Type: application/json" -d '{
  "project": {
    "self": "https://eastus.api.cognitive.microsoft.com/speechtotext/v3.1/projects/d40f2eb8-1abf-4f72-9008-a5ae8add82a4"
  },
  "properties": {
    "loggingEnabled": true
  },
  "displayName": "My Endpoint",
  "description": "My Endpoint Description",
  "model": {
    "self": "https://eastus.api.cognitive.microsoft.com/speechtotext/v3.1/models/base/ae8d1643-53e4-4554-be4c-221dcfb471c5"
  },
  "locale": "en-US",
}'  "https://YourServiceRegion.api.cognitive.microsoft.com/speechtotext/v3.1/endpoints"

응답 본문은 다음 형식으로 표시되어야 합니다.

{
  "self": "https://eastus.api.cognitive.microsoft.com/speechtotext/v3.1/endpoints/98375aaa-40c2-42c4-b65c-f76734fc7790",
  "model": {
    "self": "https://eastus.api.cognitive.microsoft.com/speechtotext/v3.1/models/base/ae8d1643-53e4-4554-be4c-221dcfb471c5"
  },
  "links": {
    "logs": "https://eastus.api.cognitive.microsoft.com/speechtotext/v3.1/endpoints/98375aaa-40c2-42c4-b65c-f76734fc7790/files/logs",
    "restInteractive": "https://eastus.stt.speech.microsoft.com/speech/recognition/interactive/cognitiveservices/v1?cid=98375aaa-40c2-42c4-b65c-f76734fc7790",
    "restConversation": "https://eastus.stt.speech.microsoft.com/speech/recognition/conversation/cognitiveservices/v1?cid=98375aaa-40c2-42c4-b65c-f76734fc7790",
    "restDictation": "https://eastus.stt.speech.microsoft.com/speech/recognition/dictation/cognitiveservices/v1?cid=98375aaa-40c2-42c4-b65c-f76734fc7790",
    "webSocketInteractive": "wss://eastus.stt.speech.microsoft.com/speech/recognition/interactive/cognitiveservices/v1?cid=98375aaa-40c2-42c4-b65c-f76734fc7790",
    "webSocketConversation": "wss://eastus.stt.speech.microsoft.com/speech/recognition/conversation/cognitiveservices/v1?cid=98375aaa-40c2-42c4-b65c-f76734fc7790",
    "webSocketDictation": "wss://eastus.stt.speech.microsoft.com/speech/recognition/dictation/cognitiveservices/v1?cid=98375aaa-40c2-42c4-b65c-f76734fc7790"
  },
  "project": {
    "self": "https://eastus.api.cognitive.microsoft.com/speechtotext/v3.1/projects/d40f2eb8-1abf-4f72-9008-a5ae8add82a4"
  },
  "properties": {
    "loggingEnabled": true
  },
  "lastActionDateTime": "2022-05-19T15:27:51Z",
  "status": "NotStarted",
  "createdDateTime": "2022-05-19T15:27:51Z",
  "locale": "en-US",
  "displayName": "My Endpoint",
  "description": "My Endpoint Description"
}

응답 본문의 최상위 self 속성은 엔드포인트의 URI입니다. 이 URI를 사용하여 엔드포인트의 프로젝트, 모델 및 로그에 대한 세부 정보를 가져옵니다. 또한 이 URI를 사용하여 엔드포인트를 업데이트하거나 삭제합니다.

모델 변경 및 엔드포인트 재배포

동일한 음성 리소스에서 만든 다른 모델을 사용하도록 엔드포인트를 업데이트할 수 있습니다. 앞에서 설명한 것처럼 모델이 만료되기 전에 엔드포인트의 모델을 업데이트해야 합니다.

새 모델을 사용하고 사용자 지정 엔드포인트를 다시 배포하려면 다음을 수행합니다.

  1. Speech Studio에 로그인합니다.
  2. 사용자 지정 음성> 내 프로젝트 이름 >모델 배포를 선택합니다.
  3. 이름으로 엔드포인트에 대한 링크를 선택한 다음, 모델 변경을 선택합니다.
  4. 엔드포인트에서 사용할 새 모델을 선택합니다.
  5. 완료를 선택하여 엔드포인트를 저장하고 다시 배포합니다.

새 모델을 사용하여 사용자 지정 엔드포인트를 다시 배포하려면 spx csr model update 명령을 사용합니다. 다음 지침에 따라 요청 매개 변수를 생성합니다.

  • 필수 endpoint 매개 변수를 배포하려는 엔드포인트의 ID로 설정합니다.
  • 필수 model 매개 변수를 엔드포인트에 배포하려는 모델의 ID로 설정합니다.

새 모델을 사용하여 사용자 지정 엔드포인트를 다시 배포하는 Speech CLI 명령 예제는 다음과 같습니다.

spx csr endpoint update --api-version v3.1 --endpoint YourEndpointId --model YourModelId

응답 본문은 다음 형식으로 표시되어야 합니다.

{
  "self": "https://eastus.api.cognitive.microsoft.com/speechtotext/v3.1/endpoints/98375aaa-40c2-42c4-b65c-f76734fc7790",
  "model": {
    "self": "https://eastus.api.cognitive.microsoft.com/speechtotext/v3.1/models/1e47c19d-12ca-4ba5-b177-9e04bd72cf98"
  },
  "links": {
    "logs": "https://eastus.api.cognitive.microsoft.com/speechtotext/v3.1/endpoints/98375aaa-40c2-42c4-b65c-f76734fc7790/files/logs",
    "restInteractive": "https://eastus.stt.speech.microsoft.com/speech/recognition/interactive/cognitiveservices/v1?cid=98375aaa-40c2-42c4-b65c-f76734fc7790",
    "restConversation": "https://eastus.stt.speech.microsoft.com/speech/recognition/conversation/cognitiveservices/v1?cid=98375aaa-40c2-42c4-b65c-f76734fc7790",
    "restDictation": "https://eastus.stt.speech.microsoft.com/speech/recognition/dictation/cognitiveservices/v1?cid=98375aaa-40c2-42c4-b65c-f76734fc7790",
    "webSocketInteractive": "wss://eastus.stt.speech.microsoft.com/speech/recognition/interactive/cognitiveservices/v1?cid=98375aaa-40c2-42c4-b65c-f76734fc7790",
    "webSocketConversation": "wss://eastus.stt.speech.microsoft.com/speech/recognition/conversation/cognitiveservices/v1?cid=98375aaa-40c2-42c4-b65c-f76734fc7790",
    "webSocketDictation": "wss://eastus.stt.speech.microsoft.com/speech/recognition/dictation/cognitiveservices/v1?cid=98375aaa-40c2-42c4-b65c-f76734fc7790"
  },
  "project": {
    "self": "https://eastus.api.cognitive.microsoft.com/speechtotext/v3.1/projects/639d5280-8995-40cc-9329-051fd0fddd46"
  },
  "properties": {
    "loggingEnabled": true
  },
  "lastActionDateTime": "2022-05-19T23:01:34Z",
  "status": "NotStarted",
  "createdDateTime": "2022-05-19T15:41:27Z",
  "locale": "en-US",
  "displayName": "My Endpoint",
  "description": "My Updated Endpoint Description"
}

엔드포인트와 관련된 Speech CLI 도움말을 보려면 다음 명령을 실행합니다.

spx help csr endpoint

새 모델을 사용하여 사용자 지정 엔드포인트를 다시 배포하려면 음성 텍스트 변환 REST APIEndpoints_Update 작업을 사용합니다. 다음 지침에 따라 요청 본문을 생성합니다.

  • model 속성을 엔드포인트에 배포하려는 모델의 URI로 설정합니다.

다음 예제와 같이 URI를 사용하여 HTTP PATCH 요청을 만듭니다. YourSubscriptionKey를 Speech 리소스 키로 바꾸고, YourServiceRegion을 Speech 리소스 지역으로 바꾸고, YourEndpointId를 엔드포인트 ID로 바꾸고, 앞에서 설명한 대로 요청 본문 속성을 설정합니다.

curl -v -X PATCH -H "Ocp-Apim-Subscription-Key: YourSubscriptionKey" -H "Content-Type: application/json" -d '{
  "model": {
    "self": "https://eastus.api.cognitive.microsoft.com/speechtotext/v3.1/models/1e47c19d-12ca-4ba5-b177-9e04bd72cf98"
  }
}'  "https://YourServiceRegion.api.cognitive.microsoft.com/speechtotext/v3.1/endpoints/YourEndpointId"

응답 본문은 다음 형식으로 표시되어야 합니다.

{
  "self": "https://eastus.api.cognitive.microsoft.com/speechtotext/v3.1/endpoints/98375aaa-40c2-42c4-b65c-f76734fc7790",
  "model": {
    "self": "https://eastus.api.cognitive.microsoft.com/speechtotext/v3.1/models/1e47c19d-12ca-4ba5-b177-9e04bd72cf98"
  },
  "links": {
    "logs": "https://eastus.api.cognitive.microsoft.com/speechtotext/v3.1/endpoints/98375aaa-40c2-42c4-b65c-f76734fc7790/files/logs",
    "restInteractive": "https://eastus.stt.speech.microsoft.com/speech/recognition/interactive/cognitiveservices/v1?cid=98375aaa-40c2-42c4-b65c-f76734fc7790",
    "restConversation": "https://eastus.stt.speech.microsoft.com/speech/recognition/conversation/cognitiveservices/v1?cid=98375aaa-40c2-42c4-b65c-f76734fc7790",
    "restDictation": "https://eastus.stt.speech.microsoft.com/speech/recognition/dictation/cognitiveservices/v1?cid=98375aaa-40c2-42c4-b65c-f76734fc7790",
    "webSocketInteractive": "wss://eastus.stt.speech.microsoft.com/speech/recognition/interactive/cognitiveservices/v1?cid=98375aaa-40c2-42c4-b65c-f76734fc7790",
    "webSocketConversation": "wss://eastus.stt.speech.microsoft.com/speech/recognition/conversation/cognitiveservices/v1?cid=98375aaa-40c2-42c4-b65c-f76734fc7790",
    "webSocketDictation": "wss://eastus.stt.speech.microsoft.com/speech/recognition/dictation/cognitiveservices/v1?cid=98375aaa-40c2-42c4-b65c-f76734fc7790"
  },
  "project": {
    "self": "https://eastus.api.cognitive.microsoft.com/speechtotext/v3.1/projects/639d5280-8995-40cc-9329-051fd0fddd46"
  },
  "properties": {
    "loggingEnabled": true
  },
  "lastActionDateTime": "2022-05-19T23:01:34Z",
  "status": "NotStarted",
  "createdDateTime": "2022-05-19T15:41:27Z",
  "locale": "en-US",
  "displayName": "My Endpoint",
  "description": "My Updated Endpoint Description"
}

재배포를 완료하려면 몇 분이 걸립니다. 그 동안 엔드포인트는 서비스를 중단하지 않고 이전 모델을 사용합니다.

로깅 데이터 보기

로깅 데이터는 엔드포인트를 만드는 동안 구성한 경우 내보낼 수 있습니다.

엔드포인트 로그를 다운로드하려면 다음을 수행합니다.

  1. Speech Studio에 로그인합니다.
  2. Custom Speech> 내 프로젝트 이름 >모델 배포를 선택합니다.
  3. 엔드포인트 이름으로 링크를 선택합니다.
  4. 콘텐츠 로깅에서 로그 다운로드를 선택합니다.

엔드포인트에 대한 로그를 가져오려면 spx csr endpoint list 명령을 사용합니다. 다음 지침에 따라 요청 매개 변수를 생성합니다.

  • 필수 endpoint 매개 변수를 로그를 가져오려는 엔드포인트의 ID로 설정합니다.

엔드포인트에 대한 로그를 가져오는 Speech CLI 명령 예제는 다음과 같습니다.

spx csr endpoint list --api-version v3.1 --endpoint YourEndpointId

자세한 내용이 포함된 각 로그 파일의 위치가 응답 본문에 반환됩니다.

엔드포인트에 대한 로그를 가져오려면 먼저 음성 텍스트 변환 REST APIEndpoints_Get 작업을 사용하여 시작합니다.

다음 예제와 같이 URI를 사용하여 HTTP GET 요청을 만듭니다. YourEndpointId를 엔드포인트 ID로 바꾸고, YourSubscriptionKey를 음성 리소스 키로 바꾸고, YourServiceRegion을 음성 리소스 지역으로 바꿉니다.

curl -v -X GET "https://YourServiceRegion.api.cognitive.microsoft.com/speechtotext/v3.1/endpoints/YourEndpointId" -H "Ocp-Apim-Subscription-Key: YourSubscriptionKey"

응답 본문은 다음 형식으로 표시되어야 합니다.

{
  "self": "https://eastus.api.cognitive.microsoft.com/speechtotext/v3.1/endpoints/98375aaa-40c2-42c4-b65c-f76734fc7790",
  "model": {
    "self": "https://eastus.api.cognitive.microsoft.com/speechtotext/v3.1/models/1e47c19d-12ca-4ba5-b177-9e04bd72cf98"
  },
  "links": {
    "logs": "https://eastus.api.cognitive.microsoft.com/speechtotext/v3.1/endpoints/98375aaa-40c2-42c4-b65c-f76734fc7790/files/logs",
    "restInteractive": "https://eastus.stt.speech.microsoft.com/speech/recognition/interactive/cognitiveservices/v1?cid=98375aaa-40c2-42c4-b65c-f76734fc7790",
    "restConversation": "https://eastus.stt.speech.microsoft.com/speech/recognition/conversation/cognitiveservices/v1?cid=98375aaa-40c2-42c4-b65c-f76734fc7790",
    "restDictation": "https://eastus.stt.speech.microsoft.com/speech/recognition/dictation/cognitiveservices/v1?cid=98375aaa-40c2-42c4-b65c-f76734fc7790",
    "webSocketInteractive": "wss://eastus.stt.speech.microsoft.com/speech/recognition/interactive/cognitiveservices/v1?cid=98375aaa-40c2-42c4-b65c-f76734fc7790",
    "webSocketConversation": "wss://eastus.stt.speech.microsoft.com/speech/recognition/conversation/cognitiveservices/v1?cid=98375aaa-40c2-42c4-b65c-f76734fc7790",
    "webSocketDictation": "wss://eastus.stt.speech.microsoft.com/speech/recognition/dictation/cognitiveservices/v1?cid=98375aaa-40c2-42c4-b65c-f76734fc7790"
  },
  "project": {
    "self": "https://eastus.api.cognitive.microsoft.com/speechtotext/v3.1/projects/2f78cdb7-58ac-4bd9-9bc6-170e31483b26"
  },
  "properties": {
    "loggingEnabled": true
  },
  "lastActionDateTime": "2022-05-19T23:41:05Z",
  "status": "Succeeded",
  "createdDateTime": "2022-05-19T23:41:05Z",
  "locale": "en-US",
  "displayName": "My Endpoint",
  "description": "My Updated Endpoint Description"
}

이전 응답 본문의 "logs" URI를 사용하여 HTTP GET 요청을 수행합니다. YourEndpointId를 엔드포인트 ID로 바꾸고, YourSubscriptionKey를 음성 리소스 키로 바꾸고, YourServiceRegion을 음성 리소스 지역으로 바꿉니다.

curl -v -X GET "https://YourServiceRegion.api.cognitive.microsoft.com/speechtotext/v3.1/endpoints/YourEndpointId/files/logs" -H "Ocp-Apim-Subscription-Key: YourSubscriptionKey"

자세한 내용이 포함된 각 로그 파일의 위치가 응답 본문에 반환됩니다.

로깅 데이터는 Microsoft 소유 스토리지에서 30일 동안 사용할 수 있으며, 그 후에 제거됩니다. 고객 소유 스토리지 계정이 Azure AI 서비스 구독에 연결된 경우 로깅 데이터는 자동으로 삭제되지 않습니다.

다음 단계