

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

# 텍스트 파일을 사용하여 사용자 지정 의학 어휘 생성
<a name="create-med-custom-vocabulary"></a>

사용자 지정 어휘를 생성하려면 단어 또는 문구 모음이 포함된 텍스트 파일을 준비해야 합니다. Amazon Transcribe Medical은이 텍스트 파일을 사용하여 해당 단어 또는 문구의 트랜스크립션 정확도를 개선하는 데 사용할 수 있는 사용자 지정 어휘를 생성합니다. [https://docs.aws.amazon.com/transcribe/latest/APIReference/API_CreateMedicalVocabulary.html](https://docs.aws.amazon.com/transcribe/latest/APIReference/API_CreateMedicalVocabulary.html) API 또는 Amazon Transcribe Medical 콘솔을 사용하여 사용자 지정 어휘를 생성할 수 있습니다.

## AWS Management Console
<a name="create-med-custom-vocab-console"></a>

 AWS Management Console 를 사용하여 사용자 지정 어휘를 생성하려면 단어 또는 문구가 포함된 텍스트 파일의 Amazon S3 URI를 제공합니다.

1. [AWS Management Console](https://console.aws.amazon.com/transcribe/)에 로그인합니다.

1. 탐색 창의 Amazon Transcribe Medical에서 **사용자 지정 어휘를** 선택합니다.

1. **이름**의 경우 **어휘 설정**에서 사용자 지정 어휘의 이름을 선택합니다.

1.  Amazon S3에서 오디오 파일 또는 비디오 파일의 위치를 지정합니다.
   + **어휘 설정**의 **S3의 어휘 입력 파일 위치**에서 사용자 지정 어휘를 생성하는 데 사용할 텍스트 파일을 식별하는 Amazon S3 URI를 지정합니다.
   + **S3의 어휘 입력 파일 위치**에서 **Browse S3**를 선택하여 텍스트 파일을 찾아 선택합니다.

1. **어휘 생성**을 선택합니다.

 AWS Management Console에서 사용자 지정 어휘의 처리 상태를 확인할 수 있습니다.

## API
<a name="create-med-custom-vocab-api"></a>

**사용자 지정 의학 어휘를 생성하려면(API)**
+ [https://docs.aws.amazon.com/transcribe/latest/APIReference/API_StartTranscriptionJob.html](https://docs.aws.amazon.com/transcribe/latest/APIReference/API_StartTranscriptionJob.html) API의 경우 다음을 지정하세요.

  1. `LanguageCode`에서 `en-US`를 지정합니다.

  1. 에서 사용자 지정 어휘를 정의하는 데 사용하는 텍스트 파일의 Amazon S3 위치를 `VocabularyFileUri`지정합니다.

  1. `VocabularyName`에서 사용자 지정 어휘의 이름을 지정합니다. 지정하는 이름은 내에서 고유해야 합니다 AWS 계정.

사용자 지정 어휘의 처리 상태를 보려면 [https://docs.aws.amazon.com/transcribe/latest/APIReference/API_GetMedicalVocabulary.html](https://docs.aws.amazon.com/transcribe/latest/APIReference/API_GetMedicalVocabulary.html) API를 사용하세요.

다음은를 사용하여 사용자 지정 어휘를 AWS SDK for Python (Boto3) 생성하는 요청의 예입니다.

```
from __future__ import print_function
import time
import boto3  
transcribe = boto3.client('transcribe', 'us-west-2')
vocab_name = "my-first-vocabulary"
response = transcribe.create_medical_vocabulary(
    VocabularyName = job_name,
    VocabularyFileUri = 's3://amzn-s3-demo-bucket/my-vocabularies/my-vocabulary-table.txt'
    LanguageCode = 'en-US',
  )
  
while True:
    status = transcribe.get_medical_vocabulary(VocabularyName = vocab_name)
    if status['VocabularyState'] in ['READY', 'FAILED']:
        break
    print("Not ready yet...")
    time.sleep(5)
print(status)
```

## AWS CLI
<a name="create-med-custom-vocab-cli"></a>

**배치 트랜스크립션 작업에서 화자 파티셔닝을 활성화하려면(AWS CLI)**
+ 다음 코드를 실행합니다.

  ```
  aws transcribe create-medical-vocabulary \
  --vocabulary-name my-first-vocabulary \ 
  --vocabulary-file-uri s3://amzn-s3-demo-bucket/my-vocabularies/my-vocabulary-file.txt \
  --language-code en-US
  ```