

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

# Amazon Transcribe Medical
<a name="transcribe-medical"></a>

Amazon Transcribe Medical은 의사가 구술한 메모, 약물 안전 모니터링, 원격 진료 예약 또는 의사와 환자의 대화 등 의료 관련 음성을 트랜스크립션하려는 의료 전문가를 위해 설계된 자동 음성 인식(ASR) 서비스입니다. Amazon Transcribe Medical은 실시간 스트리밍(마이크 사용) 또는 업로드된 파일의 트랜스크립션(배치)을 통해 제공됩니다.

**중요**  
Amazon Transcribe Medical은 전문적인 의학적 조언, 진단 또는 치료를 대체할 수 없습니다. 사용 사례에 적합한 신뢰 임계값을 식별하고, 높은 정확도가 필요한 상황에서는 높은 신뢰 임계값을 사용합니다. 특정 사용 사례의 경우 적절한 교육을 받은 인간 검토자가 결과를 검토하고 확인해야 합니다. Amazon Transcribe Medical 트랜스크립션은 숙련된 의료 전문가로부터 정확성과 적절한 의학적 판단을 검토받은 후 환자 치료 시나리오에서만 사용해야 합니다.

Amazon Transcribe Medical은 공동 책임 모델에 따라 운영됩니다. 이에 따라 AWS는 Amazon Transcribe Medical을 실행하는 인프라를 보호할 책임이 있으며 사용자는 데이터를 관리할 책임이 있습니다. 자세한 내용은 [공동 책임 모델](https://aws.amazon.com/compliance/shared-responsibility-model/)을 참조하세요.

Amazon Transcribe Medical은 미국 영어(en-US)로 제공됩니다.

최상의 결과를 얻으려면 FLAC 또는 WAV와 같은 PCM 16비트 인코딩의 무손실 오디오 형식을 사용하세요. Amazon Transcribe Medical은 16,000Hz 이상의 샘플링 레이트를 지원합니다.

트랜스크립트 분석에는 [Amazon Comprehend 의료](https://docs.aws.amazon.com/comprehend/latest/dg/comprehend-medical.html) 등의 다른 AWS 서비스를 사용할 수 있습니다.


**지원되는 전문 분야**  

| 전문 분야 | 하위 전문 분야 | 오디오 입력 | 
| --- | --- | --- | 
| 심장학 | 없음 | 스트리밍만 해당 | 
| 신경학 | 없음 | 스트리밍만 해당 | 
| 종양학 | 없음 | 스트리밍만 해당 | 
| 1차 의료 | 가정의학 | 배치, 스트리밍 | 
| 1차 의료 | 내과학 | 배치, 스트리밍 | 
| 1차 의료 | 산부인과학 | 배치, 스트리밍 | 
| 1차 의료 | 소아과학 | 배치, 스트리밍 | 
| 방사선학 | 없음 | 스트리밍만 해당 | 
| 비뇨기과 | 없음 | 스트리밍만 해당 | 

## 리전 가용성 및 할당량
<a name="med-regions"></a>

Call Analytics는 다음 AWS 리전에서 지원됩니다.


| **리전** | **트랜스크립션 유형** | 
| --- | --- | 
| af-south-1(케이프타운) | 일괄 | 
| ap-east-1(홍콩) | 일괄 | 
| ap-northeast-1(도쿄) | 배치, 스트리밍 | 
| ap-northeast-2(서울) | 배치, 스트리밍 | 
| ap-south-1(뭄바이) | 일괄 | 
| ap-southeast-1(싱가포르) | 일괄 | 
| ap-southeast-2(시드니) | 배치, 스트리밍 | 
| ca-central-1(캐나다, 중부) | 배치, 스트리밍 | 
| eu-central-1(프랑크푸르트) | 배치, 스트리밍 | 
| eu-north-1(스톡홀름) | 일괄 | 
| eu-west-1(아일랜드) | 배치, 스트리밍 | 
| eu-west-2(런던) | 배치, 스트리밍 | 
| eu-west-3(파리) | 일괄 | 
| me-south-1(바레인) | 일괄 | 
| sa-east-1(상파울루) | 배치, 스트리밍 | 
| us-east-1(버지니아 북부) | 배치, 스트리밍 | 
| us-east-2(오하이오) | 배치, 스트리밍 | 
| us-gov-east-1(GovCloud, 미국 동부) | 배치, 스트리밍 | 
| us-gov-west-1,(GovCloud, 미국 서부) | 배치, 스트리밍 | 
| us-west-1(샌프란시스코) | 일괄 | 
| us-west-2(오리건) | 배치, 스트리밍 | 

[Amazon Transcribe](what-is.md#tsc-regions), Amazon Transcribe Medical 및 [Call Analytics](call-analytics.md#tca-regions)에 대한 리전 지원은 다릅니다. .

지원되는 각 리전에 대한 엔드포인트를 얻으려면 *AWS 일반 참조*의 [서비스 엔드포인트](https://docs.aws.amazon.com/general/latest/gr/transcribe.html#transcribe_region)를 참조하세요.

트랜스크립션과 관련된 할당량 목록은 *AWS 일반 참조*의 [서비스 할당량을](https://docs.aws.amazon.com/general/latest/gr/transcribe.html#limits-amazon-transcribe) 참조하세요. 일부 할당량은 요청 시 변경될 수 있습니다. **조정 가능** 열에 '**예**'가 포함된 경우 증가를 요청할 수 있습니다. 이렇게 하려면 제공된 링크를 선택합니다.

# 의료 전문 분야 및 용어
<a name="how-it-works-med"></a>

의료 트랜스크립션 작업을 생성할 때 소스 파일의 언어, 의료 전문 분야 및 오디오 유형을 지정합니다. 언어 및 `PRIMARYCARE` 의료 전문 분야로 미국 영어(en-US)를 입력합니다. 1차 진료를 값으로 입력하면 다음 의학 전문 분야의 소스 오디오에서 트랜스크립션을 생성할 수 있습니다.
+ 가정의학
+ 내과학
+ 산부인과학
+ 소아과학

오디오 유형에 맞게 구술 및 대화 중에서 선택할 수 있습니다. 의사가 환자 방문 또는 절차에 대한 보고서를 제공하는 오디오 파일의 경우 구술을 선택합니다. 의사와 환자 간의 대화 또는 의사 간의 대화가 포함된 오디오 파일의 경우 대화를 선택합니다.

트랜스크립션 작업의 출력을 저장하려면 이미 생성한 Amazon S3 버킷을 선택합니다. Amazon S3 버킷에 대한 자세한 내용은 [시작하기를 Amazon Simple Storage Service](https://docs.aws.amazon.com/AmazonS3/latest/gsg/GetStartedWithS3.html)참조하세요.

다음은 샘플 JSON에 입력할 요청 파라미터의 최소 수입니다.

```
{
   "MedicalTranscriptionJobName": "my-first-transcription-job",
   "LanguageCode": "en-US",
   "Media": {
       "MediaFileUri": "s3://path to your audio file"
   },
   "OutputBucketName": “your output bucket name",
   "Specialty": "PRIMARYCARE",
   "Type": "CONVERSATION"
}
```

Amazon Transcribe Medical을 사용하면 대체 트랜스크립션을 생성할 수 있습니다. 자세한 내용은 [대체 트랜스크립션 생성](alternative-med-transcriptions.md) 단원을 참조하십시오.

화자 파티셔닝을 활성화하거나 오디오에서 채널을 식별할 수도 있습니다. 자세한 내용은 [화자 파티셔닝 활성화](conversation-diarization-med.md) 및 [다중 채널 오디오 트랜스크립션](conversation-channel-id-med.md) 섹션을 참조하세요.

# 의학 용어 및 측정치 트랜스크립션
<a name="how-measurements-med"></a>

Amazon Transcribe Medical은 의학 용어 및 측정값을 트랜스크립션할 수 있습니다. Amazon Transcribe 의학은 말한 용어의 약어를 출력합니다. 예를 들어 “blood pressure”는 BP로 트랜스크립션됩니다. Amazon Transcribe Medical이 의료 용어 및 측정에 사용하는 규칙 목록은이 페이지의 표에서 확인할 수 있습니다. *Spoken Term(발언한 용어)* 열은 소스 오디오에서 말한 용어를 나타냅니다. *Output(출력)* 열은 트랜스크립션 결과에 표시되는 약어를 나타냅니다.

소스 오디오에서 말한 용어가 여기의 트랜스크립션 출력과 어떻게 일치하는지 확인할 수 있습니다.


| 소스 오디오에서 말한 용어 | 출력에 사용되는 약어 |  출력 예시 | 
| --- | --- | --- | 
| Centigrade | C | The patient's temperature is 37.4 C.(환자의 체온은 37.4C입니다.) | 
| Celsius | C | The patient's temperature is 37.4 C.(환자의 체온은 37.4C입니다.) | 
| Fahrenheit | F | The patient's temperature is 101 F.(환자의 체온은 101F입니다.) | 
| grams | g | A mass of 100 g was extracted from the patient.(환자에게서 100g의 질량을 추출했습니다.) | 
| meters | m | The patient is 1.8 m tall.(환자의 키는 1.8m입니다.) | 
| feet | ft | The patient is 6 ft tall.(환자는 키는 6ft입니다.) | 
| kilos | kg | The patient weighs 80 kg.(환자의 체중은 80kg입니다.) | 
| kilograms | kg | The patient weighs 80 kg.(환자의 체중은 80kg입니다.) | 
| c c | cc | Patient received 100 cc of saline solution.(환자는 100cc의 식염수를 수령했습니다.) | 
| cubic centimeter | cc | Patient received 100 cc of saline solution.(환자는 100cc의 식염수를 수령했습니다.) | 
| milliliter | mL | Patient excreted 100 mL urine.(환자는 100mL의 소변을 배설했습니다.) | 
| blood pressure | BP | Patient BP was elevated.(환자의 BP가 상승했습니다.) | 
| b p | BP | Patient BP was elevated.(환자의 BP가 상승했습니다.) | 
| X over Y | X/Y | Patient BP was 120/80.(환자의 BP는 120/80이었습니다.) | 
| beats per min | BPM | Patient had atrial fibrillation with heart rate of 160 BPM.(환자는 160BPM의 심박수로 심방 세동이 있었습니다.) | 
| beats per minute | BPM | Patient had atrial fibrillation with heart rate of 160 BPM.(환자는 160BPM의 심박수로 심방 세동이 있었습니다.) | 
| O 2 | O2 | Patient O2 saturation was 98%.(환자의 O2 포화도는 98%였습니다.) | 
| CO2 | CO2 | Patient required respiratory support for elevated CO2.(환자는 상승된 CO2로 인해 호흡기 지원이 필요했습니다.) | 
| post operation | POSTOP | Patient came for POSTOP evaluation.(환자가 POSTOP 평가를 위해 방문했습니다.) | 
| post op | POSTOP | Patient came for POSTOP evaluation.(환자가 POSTOP 평가를 위해 방문했습니다.) | 
| cat scan | CT Scan | Patient indication of cerebral hemorrhage required use of CT Scan.(뇌출혈 환자였기 때문에 CT 스캔 사용이 필요했습니다.) | 
| Pulse 80 | P 80 | Patient vitals were P 80, R 17,...(환자의 바이탈은 P 80, R 17 등이었습니다.) | 
| Respiration 17 | R 17 | Patient vitals were P 80, R 17,...(환자의 바이탈은 P 80, R 17 등이었습니다.) | 
| in and out | I/O | Patient was I/O sinus rhythm.(환자는 I/O 부비동 리듬이었습니다.) | 
| L five | L5 | Lumbar puncture was performed between L4 and L5.(L4와 L5 사이에서 요추 천자가 수행되었습니다.) | 

# 번호 트랜스크립션
<a name="how-numbers-med"></a>

Amazon Transcribe Medical은 숫자를 단어 대신 숫자로 트랜스크립션합니다. 예를 들어 숫자 "천 이백 사십 이"를 말하면 `1242`로 트랜스크립션됩니다.

숫자는 다음 규칙에 따라 트랜스크립션됩니다.


| 규칙 | 설명 | 
| --- | --- | 
| 10보다 큰 기수를 숫자로 변환합니다. |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ko_kr/transcribe/latest/dg/how-numbers-med.html)  | 
| “million” 또는 “billion” 뒤에 숫자가 오지 않는 경우 뒤에 “million” 또는 “billion”이 있는 기수를 숫자로 변환합니다. |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ko_kr/transcribe/latest/dg/how-numbers-med.html)  | 
|  10보다 큰 서수를 숫자로 변환합니다.  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ko_kr/transcribe/latest/dg/how-numbers-med.html)  | 
|  분수를 숫자 형식으로 변환합니다.  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ko_kr/transcribe/latest/dg/how-numbers-med.html)  | 
| 행에 하나 이상의 자릿수가 10 미만으로 숫자로 변환합니다. |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ko_kr/transcribe/latest/dg/how-numbers-med.html)  | 
| 소수점은 "점"으로 표시됩니다. |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ko_kr/transcribe/latest/dg/how-numbers-med.html)  | 
|  숫자 뒤의 "percent" 단어를 백분율 기호(%)로 변환합니다.  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ko_kr/transcribe/latest/dg/how-numbers-med.html)  | 
|  숫자 뒤의 "dollar," "US dollar," "Australian dollar, "AUD" 또는 "USD" 단어를 숫자 앞에 달러 기호로 변환합니다.  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ko_kr/transcribe/latest/dg/how-numbers-med.html)  | 
|  “pounds” 또는 “milligrams” 단어를 각각 “lbs”또는 “mg”로 변환합니다.  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ko_kr/transcribe/latest/dg/how-numbers-med.html)  | 
|  숫자 뒤의 "rupees," "Indian rupees" 또는 "INR" 단어를 숫자 앞의 루피 기호(₹)로 변환합니다.  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ko_kr/transcribe/latest/dg/how-numbers-med.html)  | 
|  시간을 숫자로 변환합니다.  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ko_kr/transcribe/latest/dg/how-numbers-med.html)  | 
|  연도를 두 자리에서 네 자리로 표현합니다. 20세기, 21세기, 22세기에 한해 유효합니다.  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ko_kr/transcribe/latest/dg/how-numbers-med.html)  | 
| 날짜를 숫자로 변환합니다. |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ko_kr/transcribe/latest/dg/how-numbers-med.html)  | 
|  숫자의 범위를 "to" 단어로 구분합니다.  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ko_kr/transcribe/latest/dg/how-numbers-med.html)  | 

# 의료 대화 트랜스크립션
<a name="transcribe-medical-conversation"></a>

 Amazon Transcribe Medical을 사용하여 배치 트랜스크립션 작업 또는 실시간 스트림을 사용하여 임상의와 환자 간의 의료 대화를 트랜스크립션할 수 있습니다. 배치 트랜스크립션 작업을 사용하면 오디오 파일을 트랜스크립션할 수 있습니다. Amazon Transcribe Medical이 가능한 가장 높은 정확도로 트랜스크립션 결과를 생성하도록 하려면 트랜스크립션 작업 또는 스트림에 임상의의 의료 전문 분야를 지정해야 합니다.

다음 의료 전문 분야에 있는 임상의와 환자의 방문을 트랜스크립션할 수 있습니다.
+ 심장학 – 스트리밍 트랜스크립션으로만 사용 가능
+ 신경학 – 스트리밍 트랜스크립션으로만 사용 가능
+ 종양학 – 스트리밍 트랜스크립션으로만 사용 가능
+ 1차 의료 – 다음과 같은 유형의 의료 행위가 포함됩니다.
  + 가정의학
  + 내과학
  + 산부인과학
  + 소아과학
+ 비뇨기과 – 스트리밍 트랜스크립션으로만 사용 가능

사용자 지정 의학 어휘를 사용하여 트랜스크립션 정확도를 높일 수 있습니다. 사용자 지정 의학 어휘의 작동 방식에 대한 자세한 내용은 [사용자 지정 의학 어휘를 통한 트랜스크립션 정확도 향상](vocabulary-med.md) 섹션을 참조하세요.

기본적으로 Amazon Transcribe Medical은 신뢰도가 가장 높은 트랜스크립션을 반환합니다. 대체 트랜스크립션을 반환하도록 구성하려면 [대체 트랜스크립션 생성](alternative-med-transcriptions.md) 섹션을 참조하세요.

트랜스크립션 출력에 숫자 및 의료 측정치가 어떻게 표시되는지에 대한 자세한 내용은 [번호 트랜스크립션](how-numbers-med.md) 및 [의학 용어 및 측정치 트랜스크립션](how-measurements-med.md) 섹션을 참조하세요.

**Topics**
+ [의료 대화의 오디오 파일 트랜스크립션](batch-medical-conversation.md)
+ [의료 대화를 실시간 스트림으로 트랜스크립션](streaming-medical-conversation.md)
+ [화자 파티셔닝 활성화](conversation-diarization-med.md)
+ [다중 채널 오디오 트랜스크립션](conversation-channel-id-med.md)

# 의료 대화의 오디오 파일 트랜스크립션
<a name="batch-medical-conversation"></a>

배치 트랜스크립션 작업을 사용하면 의료 대화의 오디오 파일을 트랜스크립션할 수 있습니다. 이를 사용하면 임상의와 환자의 대화를 트랜스크립션할 수 있습니다. [https://docs.aws.amazon.com/transcribe/latest/APIReference/API_StartMedicalTranscriptionJob.html](https://docs.aws.amazon.com/transcribe/latest/APIReference/API_StartMedicalTranscriptionJob.html) API 또는 AWS Management Console에서 배치 트랜스크립션 작업을 시작할 수 있습니다.

[https://docs.aws.amazon.com/transcribe/latest/APIReference/API_StartMedicalTranscriptionJob.html](https://docs.aws.amazon.com/transcribe/latest/APIReference/API_StartMedicalTranscriptionJob.html) API로 의료 트랜스크립션 작업을 시작하는 경우 `Specialty` 파라미터의 값으로 `PRIMARYCARE`를 지정합니다.

## AWS Management Console
<a name="batch-med-conversation-console"></a>

**임상의와 환자의 대화를 트랜스크립션하려면(AWS Management Console)**

 AWS Management Console 를 사용하여 임상의-환자 대화를 트랜스크립션하려면 트랜스크립션 작업을 생성하고 **오디오 입력 유형에** 대한 **대화를** 선택합니다.

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

1. 탐색 창의 Amazon Transcribe Medical에서 **트랜스크립션 작업을** 선택합니다.

1. **작업 생성**을 선택합니다.

1. **DB 세부 정보 지정** 페이지의 **작업 설정**에서 다음을 지정합니다.

   1. **이름** - 트랜스크립션 작업의 이름

   1. **오디오 입력 유형** – **대화**

1. 나머지 필드에는 오디오 파일의 Amazon S3 위치와 트랜스크립션 작업의 출력을 저장할 위치를 지정합니다.

1. **다음**을 선택합니다.

1. **생성(Create)**을 선택합니다.

## API
<a name="batch-med-conversation-api"></a>

**배치 트랜스크립션 작업을 사용하여 의료 대화를 트랜스크립션하려면(API)**
+ [https://docs.aws.amazon.com/transcribe/latest/APIReference/API_StartMedicalTranscriptionJob.html](https://docs.aws.amazon.com/transcribe/latest/APIReference/API_StartMedicalTranscriptionJob.html) API의 경우 다음을 지정하세요.

  1. `MedicalTranscriptionJobName`에서 AWS 계정의 고유한 이름을 지정합니다.

  1. `LanguageCode`에는 오디오 파일에서 사용하는 언어와 어휘 필터의 언어에 해당하는 언어 코드를 지정합니다.

  1. `Media` 객체의 `MediaFileUri` 파라미터에서 트랜스크립션할 오디오 파일의 이름을 지정합니다.

  1. `Specialty`에는 오디오 파일에서 말하는 임상의의 전문 분야를 `PRIMARYCARE`로 지정합니다.

  1. `Type`에서 `CONVERSATION`를 지정합니다.

  1. `OutputBucketName`에서 트랜스크립션 결과를 저장할 Amazon S3 버킷을 지정합니다.

  다음은 AWS SDK for Python (Boto3) 를 사용하여 `PRIMARYCARE` 전문 임상의와 환자의 의료 대화를 트랜스크립션하는 요청의 예입니다.

  ```
  from __future__ import print_function
  import time
  import boto3
  transcribe = boto3.client('transcribe', 'us-west-2')
  job_name = "my-first-med-transcription-job"
  job_uri = "s3://amzn-s3-demo-bucket/my-input-files/my-audio-file.flac"
  transcribe.start_medical_transcription_job(
        MedicalTranscriptionJobName = job_name,
        Media = {
          'MediaFileUri': job_uri
        },
        OutputBucketName = 'amzn-s3-demo-bucket',
        OutputKey = 'output-files/',
        LanguageCode = 'en-US',
        Specialty = 'PRIMARYCARE',
        Type = 'CONVERSATION'
    )
  
  while True:
      status = transcribe.get_medical_transcription_job(MedicalTranscriptionJobName = job_name)
      if status['MedicalTranscriptionJob']['TranscriptionJobStatus'] in ['COMPLETED', 'FAILED']:
          break
      print("Not ready yet...")
      time.sleep(5)
  print(status)
  ```

다음 예시 코드는 임상의와 환자 간 대화의 트랜스크립션 결과를 보여줍니다.

```
{
    "jobName": "conversation-medical-transcription-job",
    "accountId": "111122223333",
    "results": {
        "transcripts": [
            {
                "transcript": "... come for a follow up visit today..."
            }
        ],
        "items": [
            {
            ...
                "start_time": "4.85",
                "end_time": "5.12",
                "alternatives": [
                    {
                        "confidence": "1.0",
                        "content": "come"
                    }
                ],
                "type": "pronunciation"
            },
            {
                "start_time": "5.12",
                "end_time": "5.29",
                "alternatives": [
                    {
                        "confidence": "1.0",
                        "content": "for"
                    }
                ],
                "type": "pronunciation"
            },
            {
                "start_time": "5.29",
                "end_time": "5.33",
                "alternatives": [
                    {
                        "confidence": "0.9955",
                        "content": "a"
                    }
                ],
                "type": "pronunciation"
            },
            {
                "start_time": "5.33",
                "end_time": "5.66",
                "alternatives": [
                    {
                        "confidence": "0.9754",
                        "content": "follow"
                    }
                ],
                "type": "pronunciation"
            },
            {
                "start_time": "5.66",
                "end_time": "5.75",
                "alternatives": [
                    {
                        "confidence": "0.9754",
                        "content": "up"
                    }
                ],
                "type": "pronunciation"
            },
            {
                "start_time": "5.75",
                "end_time": "6.02",
                "alternatives": [
                    {
                        "confidence": "1.0",
                        "content": "visit"
                    }
                ]
                ...
    },
    "status": "COMPLETED"
}
```

## AWS CLI
<a name="batch-med-conversation-cli"></a>

**배치 트랜스크립션 작업을 사용하여 의료 대화를 트랜스크립션하려면(AWS CLI)**
+ 다음 코드를 실행합니다.

  ```
                      
  aws transcribe start-medical-transcription-job \
  --region us-west-2 \
  --cli-input-json file://example-start-command.json
  ```

  다음 코드는 `example-start-command.json`의 내용을 보여줍니다.

  ```
  {
        "MedicalTranscriptionJobName": "my-first-med-transcription-job",        
        "Media": {
            "MediaFileUri": "s3://amzn-s3-demo-bucket/my-input-files/my-audio-file.flac"
        },
        "OutputBucketName": "amzn-s3-demo-bucket",
        "OutputKey": "my-output-files/", 
        "LanguageCode": "en-US",
        "Specialty": "PRIMARYCARE",
        "Type": "CONVERSATION"
    }
  ```

# 의료 대화를 실시간 스트림으로 트랜스크립션
<a name="streaming-medical-conversation"></a>

HTTP/2 또는 [WebSocket](https://tools.ietf.org/html/rfc6455) 프로토콜을 사용하여 의료 대화의 오디오 스트림을 트랜스크립션할 수 있습니다. WebSocket 프로토콜을 사용하여 스트림을 시작하는 방법에 대한 자세한 내용은 [WebSocket 스트림 설정](streaming-setting-up.md#streaming-websocket) 섹션을 참조하세요. HTTP/2 요청을 시작하려면 [https://docs.aws.amazon.com/transcribe/latest/APIReference/API_streaming_StartMedicalStreamTranscription.html](https://docs.aws.amazon.com/transcribe/latest/APIReference/API_streaming_StartMedicalStreamTranscription.html) API를 사용하세요.

다음 의료 전문 분야의 스트리밍 오디오를 트랜스크립션할 수 있습니다.
+ 심장학
+ 신경학
+ 종양학
+ 1차 의료
+ 비뇨기과

각 의료 전문 분야에는 다양한 유형의 시술과 예약이 포함됩니다. 따라서 임상의는 다양한 유형의 메모를 작성합니다. WebSocket 요청의 `specialty` URI 파라미터 값 또는 [https://docs.aws.amazon.com/transcribe/latest/APIReference/API_streaming_StartMedicalStreamTranscription.html](https://docs.aws.amazon.com/transcribe/latest/APIReference/API_streaming_StartMedicalStreamTranscription.html) API의 `Specialty` 파라미터를 지정하는 데 도움이 되는 지침으로 다음 예시를 사용하세요.
+ 전기생리학 또는 심장초음파 상담을 원하시면 `CARDIOLOGY`을 선택합니다.
+ 의학 종양학, 수술 종양학 또는 방사선 종양학 상담을 원하시면 `ONCOLOGY`을 선택합니다.
+ 일과성 허혈성 발작이나 뇌혈관 발작에 걸린 뇌졸중 환자에게 상담을 제공하는 의사를 원하시면 `NEUROLOGY`을 선택합니다.
+ 요실금 관련 상담을 원하시면 `UROLOGY`을 선택합니다.
+ 연간 검진 또는 긴급 진료 방문의 경우 `PRIMARYCARE`를 선택합니다.
+ 입원 환자 진찰의 경우 `PRIMARYCARE`를 선택합니다.
+ 불임, 난관 결찰, IUD 삽입 또는 낙태에 관한 상담을 원하시면 `PRIMARYCARE`를 선택합니다.

## AWS Management Console
<a name="streaming-medical-conversation-console"></a>

**스트리밍 의학 대화를 트랜스크립션하려면(AWS Management Console)**

 AWS Management Console 를 사용하여 실시간 스트림에서 임상의-환자 대화를 트랜스크립션하려면 의료 대화를 트랜스크립션하고 스트림을 시작하고 마이크에 말하기 시작하는 옵션을 선택합니다.

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

1. 탐색 창의 Amazon Transcribe Medical에서 실시간 트랜스**크**립션을 선택합니다.

1. **대화**를 선택합니다.

1. **의료 전문 분야**에서 임상의의 전문 분야를 선택합니다.

1. **스트리밍 시작**을 선택합니다.

1. 마이크에 대고 말합니다.

## 의료 대화를 HTTP/2 스트림으로 트랜스크립션
<a name="http2-med-conversation-streaming"></a>

다음은 HTTP/2 요청 파라미터의 구문입니다.

의료 대화의 HTTP/2 스트림을 트랜스크립션하려면 [https://docs.aws.amazon.com/transcribe/latest/APIReference/API_streaming_StartMedicalStreamTranscription.html](https://docs.aws.amazon.com/transcribe/latest/APIReference/API_streaming_StartMedicalStreamTranscription.html) API를 사용하고 다음을 지정하세요.
+ `LanguageCode` - 언어 코드. 유효한 값은 `en-US`입니다.
+ `MediaEncoding` - 입력 오디오에 사용된 인코딩. 유효한 값은 `pcm`, `ogg-opus`, `flac`입니다.
+ `Specialty` - 의료 전문가의 전문 분야.
+ `Type` – `CONVERSATION`

실시간 스트림에서 특정 용어의 트랜스크립션 정확도를 높이려면 사용자 지정 어휘를 사용하세요. 사용자 지정 어휘를 활성화하려면 `VocabularyName` 파라미터 값을, 사용할 사용자 지정 어휘의 이름으로 설정하세요. 자세한 내용은 [사용자 지정 의학 어휘를 통한 트랜스크립션 정확도 향상](vocabulary-med.md) 단원을 참조하십시오.

다른 화자의 음성에 레이블을 지정하려면 `ShowSpeakerLabel` 파라미터를 `true`로 설정합니다. 자세한 내용은 [화자 파티셔닝 활성화](conversation-diarization-med.md) 단원을 참조하십시오.

의료 대화를 트랜스크립션하기 위한 HTTP/2 스트림 설정에 대한 자세한 내용은 [HTTP/2 스트림 설정](streaming-setting-up.md#streaming-http2) 섹션을 참조하세요.

## 의료 대화를 WebSocket 스트림으로 트랜스크립션
<a name="transcribe-medical-conversation-websocket"></a>

WebSocket 요청을 사용하여 의료 대화를 트랜스크립션할 수 있습니다. WebSocket 요청을 할 때 미리 서명된 URI를 생성합니다. 이 URI에는 애플리케이션과 Amazon Transcribe Medical 간에 오디오 스트림을 설정하는 데 필요한 정보가 포함되어 있습니다. WebSocket 요청 생성에 대한 자세한 내용은 [WebSocket 스트림 설정](streaming-setting-up.md#streaming-websocket) 섹션을 참조하세요.

다음 템플릿을 사용하여 미리 서명된 URI를 생성합니다.

```
GET wss://transcribestreaming.us-west-2.amazonaws.com:8443/medical-stream-transcription-websocket
?language-code=languageCode
&X-Amz-Algorithm=AWS4-HMAC-SHA256
&X-Amz-Credential=AKIAIOSFODNN7EXAMPLE%2F20220208%2Fus-west-2%2Ftranscribe%2Faws4_request
&X-Amz-Date=20220208T235959Z
&X-Amz-Expires=300
&X-Amz-Security-Token=security-token
&X-Amz-Signature=Signature Version 4 signature 
&X-Amz-SignedHeaders=host
&media-encoding=flac
&sample-rate=16000
&session-id=sessionId
&specialty=medicalSpecialty
&type=CONVERSATION
&vocabulary-name=vocabularyName
&show-speaker-label=boolean
```

실시간 스트림에서 특정 용어의 트랜스크립션 정확도를 높이려면 사용자 지정 어휘를 사용하세요. 사용자 지정 어휘를 활성화하려면 `vocabulary-name` 값을, 사용할 사용자 지정 어휘의 이름으로 설정하세요. 자세한 내용은 [사용자 지정 의학 어휘를 통한 트랜스크립션 정확도 향상](vocabulary-med.md) 단원을 참조하십시오.

다른 화자의 음성에 레이블을 지정하려면 `show-speaker-label` 파라미터를 `true`로 설정합니다. 자세한 내용은 [화자 파티셔닝 활성화](conversation-diarization-med.md) 단원을 참조하십시오.

미리 서명된 URI 생성에 대한 자세한 내용은 [WebSocket 스트림 설정](streaming-setting-up.md#streaming-websocket) 섹션을 참조하세요.

# 화자 파티셔닝 활성화
<a name="conversation-diarization-med"></a>

 Amazon Transcribe Medical에서 화자 파티셔닝을 활성화하려면 화*자 분할을* 사용합니다. 이렇게 하면 트랜스크립 출력에서 환자가 말한 내용과 임상의가 말한 내용을 구별할 수 있습니다.

화자 분할을 활성화하면 Amazon Transcribe Medical은 각 화자의 *발화*에 각 화자의 고유 식별자로 레이블을 지정합니다. *발화*는 말의 단위로, 일반적으로 침묵을 기준으로 다른 발화와 구분됩니다. 배치 트랜스크립션의 경우, 임상의의 발화는 `spk_0`의 레이블을, 환자의 발화는 `spk_1`의 레이블을 받을 수 있습니다.

한 화자의 발화가 다른 화자의 발화와 겹치는 경우, Amazon Transcribe Medical 팀은 트랜스크립션에서 환자의 시작 시간을 기준으로 발화를 정리합니다. 입력 오디오에서 중첩되는 발화는 트랜스크립션 출력에서 중첩되지 않습니다.

배치 트랜스크립션 작업을 사용하거나 실시간 스트림으로 오디오 파일을 트랜스크립션할 때 화자 분할을 활성화할 수 있습니다.

**Topics**
+ [배치 트랜스크립션에서 화자 파티셔닝 활성화](conversation-diarization-batch-med.md)
+ [실시간 스트림에서 화자 파티셔닝 활성화](conversation-diarization-streaming-med.md)

# 배치 트랜스크립션에서 화자 파티셔닝 활성화
<a name="conversation-diarization-batch-med"></a>

[https://docs.aws.amazon.com/transcribe/latest/APIReference/API_StartMedicalTranscriptionJob.html](https://docs.aws.amazon.com/transcribe/latest/APIReference/API_StartMedicalTranscriptionJob.html) API 또는 AWS Management Console을 사용하여 배치 트랜스크립션 작업을 활성화할 수 있습니다. 이를 통해 의사와 환자의 대화에서 화자별로 텍스트를 분할하고 트랜스크립션 출력에서 누가 무슨 말을 했는지 확인할 수 있습니다.

## AWS Management Console
<a name="conversation-diarization-batch-med-console"></a>

 AWS Management Console 를 사용하여 트랜스크립션 작업에서 화자 분할을 활성화하려면 오디오 식별을 활성화한 다음 화자 파티셔닝을 활성화합니다.

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

1. 탐색 창의 Amazon Transcribe Medical에서 **트랜스크립션 작업을** 선택합니다.

1. **작업 생성**을 선택합니다.

1. **작업 세부 정보 지정** 페이지에서 트랜스크립션 작업에 대한 정보를 제공합니다.

1. **다음**을 선택합니다.

1. **오디오 식별**을 활성화합니다.

1. **오디오 식별 유형**에서 **화자 파티셔닝**을 선택합니다.

1. **최대 화자 수**에는 오디오 파일에서 말하고 있다고 생각되는 최대 화자 수를 입력합니다.

1. **생성(Create)**을 선택합니다.

## API
<a name="conversation-diarization-batch-med-api"></a>

**배치 트랜스크립션 작업을 사용하여 화자 파티셔닝을 활성화하려면(API)**
+ [https://docs.aws.amazon.com/transcribe/latest/APIReference/API_StartMedicalTranscriptionJob.html](https://docs.aws.amazon.com/transcribe/latest/APIReference/API_StartMedicalTranscriptionJob.html) API의 경우 다음을 지정하세요.

  1. `MedicalTranscriptionJobName`에서 AWS 계정의 고유한 이름을 지정합니다.

  1. `LanguageCode`에는 오디오 파일에서 사용하는 언어에 해당하는 언어 코드를 지정합니다.

  1. `Media` 객체의 `MediaFileUri` 파라미터에서 트랜스크립션할 오디오 파일의 이름을 지정합니다.

  1. `Specialty`에는 오디오 파일에서 말하는 임상의의 전문 분야를 지정합니다.

  1. `Type`에서 `CONVERSATION`를 지정합니다.

  1. 에서 트랜스크립션 결과를 저장할 Amazon S3 버킷을 `OutputBucketName`지정합니다.

  1. `Settings` 객체에서 다음을 지정합니다.

     1. `ShowSpeakerLabels` – `true`.

     1. `MaxSpeakerLabels` - 오디오에서 말하는 것으로 생각되는 화자의 수를 나타내는 2에서 10 사이의 정수.

다음 요청은 AWS SDK for Python (Boto3) 를 사용하여 화자 파티셔닝이 활성화된 기본 의료 임상의 환자 대화의 배치 트랜스크립션 작업을 시작합니다.

```
from __future__ import print_function
import time
import boto3
transcribe = boto3.client('transcribe', 'us-west-2')
job_name = "my-first-transcription-job"
job_uri = "s3://amzn-s3-demo-bucket/my-input-files/my-media-file.flac"
transcribe.start_medical_transcription_job(
    MedicalTranscriptionJobName = job_name,
    Media={
        'MediaFileUri': job_uri
    },
    OutputBucketName = 'amzn-s3-demo-bucket',
    OutputKey = 'my-output-files/', 
    LanguageCode = 'en-US',
    Specialty = 'PRIMARYCARE',
    Type = 'CONVERSATION',
    OutputBucketName = 'amzn-s3-demo-bucket',
Settings = {'ShowSpeakerLabels': True,
         'MaxSpeakerLabels': 2
         }
         )
while True:
    status = transcribe.get_medical_transcription_job(MedicalTranscriptionJobName = job_name)
    if status['MedicalTranscriptionJob']['TranscriptionJobStatus'] in ['COMPLETED', 'FAILED']:
        break
    print("Not ready yet...")
    time.sleep(5)
print(status)
```

다음 예시 코드는 화자 파티셔닝이 활성화된 상태에서 트랜스크립션 작업의 트랜스크립션 결과를 보여줍니다.

```
{
    "jobName": "job ID",
    "accountId": "111122223333",
    "results": {
        "transcripts": [
            {
                "transcript": "Professional answer."
            }
        ],
        "speaker_labels": {
            "speakers": 1,
            "segments": [
                {
                    "start_time": "0.000000",
                    "speaker_label": "spk_0",
                    "end_time": "1.430",
                    "items": [
                        {
                            "start_time": "0.100",
                            "speaker_label": "spk_0",
                            "end_time": "0.690"
                        },
                        {
                            "start_time": "0.690",
                            "speaker_label": "spk_0",
                            "end_time": "1.210"
                        }
                    ]
                }
            ]
        },
        "items": [
            {
                "start_time": "0.100",
                "end_time": "0.690",
                "alternatives": [
                    {
                        "confidence": "0.8162",
                        "content": "Professional"
                    }
                ],
                "type": "pronunciation"
            },
            {
                "start_time": "0.690",
                "end_time": "1.210",
                "alternatives": [
                    {
                        "confidence": "0.9939",
                        "content": "answer"
                    }
                ],
                "type": "pronunciation"
            },
            {
                "alternatives": [
                    {
                        "content": "."
                    }
                ],
                "type": "punctuation"
            }
        ]
    },
    "status": "COMPLETED"
}
```

## AWS CLI
<a name="diarization-batch-cli"></a>

**1차 의료를 담당하는 임상의와 환자 간의 대화를 녹음한 오디오 파일을 트랜스크립션하려면(AWS CLI)**
+ 다음 코드를 실행합니다.

  ```
                      
  aws transcribe start-transcription-job \
  --region us-west-2 \
  --cli-input-json file://example-start-command.json
  ```

  다음 코드는 `example-start-command.json`의 내용을 보여줍니다.

  ```
  {
      "MedicalTranscriptionJobName": "my-first-med-transcription-job",       
       "Media": {
            "MediaFileUri": "s3://amzn-s3-demo-bucket/my-input-files/my-audio-file.flac"
        },
        "OutputBucketName": "amzn-s3-demo-bucket",
        "OutputKey": "my-output-files/", 
        "LanguageCode": "en-US",
        "Specialty": "PRIMARYCARE",
        "Type": "CONVERSATION",
        "Settings":{
            "ShowSpeakerLabels": true,
            "MaxSpeakerLabels": 2
          }
  }
  ```

# 실시간 스트림에서 화자 파티셔닝 활성화
<a name="conversation-diarization-streaming-med"></a>

화자를 분할하고 실시간 스트림에서 음성에 레이블을 지정하려면 AWS Management Console 또는 스트리밍 요청을 사용합니다. 화자 파티셔닝은 스트림에서 2\$15명의 화자에게 가장 적합합니다. Amazon Transcribe Medical은 스트림에서 5명 이상의 화자를 분할할 수 있지만 해당 수를 초과하면 파티션의 정확도가 감소합니다.

HTTP/2 요청을 시작하려면 [https://docs.aws.amazon.com/transcribe/latest/APIReference/API_streaming_StartMedicalStreamTranscription.html](https://docs.aws.amazon.com/transcribe/latest/APIReference/API_streaming_StartMedicalStreamTranscription.html) API를 사용하세요. WebSocket 요청을 시작하려면 미리 서명된 URI를 사용하세요. URI에는 애플리케이션과 Amazon Transcribe Medical 간에 양방향 통신을 설정하는 데 필요한 정보가 포함되어 있습니다.

## 마이크에 대고 말하는 오디오의 화자 파티셔닝 활성화(AWS Management Console)
<a name="conversation-diarization-console"></a>

 AWS Management Console 를 사용하여 임상의-환자 대화의 실시간 스트림 또는 마이크에 실시간으로 표현되는 구술을 시작할 수 있습니다.

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

1. 탐색 창의 Amazon Transcribe Medical에서 **실시간 트랜스크**립션을 선택합니다.

1. **오디오 입력 유형**에서 트랜스크립션할 의료 음성 유형을 선택합니다.

1. **추가 설정**에서 **화자 파티셔닝**을 선택합니다.

1. **스트리밍 시작**을 선택하여 실시간 오디오 트랜스크립션을 시작합니다.

1. 마이크에 대고 말합니다.

## HTTP/2 스트림에서 화자 파티셔닝 활성화
<a name="conversation-diarization-med-http2"></a>

의료 대화의 HTTP/2 스트림에서 화자 파티셔닝을 활성화하려면 [https://docs.aws.amazon.com/transcribe/latest/APIReference/API_streaming_StartMedicalStreamTranscription.html](https://docs.aws.amazon.com/transcribe/latest/APIReference/API_streaming_StartMedicalStreamTranscription.html) API를 사용하고 다음을 지정하세요.
+ `LanguageCode`에는 오디오 파일에서 사용하는 언어에 해당하는 언어 코드를 지정합니다. 유효한 값은 `en-US`입니다.
+ `MediaSampleHertz`에서 오디오의 샘플 속도를 지정합니다.
+ `Specialty`에서 제공자의 전문 의료 분야를 지정합니다.
+ `ShowSpeakerLabel` – `true`

의료 대화를 트랜스크립션하기 위한 HTTP/2 스트림 설정에 대한 자세한 내용은 [HTTP/2 스트림 설정](streaming-setting-up.md#streaming-http2) 섹션을 참조하세요.

## WebSocket 요청에서 화자 파티셔닝 활성화
<a name="conversation-diarization-med-websocket"></a>

API를 사용하여 WebSocket 스트림에서 화자를 분할하려면 다음 형식을 사용하여 미리 서명된 URL을 만들고 WebSocket 요청을 시작하여 `show-speaker-label`을 `true`로 설정하세요.

```
GET wss://transcribestreaming.us-west-2.amazonaws.com:8443/medical-stream-transcription-websocket
?language-code=languageCode
&X-Amz-Algorithm=AWS4-HMAC-SHA256
&X-Amz-Credential=AKIAIOSFODNN7EXAMPLE%2F20220208%2Fus-west-2%2Ftranscribe%2Faws4_request
&X-Amz-Date=20220208T235959Z
&X-Amz-Expires=300
&X-Amz-Security-Token=security-token
&X-Amz-Signature=Signature Version 4 signature 
&X-Amz-SignedHeaders=host
&media-encoding=flac
&sample-rate=16000
&session-id=sessionId
&specialty=medicalSpecialty
&type=CONVERSATION
&vocabulary-name=vocabularyName
&show-speaker-label=boolean
```

다음 코드는 스트리밍 요청의 잘린 예시 응답을 보여줍니다.

```
{
  "Transcript": {
    "Results": [
      {
        "Alternatives": [
          {
            "Items": [
              {
                "Confidence": 0.97,
                "Content": "From",
                "EndTime": 18.98,
                "Speaker": "0",
                "StartTime": 18.74,
                "Type": "pronunciation",
                "VocabularyFilterMatch": false
              },
              {
                "Confidence": 1,
                "Content": "the",
                "EndTime": 19.31,
                "Speaker": "0",
                "StartTime": 19,
                "Type": "pronunciation",
                "VocabularyFilterMatch": false
              },
              {
                "Confidence": 1,
                "Content": "last",
                "EndTime": 19.86,
                "Speaker": "0",
                "StartTime": 19.32,
                "Type": "pronunciation",
                "VocabularyFilterMatch": false
              },
             ...
              {
                "Confidence": 1,
                "Content": "chronic",
                "EndTime": 22.55,
                "Speaker": "0",
                "StartTime": 21.97,
                "Type": "pronunciation",
                "VocabularyFilterMatch": false
              },
              ...
                "Confidence": 1,
                "Content": "fatigue",
                "EndTime": 24.42,
                "Speaker": "0",
                "StartTime": 23.95,
                "Type": "pronunciation",
                "VocabularyFilterMatch": false
              },
              {
                "EndTime": 25.22,
                "StartTime": 25.22,
                "Type": "speaker-change",
                "VocabularyFilterMatch": false
              },
              {
                "Confidence": 0.99,
                "Content": "True",
                "EndTime": 25.63,
                "Speaker": "1",
                "StartTime": 25.22,
                "Type": "pronunciation",
                "VocabularyFilterMatch": false
              },
              {
                "Content": ".",
                "EndTime": 25.63,
                "StartTime": 25.63,
                "Type": "punctuation",
                "VocabularyFilterMatch": false
              }
            ],
            "Transcript": "From the last note she still has mild sleep deprivation and chronic fatigue True."
          }
        ],
        "EndTime": 25.63,
        "IsPartial": false,
        "ResultId": "XXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX",
        "StartTime": 18.74
      }
    ]
  }
}
```

Amazon Transcribe Medical은 화자 변경 또는 오디오 일시 중지와 같은 자연 음성 세그먼트를 기반으로 수신 오디오 스트림을 중단합니다. 트랜스크립션은 전체 세그먼트가 트랜스크립션될 때까지 애플리케이션에 점진적으로 반환되고, 각 응답에는 텍스로 변환된 음성이 포함되어 있습니다. 위 코드는 완전히 트랜스크립션 음성 세그먼트의 잘린 예입니다. 화자 레이블은 완전히 트랜스크립션된 세그먼트에만 표시됩니다.

다음 목록은 스트리밍 트랜스크립션 출력의 객체 및 파라미터 구성을 보여줍니다.

**`Transcript`**  
각 음성 세그먼트에는 고유한 `Transcript` 객체가 있습니다.

**`Results`**  
각 `Transcript` 객체에는 고유한 `Results` 객체가 있습니다. 이 객체는 `isPartial` 필드를 포함하고 있습니다. 값이 `false`인 경우 전체 음성 세그먼트에 대한 결과가 반환됩니다.

**`Alternatives`**  
각 `Results` 객체에는 `Alternatives` 객체가 있습니다.

**`Items`**  
각 `Alternatives` 객체에는 트랜스크립션 출력의 각 단어 및 문장 부호에 대한 정보가 들어 있는 고유한 `Items` 객체가 있습니다. 화자 파티셔닝을 활성화하면 각 단어에는 완전히 트랜스크립션된 스피치 세그먼트에 대한 `Speaker` 레이블이 있습니다. Amazon Transcribe Medical은이 레이블을 사용하여 스트림의 각 화자에 고유한 정수를 할당합니다. 값이 `speaker-change`인 `Type` 파라미터는 한 사람이 말을 멈췄고 다른 사람이 곧 말을 시작하려 한다는 것을 나타냅니다.

**`Transcript`**  
각 Items 객체에는 `Transcript` 필드의 값으로 트랜스크립션된 음성 세그먼트가 포함되어 있습니다.

WebSocket 요청에 대한 자세한 내용은 [WebSocket 스트림 설정](streaming-setting-up.md#streaming-websocket) 섹션을 참조하세요.

# 다중 채널 오디오 트랜스크립션
<a name="conversation-channel-id-med"></a>

여러 채널이 있는 오디오 파일 또는 스트림이 있는 경우 *채널 식별*을 사용하여 각 채널의 음성을 트랜스크립션할 수 있습니다. Amazon Transcribe Medical은 각 채널의 음성을 별도로 트랜스크립션합니다. 각 채널의 개별 트랜스크립션을 결합하여 단일 트랜스크립션 출력으로 만듭니다.

채널 식별을 사용하여 오디오의 개별 채널을 식별하고 각 채널의 음성을 트랜스크린션할 수 있습니다. 발신자와 에이전트가 나오는 시나리오 등의 상황에서 이 기능을 활성화하세요. 이 채널 식별를 사용하여 약물 안전성 모니터링을 수행하는 고객 센터의 녹음이나 스트림에서 발신자와 에이전트를 구별할 수 있습니다.

배치 프로세싱과 실시간 스트리밍 모두에 채널 식별을 활성화할 수 있습니다. 다음 목록은 각 방법에서 채널 식별을 활성화하는 방법을 설명합니다.
+ 배치 트랜스크립션 및 AWS Management Console [https://docs.aws.amazon.com/transcribe/latest/APIReference/API_StartMedicalTranscriptionJob.html](https://docs.aws.amazon.com/transcribe/latest/APIReference/API_StartMedicalTranscriptionJob.html) API
+ 스트리밍 트랜스크립션 - WebSocket 스트리밍 및 [https://docs.aws.amazon.com/transcribe/latest/APIReference/API_streaming_StartMedicalStreamTranscription.html](https://docs.aws.amazon.com/transcribe/latest/APIReference/API_streaming_StartMedicalStreamTranscription.html) API

## 다중 채널 오디오 파일 트랜스크립션
<a name="conversation-channel-id-med-batch"></a>

오디오 파일을 트랜스크립션하면 Amazon Transcribe Medical은 각 채널의 *항목* 목록을 반환합니다. 항목은 트랜스크립션된 단어 또는 문장 부호입니다. 각 단어에는 시작 시간과 종료 시간이 있습니다. 한 채널에 있는 사람이 별도의 채널에 있는 사람과 동시에 말하는 경우, 각 채널에 있는 항목의 시작 시간과 종료 시간은 개인이 서로 말하는 동안 서로 겹칩니다.

기본적으로 두 채널로 오디오 파일을 트랜스크립션할 수 있습니다. 채널이 3개 이상인 파일을 트랜스크립션해야 하는 경우 할당량 증가를 요청할 수 있습니다. 할당량 증가 요청에 대한 자세한 내용은 [AWS 서비스 할당량](https://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html)을 참조하세요.

배치 트랜스크립션 작업에서 다중 채널 오디오를 트랜스크립션하려면 AWS Management Console 또는 [https://docs.aws.amazon.com/transcribe/latest/APIReference/API_StartMedicalTranscriptionJob.html](https://docs.aws.amazon.com/transcribe/latest/APIReference/API_StartMedicalTranscriptionJob.html) API를 사용합니다.

### AWS Management Console
<a name="channel-id-batch-med-console"></a>

 AWS Management Console 를 사용하여 배치 트랜스크립션 작업에서 채널 식별을 활성화하려면 오디오 식별을 활성화한 다음 채널 식별을 활성화합니다. 채널 식별은에서 오디오 식별의 하위 집합입니다 AWS Management Console.

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

1. 탐색 창의 Amazon Transcribe Medical에서 **트랜스크립션 작업을** 선택합니다.

1. **작업 생성**을 선택합니다.

1. **작업 세부 정보 지정** 페이지에서 트랜스크립션 작업에 대한 정보를 제공합니다.

1. **다음**을 선택합니다.

1. **오디오 식별**을 활성화합니다.

1. **오디오 식별 유형**에서 **채널 식별**을 선택합니다.

1. **생성(Create)**을 선택합니다.

### API
<a name="channel-id-batch-med-api"></a>

**다중 채널 오디오 파일을 트랜스크립션하려면(API)**
+ [https://docs.aws.amazon.com/transcribe/latest/APIReference/API_StartMedicalTranscriptionJob.html](https://docs.aws.amazon.com/transcribe/latest/APIReference/API_StartMedicalTranscriptionJob.html) API의 경우 다음을 지정하세요.

  1. `TranscriptionJobName`에서 AWS 계정의 고유한 이름을 지정합니다.

  1. `LanguageCode`에는 오디오 파일에서 사용하는 언어에 해당하는 언어 코드를 지정합니다. 유효한 값은 `en-US`입니다.

  1. `Media` 객체의 `MediaFileUri` 파라미터에서 트랜스크립션할 미디어 파일의 이름을 지정합니다.

  1. `Settings` 객체에서 `ChannelIdentification`을 `true`로 설정합니다.

다음은 AWS SDK for Python (Boto3)을 사용한 요청 예시입니다.

```
from __future__ import print_function
import time
import boto3
transcribe = boto3.client('transcribe', 'us-west-2')
job_name = "my-first-transcription-job"
job_name = "my-first-med-transcription-job"
job_uri = "s3://amzn-s3-demo-bucket/my-input-files/my-media-file.flac"
transcribe.start_medical_transcription_job(
      MedicalTranscriptionJobName = job_name,
      Media = {
        'MediaFileUri': job_uri
      },
      OutputBucketName = 'amzn-s3-demo-bucket',
      OutputKey = 'output-files/',
      LanguageCode = 'en-US',
      Specialty = 'PRIMARYCARE',
      Type = 'CONVERSATION',
      Settings = {
        'ChannelIdentification': True
      }
)
while True:
    status = transcribe.get_transcription_job(MedicalTranscriptionJobName = job_name)
    if status['MedicalTranscriptionJob']['TranscriptionJobStatus'] in ['COMPLETED', 'FAILED']:
        break
    print("Not ready yet...")
    time.sleep(5)
print(status)
```

### AWS CLI
<a name="channel-id-med-cli"></a>

**배치 트랜스크립션 작업을 사용하여 다중 채널 오디오 파일을 트랜스크립션하려면(AWS CLI)**
+ 다음 코드를 실행합니다.

  ```
                      
  aws transcribe start-medical-transcription-job \
  --region us-west-2 \
  --cli-input-json file://example-start-command.json
  ```

  다음은 `example-start-command.json`의 코드입니다.

  ```
  {
        "MedicalTranscriptionJobName": "my-first-med-transcription-job",        
        "Media": {
            "MediaFileUri": "s3://amzn-s3-demo-bucket/my-input-files/my-audio-file.flac"
        },
        "OutputBucketName": "amzn-s3-demo-bucket",
        "OutputKey": "my-output-files/", 
        "LanguageCode": "en-US",
        "Specialty": "PRIMARYCARE",
        "Type": "CONVERSATION",
  
          "Settings":{
            "ChannelIdentification": true
          }
  }
  ```

다음 코드는 두 채널의 대화가 있는 오디오 파일의 트랜스크립션 출력을 보여줍니다.

```
{
  "jobName": "job id",
  "accountId": "111122223333",
  "results": {
    "transcripts": [
      {
        "transcript": "When you try ... It seems to ..."
      }
    ],
    "channel_labels": {
      "channels": [
        {
          "channel_label": "ch_0",
          "items": [
            {
              "start_time": "12.282",
              "end_time": "12.592",
              "alternatives": [
                {
                  "confidence": "1.0000",
                  "content": "When"
                }
              ],
              "type": "pronunciation"
            },
            {
              "start_time": "12.592",
              "end_time": "12.692",
              "alternatives": [
                {
                  "confidence": "0.8787",
                  "content": "you"
                }
              ],
              "type": "pronunciation"
            },
            {
              "start_time": "12.702",
              "end_time": "13.252",
              "alternatives": [
                {
                  "confidence": "0.8318",
                  "content": "try"
                }
              ],
              "type": "pronunciation"
            },
            ...
         ]
      },
      {
          "channel_label": "ch_1",
          "items": [
            {
              "start_time": "12.379",
              "end_time": "12.589",
              "alternatives": [
                {
                  "confidence": "0.5645",
                  "content": "It"
                }
              ],
              "type": "pronunciation"
            },
            {
              "start_time": "12.599",
              "end_time": "12.659",
              "alternatives": [
                {
                  "confidence": "0.2907",
                  "content": "seems"
                }
              ],
              "type": "pronunciation"
            },
            {
              "start_time": "12.669",
              "end_time": "13.029",
              "alternatives": [
                {
                  "confidence": "0.2497",
                  "content": "to"
                }
              ],
              "type": "pronunciation"
            },
            ...
        ]
    }
}
```

## 다중 채널 오디오 스트림 트랜스크립션
<a name="conversation-channel-id-med-stream"></a>

[https://docs.aws.amazon.com/transcribe/latest/APIReference/API_streaming_StartMedicalStreamTranscription.html](https://docs.aws.amazon.com/transcribe/latest/APIReference/API_streaming_StartMedicalStreamTranscription.html) API를 사용하여 HTTP/2 또는 WebSocket 스트림의 개별 채널에서 오디오를 트랜스크립션할 수 있습니다.

기본적으로 두 채널로 스트림을 트랜스크립션할 수 있습니다. 채널이 3개 이상인 스트림을 트랜스크립팅해야 하는 경우 할당량 증가를 요청할 수 있습니다. 할당량 증가 요청에 대한 자세한 내용은 [AWS 서비스 할당량](https://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html)을 참조하세요.

### HTTP/2 스트림에서 다중 채널 트랜스크립션
<a name="conversation-channel-id-http2"></a>

HTTP/2 스트림에서 다중 채널 오디오를 트랜스크립션하려면 [StartMedicalStreamTranscription](https://docs.aws.amazon.com/transcribe/latest/APIReference/API_streaming_StartMedicalStreamTranscription.html) API를 사용하고 다음을 지정하세요.
+ `LanguageCode` - 오디오의 언어 코드. 유효한 값은 `en-US`입니다.
+ `MediaEncoding` - 오디오의 인코딩. 유효한 값은 `ogg-opus`, `flac`, `pcm`입니다.
+ `EnableChannelIdentification` – `true`
+ `NumberOfChannels` - 스트리밍 오디오의 채널 수.

의료 대화를 트랜스크립션하기 위한 HTTP/2 스트림 설정에 대한 자세한 내용은 [HTTP/2 스트림 설정](streaming-setting-up.md#streaming-http2) 섹션을 참조하세요.

### WebSocket 스트림에서 다중 채널 오디오 트랜스크립션
<a name="channel-id-med-websocket"></a>

WebSocket 스트림에서 화자를 분할하려면 다음 형식을 사용하여 미리 서명된 URI를 만들고 WebSocket 요청을 시작하세요. `enable-channel-identification`을 `true`로 지정하고 `number-of-channels`에서 스트림의 채널 수를 지정합니다. 미리 서명된 URI에는 애플리케이션과 Amazon Transcribe Medical 간의 양방향 통신을 설정하는 데 필요한 정보가 포함되어 있습니다.

```
GET wss://transcribestreaming.us-west-2.amazonaws.com:8443/medical-stream-transcription-websocket
?language-code=languageCode
&X-Amz-Algorithm=AWS4-HMAC-SHA256
&X-Amz-Credential=AKIAIOSFODNN7EXAMPLE%2F20220208%2Fus-west-2%2Ftranscribe%2Faws4_request
&X-Amz-Date=20220208T235959Z
&X-Amz-Expires=300
&X-Amz-Security-Token=security-token
&X-Amz-Signature=Signature Version 4 signature
&X-Amz-SignedHeaders=host
&media-encoding=flac
&sample-rate=16000
&session-id=sessionId
&enable-channel-identification=true
&number-of-channels=2
```

파라미터 정의는 [API 참조](https://docs.aws.amazon.com/transcribe/latest/APIReference/API_Reference.html)에서 찾을 수 있습니다. 모든 AWS API 작업에 공통적인 파라미터는 [공통 파라미터](https://docs.aws.amazon.com/transcribe/latest/APIReference/CommonParameters.html) 섹션에 나열되어 있습니다.

WebSocket 요청에 대한 자세한 내용은 [WebSocket 스트림 설정](streaming-setting-up.md#streaming-websocket) 섹션을 참조하세요.

### 다중 채널 스트리밍 출력
<a name="streaming-med-output"></a>

스트리밍 트랜스크립션의 출력은 HTTP/2 및 WebSocket 요청에서 동일합니다. 다음은 예시 출력입니다.

```
{
    "resultId": "XXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX",
    "startTime": 0.11,
    "endTime": 0.66,
    "isPartial": false,
    "alternatives": [
        {
            "transcript": "Left.",
            "items": [
                {
                    "startTime": 0.11,
                    "endTime": 0.45,
                    "type": "pronunciation",
                    "content": "Left",
                    "vocabularyFilterMatch": false
                },
                {
                    "startTime": 0.45,
                    "endTime": 0.45,
                    "type": "punctuation",
                    "content": ".",
                    "vocabularyFilterMatch": false
                }
            ]
        }
    ],
    "channelId": "ch_0"
}
```

각 음성 세그먼트에는 음성이 속한 채널을 나타내는 `channelId` 플래그가 있습니다.

# 의료 구술 트랜스크립션
<a name="transcribe-medical-dictation"></a>

 Amazon Transcribe Medical을 사용하여 배치 트랜스크립션 작업 또는 실시간 스트림을 사용하여 임상의가 지시한 의료 기록을 트랜스크립션할 수 있습니다. 배치 트랜스크립션 작업을 사용하면 오디오 파일을 트랜스크립션할 수 있습니다. Medical이 가능한 가장 높은 정확도로 트랜스크립션 결과를 생성할 수 있도록 트랜스크립션 작업 또는 스트림에 임상의의 Amazon Transcribe 의료 전문 분야를 지정합니다.

다음과 같은 전문 분야의 의료 구술을 트랜스크립션할 수 있습니다.
+ 심장학 – 스트리밍 트랜스크립션으로만 사용 가능
+ 신경학 – 스트리밍 트랜스크립션으로만 사용 가능
+ 종양학 – 스트리밍 트랜스크립션으로만 사용 가능
+ 1차 의료 – 다음과 같은 유형의 의료 행위가 포함됩니다.
  + 가정의학
  + 내과학
  + 산부인과학
  + 소아과학
+ 방사선학 - 스트리밍 트랜스크립션으로만 사용 가능
+ 비뇨기과 – 스트리밍 트랜스크립션으로만 사용 가능

사용자 지정 어휘를 사용하여 트랜스크립션 정확도를 높일 수 있습니다. 사용자 지정 의학 어휘의 작동 방식에 대한 자세한 내용은 [사용자 지정 의학 어휘를 통한 트랜스크립션 정확도 향상](vocabulary-med.md) 섹션을 참조하세요.

기본적으로 Amazon Transcribe Medical은 신뢰도가 가장 높은 트랜스크립션을 반환합니다. 대체 트랜스크립션을 반환하도록 구성하려면 [대체 트랜스크립션 생성](alternative-med-transcriptions.md) 섹션을 참조하세요.

트랜스크립션 출력에 숫자 및 의료 측정치가 어떻게 표시되는지에 대한 자세한 내용은 [번호 트랜스크립션](how-numbers-med.md) 및 [의학 용어 및 측정치 트랜스크립션](how-measurements-med.md) 섹션을 참조하세요.

**Topics**
+ [의료 구술의 오디오 파일 트랜스크립션](batch-medical-dictation.md)
+ [의료 구술을 실시간 스트림으로 트랜스크립션](streaming-medical-dictation.md)

# 의료 구술의 오디오 파일 트랜스크립션
<a name="batch-medical-dictation"></a>

배치 트랜스크립션 작업을 사용하면 의료 대화의 오디오 파일을 트랜스크립션할 수 있습니다. 이를 사용하면 임상의와 환자의 대화를 트랜스크립션할 수 있습니다. [https://docs.aws.amazon.com/transcribe/latest/APIReference/API_StartMedicalTranscriptionJob.html](https://docs.aws.amazon.com/transcribe/latest/APIReference/API_StartMedicalTranscriptionJob.html) API 또는 AWS Management Console에서 배치 트랜스크립션 작업을 시작할 수 있습니다.

[https://docs.aws.amazon.com/transcribe/latest/APIReference/API_StartMedicalTranscriptionJob.html](https://docs.aws.amazon.com/transcribe/latest/APIReference/API_StartMedicalTranscriptionJob.html) API로 의료 트랜스크립션 작업을 시작하는 경우 `Specialty` 파라미터의 값으로 `PRIMARYCARE`를 지정합니다.

## AWS Management Console
<a name="batch-med-dictation-console"></a>

**임상의와 환자의 대화를 트랜스크립션하려면(AWS Management Console)**

 AWS Management Console 를 사용하여 임상의-환자 대화를 트랜스크립션하려면 트랜스크립션 작업을 생성하고 **오디오 입력 유형에** 대한 **대화를** 선택합니다.

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

1. 탐색 창의 Amazon Transcribe Medical에서 **트랜스크립션 작업을** 선택합니다.

1. **작업 생성**을 선택합니다.

1. **DB 세부 정보 지정** 페이지의 **작업 설정**에서 다음을 지정합니다.

   1. **이름** - 트랜스크립션 작업의 이름

   1. **오디오 입력 유형** - **구술**

1. 나머지 필드에는 오디오 파일의 Amazon S3 위치와 트랜스크립션 작업의 출력을 저장할 위치를 지정합니다.

1. **다음**을 선택합니다.

1. **생성(Create)**을 선택합니다.

## API
<a name="batch-med-dictation-api"></a>

**배치 트랜스크립션 작업을 사용하여 의료 대화를 트랜스크립션하려면(API)**
+ [https://docs.aws.amazon.com/transcribe/latest/APIReference/API_StartMedicalTranscriptionJob.html](https://docs.aws.amazon.com/transcribe/latest/APIReference/API_StartMedicalTranscriptionJob.html) API의 경우 다음을 지정하세요.

  1. `MedicalTranscriptionJobName`에서 AWS 계정의 고유한 이름을 지정합니다.

  1. `LanguageCode`에는 오디오 파일에서 사용하는 언어와 어휘 필터의 언어에 해당하는 언어 코드를 지정합니다.

  1. `Media` 객체의 `MediaFileUri` 파라미터에서 트랜스크립션할 오디어 파일의 이름을 지정합니다.

  1. `Specialty`에는 오디오 파일에서 말하는 임상의의 전문 분야를 지정합니다.

  1. `Type`에서 `DICTATION`를 지정합니다.

  1. `OutputBucketName`에서 트랜스크립션 결과를 저장할 Amazon S3 버킷을 지정합니다.

  다음은를 사용하여 `PRIMARYCARE` 전문 임상의의 의료 구술을 AWS SDK for Python (Boto3) 트랜스크립션하는 요청의 예입니다.

  ```
   from __future__ import print_function
   import time
   import boto3
   transcribe = boto3.client('transcribe')
   job_name = "my-first-med-transcription-job"
   job_uri = "s3://amzn-s3-demo-bucket/my-input-files/my-audio-file.flac"
   transcribe.start_medical_transcription_job(
       MedicalTranscriptionJobName = job_name,
       Media = {
          'MediaFileUri': job_uri
       },     
       OutputBucketName = 'amzn-s3-demo-bucket',                                
       OutputKey = 'my-output-files/', 
       LanguageCode = 'en-US',
       Specialty = 'PRIMARYCARE',
       Type = 'DICTATION'
   )
  while True:
      status = transcribe.get_medical_transcription_job(MedicalTranscriptionJobName = job_name)
      if status['MedicalTranscriptionJob']['TranscriptionJobStatus'] in ['COMPLETED', 'FAILED']:
          break
      print("Not ready yet...")
      time.sleep(5)
  print(status)
  ```

다음 예시 코드는 의료구술의 트랜스크립션 결과를 보여줍니다.

```
{
    "jobName": "dictation-medical-transcription-job",
    "accountId": "111122223333",
    "results": {
        "transcripts": [
            {
                "transcript": "... came for a follow up visit today..."
            }
        ],
        "items": [
            {
            ...
                "start_time": "4.85",
                "end_time": "5.12",
                "alternatives": [
                    {
                        "confidence": "1.0",
                        "content": "came"
                    }
                ],
                "type": "pronunciation"
            },
            {
                "start_time": "5.12",
                "end_time": "5.29",
                "alternatives": [
                    {
                        "confidence": "1.0",
                        "content": "for"
                    }
                ],
                "type": "pronunciation"
            },
            {
                "start_time": "5.29",
                "end_time": "5.33",
                "alternatives": [
                    {
                        "confidence": "0.9955",
                        "content": "a"
                    }
                ],
                "type": "pronunciation"
            },
            {
                "start_time": "5.33",
                "end_time": "5.66",
                "alternatives": [
                    {
                        "confidence": "0.9754",
                        "content": "follow"
                    }
                ],
                "type": "pronunciation"
            },
            {
                "start_time": "5.66",
                "end_time": "5.75",
                "alternatives": [
                    {
                        "confidence": "0.9754",
                        "content": "up"
                    }
                ],
                "type": "pronunciation"
            },
            {
                "start_time": "5.75",
                "end_time": "6.02",
                "alternatives": [
                    {
                        "confidence": "1.0",
                        "content": "visit"
                    }
                ]
                ...
    },
    "status": "COMPLETED"
}
```

## AWS CLI
<a name="batch-med-dictation-cli"></a>

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

  ```
                      
  aws transcribe start-medical-transcription-job \
  --region us-west-2 \
  --cli-input-json file://example-start-command.json
  ```

  다음 코드는 `example-start-command.json`의 내용을 보여줍니다.

  ```
  {
        "MedicalTranscriptionJobName": "my-first-med-transcription-job",        
        "Media": {
        "MediaFileUri": "s3://amzn-s3-demo-bucket/my-input-files/my-audio-file.flac"
        },
        "OutputBucketName": "amzn-s3-demo-bucket",
        "OutputKey": "my-output-files/", 
        "LanguageCode": "en-US",  
        "Specialty": "PRIMARYCARE",
        "Type": "DICTATION"
  }
  ```

# 의료 구술을 실시간 스트림으로 트랜스크립션
<a name="streaming-medical-dictation"></a>

WebSocket 스트림을 사용하여 의료 구술을 오디오 스트림으로 트랜스크립션할 수 있습니다. 또한를 사용하여 본인 또는 다른 사람이 마이크에 직접 말하는 음성을 트랜스크립션 AWS Management Console 할 수 있습니다.

 HTTP/2 또는 WebSocket 스트림의 경우 다음과 같은 의료 전문 분야에서 오디오를 트랜스크립션할 수 있습니다.
+ 심장학
+ 종양학
+ 신경학
+ 1차 의료
+ 방사선학
+ 비뇨기과

각 의료 전문 분야에는 다양한 유형의 시술과 예약이 포함됩니다. 따라서 임상의는 다양한 유형의 메모를 작성합니다. WebSocket 요청의 `specialty` URI 파라미터 값 또는 [https://docs.aws.amazon.com/transcribe/latest/APIReference/API_streaming_StartMedicalStreamTranscription.html](https://docs.aws.amazon.com/transcribe/latest/APIReference/API_streaming_StartMedicalStreamTranscription.html) API의 `Specialty` 파라미터를 지정하는 데 도움이 되는 지침으로 다음 예시를 사용하세요.
+ 전기생리학 또는 심초음파 시술 후 구술을 원하시면 `CARDIOLOGY`을 선택합니다.
+ 외과적 종양학 또는 방사선 종양학 시술 후 구술을 원하시면 `ONCOLOGY`을 선택합니다.
+ 의사가 구술한 뇌염 진단에 관한 소견서를 원하시면 `NEUROLOGY`을 선택합니다.
+ 방광 결석 분리를 위한 시술 기록의 구술을 원하시면 `UROLOGY`을 선택합니다.
+ 내과 진료 후 임상의 소견서의 구술을 원하시면 `PRIMARYCARE`를 선택합니다.
+ CT 스캔, PET 스캔, MRI 또는 방사선 촬영 결과를 전달하는 의사의 구술을 보려면 `RADIOLOGY`을 선택합니다.
+ 부인과 상담 후 의사 소견서의 구술을 원하시면 `PRIMARYCARE`를 선택합니다.

실시간 스트림에서 특정 용어의 트랜스크립션 정확도를 높이려면 사용자 지정 어휘를 사용하세요. 사용자 지정 어휘를 활성화하려면 `vocabulary-name` 값을, 사용할 사용자 지정 어휘의 이름으로 설정하세요.

## 를 사용하여 마이크에 적힌 구술 트랜스크립션 AWS Management Console
<a name="streaming-medical-dictation-console"></a>

 AWS Management Console 를 사용하여 의료 구술의 스트리밍 오디오를 트랜스크립션하려면 의료 구술을 트랜스크립션하고 스트림을 시작한 다음 마이크에 말하기 시작하는 옵션을 선택합니다.

**의료 구술의 스트리밍 오디오를 트랜스크립션하려면(AWS Management Console)**

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

1. 탐색 창의 Amazon Transcribe Medical에서 실시간 트랜스**크**립션을 선택합니다.

1. **구술**을 선택합니다.

1. **의료 전문 분야**에는 스트림에서 말하는 임상의의 의료 전문 분야를 선택합니다.

1. **스트리밍 시작**을 선택합니다.

1. 마이크에 대고 말합니다.

## HTTP/2 스트림에서 구술 트랜스크립션
<a name="http2-med-dictation-streaming"></a>

의료 구술의 HTTP/2 스트림을 트랜스크립션하려면 [https://docs.aws.amazon.com/transcribe/latest/APIReference/API_streaming_StartMedicalStreamTranscription.html](https://docs.aws.amazon.com/transcribe/latest/APIReference/API_streaming_StartMedicalStreamTranscription.html) API를 사용하고 다음을 지정하세요.
+ `LanguageCode` - 언어 코드. 유효한 값은 `en-US`입니다.
+ `MediaEncoding` - 입력 오디오에 사용된 인코딩. 유효한 값은 `pcm`, `ogg-opus`, `flac`입니다.
+ `Specialty` - 의료 전문가의 전문 분야.
+ `Type` – `DICTATION`

의료 구술을 트랜스크립션하기 위한 HTTP/2 스트림 설정에 대한 자세한 내용은 [HTTP/2 스트림 설정](streaming-setting-up.md#streaming-http2) 섹션을 참조하세요.

## WebSocket 스트림 요청을 사용하여 의료 구술 트랜스크립션
<a name="transcribe-medical-dictation-websocket"></a>

WebSocket 요청을 사용하여 의료 구술을 실시간 스트림으로 트랜스크립션하려면 미리 서명된 URI를 생성해야 합니다. 이 URI에는 애플리케이션과 Amazon Transcribe Medical 간에 오디오 스트림을 설정하는 데 필요한 정보가 포함되어 있습니다. WebSocket 요청 생성에 대한 자세한 내용은 [WebSocket 스트림 설정](streaming-setting-up.md#streaming-websocket) 섹션을 참조하세요.

다음 템플릿을 사용하여 미리 서명된 URI를 생성합니다.

```
GET wss://transcribestreaming.us-west-2.amazonaws.com:8443/medical-stream-transcription-websocket
?language-code=languageCode
&X-Amz-Algorithm=AWS4-HMAC-SHA256
&X-Amz-Credential=AKIAIOSFODNN7EXAMPLE%2F20220208%2Fus-west-2%2Ftranscribe%2Faws4_request
&X-Amz-Date=20220208T235959Z
&X-Amz-Expires=300
&X-Amz-Security-Token=security-token
&X-Amz-Signature=Signature Version 4 signature 
&X-Amz-SignedHeaders=host
&media-encoding=flac
&sample-rate=16000
&session-id=sessionId
&specialty=medicalSpecialty
&type=DICTATION
&vocabulary-name=vocabularyName
&show-speaker-label=boolean
```

미리 서명된 URI 생성에 대한 자세한 내용은 [WebSocket 스트림 설정](streaming-setting-up.md#streaming-websocket) 섹션을 참조하세요.

# 사용자 지정 의학 어휘를 통한 트랜스크립션 정확도 향상
<a name="vocabulary-med"></a>

 Amazon Transcribe Medical에서 트랜스크립션 정확도를 높이려면 하나 이상의 의료 사용자 지정 어휘를 생성하고 사용합니다. *사용자 지정 어휘*는 도메인별 단어 또는 구절의 모음입니다. 이 모음은 해당 단어 또는 구문을 트랜스크립션하는 데 있어 Amazon Transcribe Medical의 성능을 개선하는 데 도움이 됩니다.

 Amazon Transcribe Medical을 사용할 때 자체 데이터의 무결성에 대한 책임은 사용자에게 있습니다. 기밀 정보, 개인 정보(PII) 또는 보호 대상 건강 정보(PHI)를 사용자 지정 어휘에 입력하지 마세요.

최상의 결과를 얻으려면 각각 특정 오디오 녹음을 트랜스크립션하는 데 도움이 되는 작은 사용자 지정 어휘를 별도로 만드세요. 모든 녹음에 사용할 큰 사용자 지정 어휘를 하나 생성했을 때보다 필사 정확도가 크게 향상됩니다.

기본적으로 에는 최대 100개의 사용자 지정 어휘가 있을 수 있습니다 AWS 계정. 사용자 지정 어휘의 용량은 50KB를 초과할 수 없습니다. 에 포함할 수 있는 사용자 지정 어휘 수 증가를 요청하는 방법에 대한 자세한 내용은 서비스 할당량을 AWS 계정참조하세요. [AWS](https://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html) 

사용자 지정 어휘는 미국 영어(en-US)로 제공됩니다.

**Topics**
+ [사용자 지정 의학 어휘를 위한 텍스트 파일 생성](create-med-vocab-text.md)
+ [텍스트 파일을 사용하여 사용자 지정 의학 어휘 생성](create-med-custom-vocabulary.md)
+ [사용자 지정 의학 어휘를 사용한 오디오 파일 트랜스크립션](start-med-custom-vocab-job.md)
+ [사용자 지정 의학 어휘를 사용한 실시간 스트림의 트랜스크립션](start-med-vocab-stream.md)
+ [Amazon Transcribe Medical의 문자 집합](charsets-med.md)

# 사용자 지정 의학 어휘를 위한 텍스트 파일 생성
<a name="create-med-vocab-text"></a>

사용자 지정 어휘를 생성하려면 UTF-8 형식의 텍스트 파일을 만듭니다. 이 파일에서는 4열 테이블을 만들고 각 열에서 필드를 지정합니다. 각 필드는 도메인별 용어가 발음되는 방식 또는 트랜스크립션에 이러한 용어를 표시하는 방법을 Amazon Transcribe Medical에 알려줍니다. 이러한 필드가 포함된 텍스트 파일을 Amazon S3 버킷에 저장합니다.

## 텍스트 파일 형식 지정 방법 이해
<a name="understand-vocab-formatting"></a>

사용자 지정 의학 어휘를 생성하려면 열 이름을 머리글 행으로 입력합니다. 머리글 행 아래에 각 열의 값을 입력합니다.

테이블에 있는 4개 열의 이름은 다음과 같습니다.
+  `Phrase` - 열은 필수, 값은 필수 
+  `IPA` - 열은 필수, 값은 선택 사항일 수 있음 
+  `SoundsLike` - 열은 필수, 값은 선택 사항일 수 있음 
+  `DisplayAs` - 열은 필수, 값은 선택 사항일 수 있음 

사용자 지정 어휘를 만드는 경우 다음 사항을 확인하세요.
+ 각 열을 단일 Tab 문자로 구분합니다. 열을 공백 또는 여러 Tab 문자로 구분하려고 하면 오류 메시지가 Amazon Transcribe 표시됩니다.
+ 열 내 각 값 뒤에 후행 공백이나 여백이 없어야 합니다.

각 열에 입력하는 값이 다음과 같은지 확인하세요.
+ 256자 미만(하이픈 포함)
+ 허용된 문자 집합의 문자만 사용하세요([Amazon Transcribe Medical의 문자 집합](charsets-med.md) 섹션 참조).

## 테이블의 열에 대한 값 입력
<a name="entering-vocabulary-values-med"></a>

다음 정보는 테이블의 4개 열에 대한 값을 지정하는 방법을 보여줍니다.
+ `Phrase` - 인식해야 하는 단어 또는 구절. 이 열에 값을 입력해야 합니다.

  구절을 입력할 경우 단어는 하이픈(-)으로 구분합니다. 예를 들면 **cerebral autosomal dominant arteriopathy with subcortical infarcts and leukoencephalopathy**를 **cerebral-autosomal-dominant-arteriopathy-with-subcortical-infarcts-and-leukoencephalopathy** 형식으로 입력합니다.

  머리글자어 또는 문자를 개별적으로 발음해야 하는 기타 단어를 점으로 구분된 단일 문자로 입력합니다(예: **D.N.A.** 또는 **S.T.E.M.I.**). “STEMIs”와 같은 복수 형태의 머리글자어를 입력하려면 하이픈을 사용하여 머리글자어에서 “s”를 구분합니다(예: “**S.T.E.M.I-s**”). 머리글자어는 대문자 또는 소문자를 사용할 수 있습니다.

  `Phrase` 열은 필수 항목입니다. 허용되는 모든 문자를 입력 언어로 사용할 수 있습니다. 허용되는 문자는 [Amazon Transcribe Medical의 문자 집합](charsets-med.md) 단원을 참조하세요. `DisplayAs` 열을 지정하지 않으면 Amazon Transcribe Medical은 출력 파일의 `Phrase` 열 내용을 사용합니다.
+ `IPA`(열은 필수, 값은 선택 사항일 수 있음) – 단어나 구절의 발음을 지정하려면 이 열의 [IPA(International Phonetic Alphabet)](https://en.wikipedia.org/wiki/International_Phonetic_Alphabet)에 문자를 포함하면 됩니다. `IPA` 열에는 선행 또는 후행 공백을 포함할 수 없으며 입력에서 단일 공백을 사용하여 각 음소를 구분해야 합니다. 예를 들어 영어에서는 **acute-respiratory-distress-syndrome** 구절을 **ə k j u t ɹ ɛ s p ɪ ɹ ə t ɔ ɹ i d ɪ s t ɹ ɛ s s ɪ n d ɹ oʊ m** 형식으로 입력합니다. **A.L.L.** 구절은 **eɪ ɛ l ɛ l** 형식으로 입력합니다.

  `IPA` 열의 콘텐츠를 지정하지 않아도 빈 `IPA` 열을 포함해야 합니다. `IPA` 열에 값을 포함하는 경우 `SoundsLike` 열의 값을 제공할 수 없습니다.

  특정 언어에 대해 허용되는 IPA 문자 목록은 [Amazon Transcribe Medical의 문자 집합](charsets-med.md) 단원을 참조하세요. 미국 영어는 Amazon Transcribe Medical에서 사용할 수 있는 유일한 언어입니다.
+ `SoundsLike`(열은 필수, 값은 선택 사항일 수 있음) - 단어나 구절을 보다 작은 조각으로 분리하고 언어의 표준 철자법을 사용하여 각 조각의 발음을 제공하여 단어의 소리를 모방할 수 있습니다. 예를 들어 **cerebral-autosomal-dominant-arteriopathy-with-subcortical-infarcts-and-leukoencephalopathy** 구절에 대한 발음 힌트는 **sir-e-brul-aut-o-som-ul-dah-mi-nant-ar-ter-ri-o-pa-thy-with-sub-cor-ti-cul-in-farcts-and-lewk-o-en-ce-phul-ah-pu-thy**의 형식으로 제공할 수 있습니다. **atrioventricular-nodal-reentrant-tachycardia** 구절에 대한 힌트는 **ay-tree-o-ven-trick-u-lar-node-al-re-entr-ant-tack-ih-card-ia**의 형식으로 제공할 수 있습니다. 힌트의 각 부분은 하이픈(-)으로 구분합니다.

  `SoundsLike` 열의 값을 제공하지 않아도 빈 `SoundsLike` 열을 포함해야 합니다. `SoundsLike` 열에 값을 포함하는 경우 `IPA` 열의 값을 제공할 수 없습니다.

  허용되는 모든 문자를 입력 언어로 사용할 수 있습니다. 허용되는 문자 목록은 [Amazon Transcribe Medical의 문자 집합](charsets-med.md) 단원을 참조하세요.
+ `DisplayAs`(열은 필수, 값은 선택 사항일 수 있음) - 출력 시 단어나 구절이 어떻게 보이는지 정의합니다. 예를 들어 단어 또는 구절이 **cerebral-autosomal-dominant-arteriopathy-with-subcortical-infarcts-and-leukoencephalopathy**일 경우 표시 형식을 `cerebral autosomal dominant arteriopathy with subcortical infarcts and leukoencephalopathy`로 지정하여 하이픈이 포함되지 않도록 할 수 있습니다. 출력에서 전체 용어 대신 머리글자어를 표시하려는 `DisplayAs`를 `CADASIL` 형식으로 지정할 수도 있습니다.

  `DisplayAs` 열을 지정하지 않으면 Amazon Transcribe Medical은 출력의 입력 파일에서 `Phrase` 열을 사용합니다.

  `DisplayAs` 열에 UTF-8 문자를 사용할 수 있습니다.

`IPA` 및 `DisplayAs` 열의 값에만 공백을 포함할 수 있습니다.

사용자 지정 어휘의 텍스트 파일을 새성하려면 텍스트 파일의 각 단어나 문구를 별도의 줄에 배치하세요. 탭 문자로 열을 구분합니다. `IPA` 및 `DisplayAs` 열의 값에만 공백을 포함합니다. 확장자가 있는 파일을 Amazon Transcribe Medical`.txt`을 사용하여 사용자 지정 어휘를 생성하는 AWS 리전 동일한의 Amazon S3 버킷에 저장합니다.

Windows에서 텍스트 파일을 편집하는 경우 파일 형식이 `LF`가 아닌 `CRLF`인지 확인합니다. 그렇지 않으면 사용자 지정 어휘를 작성할 수 없습니다. 일부 텍스트 편집기에서는 찾기 및 바꾸기 명령을 사용하여 서식을 변경할 수 있습니다.

다음 예시에서는 사용자 지정 어휘를 작성하는 데 사용할 수 있는 텍스트를 보여줍니다. 이러한 예제에서 사용자 정의 어휘를 작성하려면 예시를 텍스트 편집기에 복사하고 `[TAB]`을 탭 문자로 바꾸고 저장된 텍스트 파일을 Amazon S3에 업로드합니다.

```
Phrase[TAB]IPA[TAB]SoundsLike[TAB]DisplayAs
acute-respiratory-distress-syndrome[TAB][TAB][TAB]acute respiratory distress syndrome
A.L.L.[TAB]eɪ ɛ l ɛ l[TAB][TAB]ALL
atrioventricular-nodal-reentrant-tachycardia[TAB][TAB]ay-tree-o-ven-trick-u-lar-node-al-re-entr-ant-tack-ih-card-ia[TAB]
```

원하는 순서로 열을 입력할 수 있습니다. 다음 예시에서는 사용자 지정 어휘 입력 파일의 다른 유효한 구조를 보여줍니다.

```
Phrase[TAB]SoundsLike[TAB]IPA[TAB]DisplayAs
acute-respiratory-distress-syndrome[TAB][TAB][TAB]acute respiratory distress syndrome
A.L.L.[TAB][TAB]eɪ ɛ l ɛ l[TAB]ALL
atrioventricular-nodal-reentrant-tachycardia[TAB]ay-tree-o-ven-trick-u-lar-node-al-re-entr-ant-tack-ih-card-ia[TAB][TAB]
```

```
DisplayAs[TAB]SoundsLike[TAB]IPA[TAB]Phrase
acute respiratory distress syndrome[TAB][TAB][TAB]acute-respiratory-distress-syndrome
ALL[TAB][TAB]eɪ ɛ l ɛ l[TAB]A.L.L.
[TAB]ay-tree-o-ven-trick-u-lar-node-al-re-entr-ant-tack-ih-card-ia[TAB][TAB]atrioventricular-nodal-reentrant-tachycardia
```

읽기 쉽도록 다음 테이블은 위의 예시를 html 형식으로 더 명확하게 보여줍니다. 예시를 설명하기 위한 용도로만 사용됩니다.


| 구절 | IPA | SoundsLike | DisplayAs | 
| --- | --- | --- | --- | 
| acute-respiratory-distress-syndrome |  |  | acute respiratory distress syndrome | 
| A.L.L. | eɪ ɛ l ɛ l |  | ALL | 
| atrioventricular-nodal-reentrant-tachycardia |  | ay-tree-o-ven-trick-u-lar-node-al-re-entr-ant-tack-ih-card-ia |  | 


| 구절 | SoundsLike | IPA | DisplayAs | 
| --- | --- | --- | --- | 
| acute-respiratory-distress-syndrome |  |  | acute respiratory distress syndrome | 
| atrioventricular-nodal-reentrant-tachycardia | ay-tree-o-ven-trick-u-lar-node-al-re-entr-ant-tack-ih-card-ia |  |  | 
| A.L.L. |  | eɪ ɛ l ɛ l | ALL | 


| DisplayAs | SoundsLike | IPA | 구절 | 
| --- | --- | --- | --- | 
| acute respiratory distress syndrome |  |  | acute-respiratory-distress-syndrome | 
| ALL |  | eɪ ɛ l ɛ l | A.L.L. | 
|  | ay-tree-o-ven-trick-u-lar-node-al-re-entr-ant-tack-ih-card-ia |  | atrioventricular-nodal-reentrant-tachycardia | 

# 텍스트 파일을 사용하여 사용자 지정 의학 어휘 생성
<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
  ```

# 사용자 지정 의학 어휘를 사용한 오디오 파일 트랜스크립션
<a name="start-med-custom-vocab-job"></a>

[https://docs.aws.amazon.com/transcribe/latest/APIReference/API_StartMedicalTranscriptionJob.html](https://docs.aws.amazon.com/transcribe/latest/APIReference/API_StartMedicalTranscriptionJob.html) 또는를 사용하여 사용자 지정 어휘를 사용하여 트랜스크립션 정확도를 개선하는 트랜스크립션 작업을 AWS Management Console 시작합니다.

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

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

1. 탐색 창의 Amazon Transcribe Medical에서 **트랜스크립션 작업을** 선택합니다.

1. **작업 생성**을 선택합니다.

1. **작업 세부 정보 지정** 페이지에서 트랜스크립션 작업에 대한 정보를 제공합니다.

1. **다음**을 선택합니다.

1. **사용자 지정**에서 **사용자 지정 어휘**를 활성화합니다.

1. **어휘 선택**에서 사용자 지정 어휘를 선택합니다.

1. **생성(Create)**을 선택합니다.

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

**배치 트랜스크립션 작업을 사용하여 오디오 파일의 화자 파티셔닝을 활성화하려면(API)**
+ [https://docs.aws.amazon.com/transcribe/latest/APIReference/API_StartMedicalTranscriptionJob.html](https://docs.aws.amazon.com/transcribe/latest/APIReference/API_StartMedicalTranscriptionJob.html) API의 경우 다음을 지정하세요.

  1. `MedicalTranscriptionJobName`에서 AWS 계정의 고유한 이름을 지정합니다.

  1. `LanguageCode`에는 오디오 파일에서 사용하는 언어와 어휘 필터의 언어에 해당하는 언어 코드를 지정합니다.

  1. `Media` 객체의 `MediaFileUri` 파라미터에서 트랜스크립션할 오디오 파일의 이름을 지정합니다.

  1. `Specialty`에는 오디오 파일에서 말하는 임상의의 전문 분야를 지정합니다.

  1. `Type`에는 오디오 파일이 대화인지 구술인지를 지정합니다.

  1. `OutputBucketName`에서 트랜스크립션 결과를 저장할 Amazon S3 버킷을 지정합니다.

  1. `Settings` 객체에서 다음을 지정합니다.

     1. `VocabularyName` - 사용자 지정 어휘의 이름.

다음 요청은 AWS SDK for Python (Boto3) 를 사용하여 사용자 지정 어휘로 배치 트랜스크립션 작업을 시작합니다.

```
from __future__ import print_function
import time
import boto3
transcribe = boto3.client('transcribe', 'us-west-2')
job_name = "my-first-med-transcription-job"
job_uri = "s3://amzn-s3-demo-bucket/my-input-files/my-media-file.flac"
transcribe.start_medical_transcription_job(
   MedicalTranscriptionJobName = job_name,
   Media = {
       'MediaFileUri': job_uri
   },
   OutputBucketName = 'amzn-s3-demo-bucket',
   OutputKey = 'my-output-files/', 
   LanguageCode = 'en-US',
   Specialty = 'PRIMARYCARE',
   Type = 'CONVERSATION',
   Settings = {
       'VocabularyName': 'example-med-custom-vocab'
       }
 )

while True:
   status = transcribe.get_medical_transcription_job(MedicalTranscriptionJobName = job_name)
   if status['MedicalTranscriptionJob']['TranscriptionJobStatus'] in ['COMPLETED', 'FAILED']:
        break
    print("Not ready yet...")
    time.sleep(5)
print(status)
```

# 사용자 지정 의학 어휘를 사용한 실시간 스트림의 트랜스크립션
<a name="start-med-vocab-stream"></a>

실시간 스트림에서 트랜스크립션 정확도를 높이려면 HTTP/2 또는 WebSocket 스트림을 사용하여 사용자 지정 어휘를 사용할 수 있습니다. HTTP/2 요청을 시작하려면 [https://docs.aws.amazon.com/transcribe/latest/APIReference/API_streaming_StartMedicalStreamTranscription.html](https://docs.aws.amazon.com/transcribe/latest/APIReference/API_streaming_StartMedicalStreamTranscription.html) API를 사용하세요. 사용자 지정 어휘는 , AWS Management Console[https://docs.aws.amazon.com/transcribe/latest/APIReference/API_streaming_StartMedicalStreamTranscription.html](https://docs.aws.amazon.com/transcribe/latest/APIReference/API_streaming_StartMedicalStreamTranscription.html) API 또는 WebSocket 프로토콜을 사용하여 실시간으로 사용할 수 있습니다.

## 마이크에 대고 말하는 구술의 트랜스크립션(AWS Management Console)
<a name="streaming-medical-vocabulary-console"></a>

 AWS Management Console 를 사용하여 의료 구술의 스트리밍 오디오를 트랜스크립션하려면 의료 구술을 트랜스크립션하고 스트림을 시작한 다음 마이크에 말하기 시작하는 옵션을 선택합니다.

**의료 구술의 스트리밍 오디오를 트랜스크립션하려면(AWS Management Console)**

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

1. 탐색 창의 Amazon Transcribe Medical에서 실시간 트랜스**크**립션을 선택합니다.

1. **의료 전문 분야**에는 스트림에서 말하는 임상의의 의료 전문 분야를 선택합니다.

1. **오디오 입력 유형**에서 **대화** 또는 **구술**을 선택합니다.

1. **추가 설정**에서 **사용자 지정 어휘**를 선택합니다.

   1. **어휘 선택**에서 사용자 지정 어휘를 선택합니다.

1. **스트리밍 시작**을 선택합니다.

1. 마이크에 대고 말합니다.

## HTTP/2 스트림에서 화자 파티셔닝 활성화
<a name="vocabulary-med-http2"></a>

다음은 HTTP/2 요청 파라미터의 구문입니다.

```
POST /medical-stream-transcription HTTP/2
host: transcribestreaming.us-west-2.amazonaws.com
authorization: Generated value
x-amz-target: com.amazonaws.transcribe.Transcribe.StartMedicalStreamTranscription
x-amz-content-sha256: STREAMING-MED-AWS4-HMAC-SHA256-EVENTS
x-amz-date: 20220208T235959Z
x-amzn-transcribe-session-id: my-first-http2-med-stream
x-amzn-transcribe-language-code: en-US
x-amzn-transcribe-media-encoding: flac
x-amzn-transcribe-sample-rate: 16000
x-amzn-transcribe-vocabulary-name: my-first-med-vocab
x-amzn-transcribe-specialty: PRIMARYCARE
x-amzn-transcribe-type: CONVERSATION
x-amzn-transcribe-show-speaker-label: true
Content-type: application/vnd.amazon.eventstream
transfer-encoding: chunked
```

파라미터 설명:
+ **호스트**: 호출하려는 로 AWS 리전 (이전 예제의 'us-west-2')를 업데이트 AWS 리전 합니다. 유효한 목록은 및 엔드포인트를 AWS 리전참조하세요. [AWS 리전](https://docs.aws.amazon.com/general/latest/gr/rande.html#transcribe_region) 
+ **권한**: 생성된 필드. 서명 생성에 대한 자세한 내용은 [서명 버전 4로 AWS 요청 서명을 참조하세요](https://docs.aws.amazon.com/general/latest/gr/sigv4_signing.html).
+ **x-amz-target**: 이 필드를 변경하지 말고 이전 예시에 표시된 콘텐츠를 사용하세요.
+ **x-amz-content-sha256**: 생성된 필드. 서명 계산에 대한 자세한 내용은 [서명 버전 4로 AWS 요청 서명을 참조하세요](https://docs.aws.amazon.com/general/latest/gr/sigv4_signing.html).
+ **x-amz-date**: 서명이 생성된 날짜 및 시간. 형식은 YYYYMMDDTHHMMSSZ입니다. 여기서 YYYY=년, MM=월, DD=일, HH=시간, MM=분, SS=초이고, 'T'와 'Z'는 고정 문자입니다. 자세한 내용은 [서명 버전 4의 날짜 처리](https://docs.aws.amazon.com/general/latest/gr/sigv4-date-handling.html)를 참조하세요.
+ **x-amzn-transcribe-session-id**: 스트리밍 세션의 이름.
+ **x-amzn-transcribe-language-code**: 입력 오디오에 사용되는 인코딩. 유효한 값 목록은 [https://docs.aws.amazon.com/transcribe/latest/APIReference/API_streaming_StartMedicalStreamTranscription.html](https://docs.aws.amazon.com/transcribe/latest/APIReference/API_streaming_StartMedicalStreamTranscription.html) 또는 [지원되는 언어 및 언어별 기능](supported-languages.md) 섹션을 참조하세요.
+ **x-amzn-transcribe-media-encoding**: 입력 오디오에 사용되는 인코딩. 유효한 값은 `pcm`, `ogg-opus`, `flac`입니다.
+ **x-amzn-transcribe-sample-rate**: 입력 오디오의 샘플 속도(Hz)입니다.는 8,000Hz\$148,000Hz의 범위를 Amazon Transcribe 지원합니다. 전화 오디오와 같은 저품질 오디오는 일반적으로 약 8,000Hz입니다. 고품질 오디오의 범위는 일반적으로 16,000Hz에서 48,000Hz입니다. 단, 지정하는 샘플 속도는 오디오의 샘플 속도와 **반드시** 일치해야 합니다.
+ **x-amzn-transcribe-vocabulary-name**: 트랜스크립션에 사용하려는 어휘의 이름.
+ **x-amzn-transcribe-specialty**: 트랜스크립션 대상 의료 전문 분야.
+ **x-amzn-transcribe-type**: 구술인지 대화인지를 선택하세요.
+ **x-amzn-transcribe-show-speaker-label**: 분할을 활성화하려면 이 값이 `true`여야 합니다.
+ **content-type**: 이 필드를 변경하지 말고 이전 예시에 표시된 콘텐츠를 사용하세요.

## WebSocket 요청에서 화자 파티셔닝 활성화
<a name="vocabulary-websocket"></a>

API를 사용하여 WebSocket 스트림에서 화자를 분할하려면 다음 형식을 사용하여 미리 서명된 URL을 만들고 WebSocket 요청을 시작하여 `vocabulary-name`을 사용자 지정 어휘의 이름으로 설정하세요.

```
GET wss://transcribestreaming.us-west-2.amazonaws.com:8443/medical-stream-transcription-websocket
?language-code=en-US
&X-Amz-Algorithm=AWS4-HMAC-SHA256
&X-Amz-Credential=AKIAIOSFODNN7EXAMPLE%2F20220208%2Fus-west-2%2Ftranscribe%2Faws4_request
&X-Amz-Date=20220208T235959Z
&X-Amz-Expires=300
&X-Amz-Security-Token=security-token
&X-Amz-Signature=Signature Version 4 signature 
&X-Amz-SignedHeaders=host
&media-encoding=flac
&sample-rate=16000
&session-id=sessionId
&specialty=medicalSpecialty
&type=CONVERSATION
&vocabulary-name=vocabularyName
&show-speaker-label=boolean
```

# Amazon Transcribe Medical의 문자 집합
<a name="charsets-med"></a>

 Amazon Transcribe Medical에서 사용자 지정 어휘를 사용하려면 다음 문자 집합을 사용합니다.

## 영어 문자 집합
<a name="char-english-med"></a>

영어 사용자 지정 어휘의 경우 `Phrase` 및 `SoundsLike` 열에 다음 문자를 사용할 수 있습니다.
+ a - z
+ A - Z
+ ' (아포스트로피)
+ - (하이픈)
+ . (마침표)

어휘 입력 파일의 `IPA` 열에 다음 IPA(International Phonetic Alphabet) 문자를 사용할 수 있습니다.


| 문자 | 코드 | 문자 | 코드 | 
| --- | --- | --- | --- | 
| aʊ | 0061 028A | w | 0077 | 
| aɪ | 0061 026A | z | 007A | 
| b | 0062 | æ | 00E6 | 
| d | 0064 | ð | 00F0 | 
| eɪ | 0065 026A | ŋ | 014B | 
| f | 0066 | ɑ | 0251 | 
| g | 0067 | ɔ | 0254 | 
| h | 0068 | ɔɪ | 0254 026A | 
| i | 0069 | ə | 0259 | 
| j | 006A | ɛ | 025B | 
| k | 006B | ɝ | 025D | 
| l | 006C | ɡ | 0261 | 
| l̩ | 006C 0329 | ɪ | 026A | 
| m | 006D | ɹ | 0279 | 
| n | 006E | ʃ | 0283 | 
| n̩ | 006E 0329 | ʊ | 028A | 
| oʊ | 006F 028A | ʌ | 028C | 
| p | 0070 | ʍ | 028D | 
| s | 0073 | ʒ | 0292 | 
| t | 0074 | ʤ | 02A4 | 
| u | 0075 | ʧ | 02A7 | 
| v | 0076 | θ | 03B8 | 

# 트랜스크립션의 개인 건강 정보(PHI) 식별
<a name="phi-id"></a>

*개인 건강 정보 식별*을 사용하여 트랜스크립션 결과의 개인 건강 정보(PHI)에 레이블을 지정합니다. 레이블을 검토하여 환자를 식별하는 데 사용할 수 있는 PHI를 찾을 수 있습니다.

실시간 스트림 또는 배치 트랜스크립션 작업을 사용하여 PHI를 식별할 수 있습니다.

자체 후처리를 사용하여 트랜스크립션 출력에서 확인된 PHI를 수정할 수 있습니다.

개인 건강 정보 식별을 사용하여 다음 유형의 PHI를 확인합니다.
+ 개인 PHI:
  + 이름 – 성명 또는 성 및 이니셜
  + Gender
  + 나이
  + 전화번호
  + 환자와 직접 관련된 날짜(연도 제외)
  + 이메일 주소
+ 지리적 PHI:
  + 실제 주소
  + 우편 번호
  + 의료 센터 또는 진료소 이름
+ 계정 PHI:
  + 팩스 번호
  + 사회 보장 번호(SSN)
  + 건강 보험 수혜자 번호
  + 계정 번호
  + 인증서 또는 면허 번호
+ 차량 PHI:
  + 차량 식별 번호(VIN)
  + 번호판 번호
+ 기타 PHI:
  + 웹 URL(Uniform Resource Location)
  + 인터넷 프로토콜(IP) 주소 번호

Amazon Transcribe Medical은 HIPAA(Health Insurance Portability and Accountability Act of 1996) 적격 서비스입니다. 자세한 내용은 [Amazon Transcribe Medical](transcribe-medical.md) 단원을 참조하십시오. 오디오 파일에서 PHI를 식별하는 방법에 대한 자세한 내용은 [오디오 파일에서 PHI 식별](phi-id-batch.md) 섹션을 참조하세요. 스트림에서 PHI를 식별하는 방법에 대한 자세한 내용은 [실시간 스트림에서 PHI 식별](phi-id-stream.md) 섹션을 참조하세요.

**Topics**
+ [오디오 파일에서 PHI 식별](phi-id-batch.md)
+ [실시간 스트림에서 PHI 식별](phi-id-stream.md)

# 오디오 파일에서 PHI 식별
<a name="phi-id-batch"></a>

배치 트랜스크립션 작업을 사용하여 오디오 파일을 트랜스크립션하고 그 안에 있는 개인 건강 정보(PHI)를 식별할 수 있습니다. 개인 건강 정보(PHI) 식별을 활성화하면 Amazon Transcribe Medical은 트랜스크립션 결과에서 식별한 PHI에 레이블을 지정합니다. Amazon Transcribe Medical에서 식별할 수 있는 PHI에 대한 자세한 내용은 섹션을 참조하세요[트랜스크립션의 개인 건강 정보(PHI) 식별](phi-id.md).

[https://docs.aws.amazon.com/transcribe/latest/APIReference/API_StartMedicalTranscriptionJob.html](https://docs.aws.amazon.com/transcribe/latest/APIReference/API_StartMedicalTranscriptionJob.html) API 또는 AWS Management Console을 사용하여 배치 트랜스크립션 작업을 시작할 수 있습니다.

## AWS Management Console
<a name="batch-med-phi-console"></a>

 AWS Management Console 를 사용하여 임상의-환자 대화를 트랜스크립션하려면 트랜스크립션 작업을 생성하고 **오디오 입력 유형에** 대한 **대화를** 선택합니다.

**오디오 파일을 트랜스크립션하고 해당 PHI를 식별하려면(AWS Management Console)**

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

1. 탐색 창의 Amazon Transcribe Medical에서 **트랜스크립션 작업을** 선택합니다.

1. **작업 생성**을 선택합니다.

1. **DB 세부 정보 지정** 페이지의 **작업 설정**에서 다음을 지정합니다.

   1. **이름** - 고유한 트랜스크립션 작업의 이름입니다 AWS 계정.

   1. **오디오 입력 유형** – **대화** 또는 **구술**.

1. 나머지 필드에는 오디오 파일의 Amazon S3 위치와 트랜스크립션 작업의 출력을 저장할 위치를 지정합니다.

1. **다음**을 선택합니다.

1. **오디오 설정**에서 **PHI 식별**을 선택합니다.

1. **생성(Create)**을 선택합니다.

## API
<a name="batch-med-phi-api"></a>

**배치 트랜스크립션 작업을 사용하여 오디오 파일을 트랜스크립션하고 해당 PHI를 식별하려면(API)**
+ [https://docs.aws.amazon.com/transcribe/latest/APIReference/API_StartMedicalTranscriptionJob.html](https://docs.aws.amazon.com/transcribe/latest/APIReference/API_StartMedicalTranscriptionJob.html) API의 경우 다음을 지정하세요.

  1. `MedicalTranscriptionJobName`에서 AWS 계정의 고유한 이름을 지정합니다.

  1. `LanguageCode`에는 오디오 파일에서 사용하는 언어에 해당하는 언어 코드를 지정합니다.

  1. `Media` 객체의 `MediaFileUri` 파라미터에서 트랜스크립션할 오디오 파일의 이름을 지정합니다.

  1. `Specialty`에는 오디오 파일에서 말하는 임상의의 전문 분야를 `PRIMARYCARE`로 지정합니다.

  1. `Type`에서 `CONVERSATION` 또는 `DICTATION`를 지정합니다.

  1. `OutputBucketName`에서 트랜스크립션 결과를 저장할 Amazon S3 버킷을 지정합니다.

  다음은를 사용하여 오디오 파일을 AWS SDK for Python (Boto3) 트랜스크립션하고 환자의 PHI를 식별하는 요청의 예입니다.

  ```
  from __future__ import print_function
  import time
  import boto3
  transcribe = boto3.client('transcribe')
  job_name = "my-first-transcription-job"
  job_uri = "s3://amzn-s3-demo-bucket/my-input-files/my-audio-file.flac"
  transcribe.start_medical_transcription_job(
        MedicalTranscriptionJobName = job_name,
        Media = {'MediaFileUri': job_uri},
        LanguageCode = 'en-US',
        ContentIdentificationType = 'PHI',
        Specialty = 'PRIMARYCARE',
        Type = 'type', # Specify 'CONVERSATION' for a medical conversation. Specify 'DICTATION' for a medical dictation.
        OutputBucketName = 'amzn-s3-demo-bucket'
    )
  while True:
      status = transcribe.get_medical_transcription_job(MedicalTranscriptionJobName = job_name)
      if status['MedicalTranscriptionJob']['TranscriptionJobStatus'] in ['COMPLETED', 'FAILED']:
          break
      print("Not ready yet...")
      time.sleep(5)
  print(status)
  ```

다음 예시 코드는 환자 PHI를 식별한 트랜스크립션 결과를 보여줍니다.

```
{
    "jobName": "my-medical-transcription-job-name",
    "accountId": "111122223333",
    "results": {
        "transcripts": [{
            "transcript": "The patient's name is Bertrand."
        }],
        "items": [{
                "id": 0,
            "start_time": "0.0",
            "end_time": "0.37",
            "alternatives": [{
                "confidence": "0.9993",
                "content": "The"
            }],
            "type": "pronunciation"
        }, {
                "id": 1,
            "start_time": "0.37",
            "end_time": "0.44",
            "alternatives": [{
                "confidence": "0.9981",
                "content": "patient's"
            }],
            "type": "pronunciation"
        }, {
                "id": 2,
            "start_time": "0.44",
            "end_time": "0.52",
            "alternatives": [{
                "confidence": "1.0",
                "content": "name"
            }],
            "type": "pronunciation"
        }, {
                "id": 3,
            "start_time": "0.52",
            "end_time": "0.92",
            "alternatives": [{
                "confidence": "1.0",
                "content": "is"
            }],
            "type": "pronunciation"
        }, {
                "id": 4,
            "start_time": "0.92",
            "end_time": "0.9989",
            "alternatives": [{
                "confidence": "1.0",
                "content": "Bertrand"
            }],
            "type": "pronunciation"
        }, {
                "id": 5,
            "alternatives": [{
                "confidence": "0.0",
                "content": "."
            }],
            "type": "punctuation"
        }],
        "entities": [{
            "content": "Bertrand",
            "category": "PHI*-Personal*",
            "startTime": 0.92,
            "endTime": 1.2,
            "confidence": 0.9989
        }],
        "audio_segments": [
            {
                "id": 0,
                "transcript": "The patient's name is Bertrand.",
                "start_time": "0.0",
                "end_time": "0.9989",
                "items": [
                    0,
                    1,
                    2,
                    3,
                    4,
                    5
                ]
            }
        ]
    },
    "status": "COMPLETED"
}
```

## AWS CLI
<a name="batch-med-conversation-cli"></a>

**배치 트랜스크립션 작업을 사용하여 오디오 파일을 트랜스크립션하고 PHI를 식별하려면(AWS CLI)**
+ 다음 코드를 실행합니다.

  ```
  aws transcribe start-medical-transcription-job \
  --medical-transcription-job-name my-medical-transcription-job-name\
  --language-code en-US \
  --media MediaFileUri="s3://amzn-s3-demo-bucket/my-input-files/my-audio-file.flac" \
  --output-bucket-name amzn-s3-demo-bucket \
  --specialty PRIMARYCARE \
  --type type \ # Choose CONVERSATION to transcribe a medical conversation. Choose DICTATION to transcribe a medical dictation.
  --content-identification-type PHI
  ```

# 실시간 스트림에서 PHI 식별
<a name="phi-id-stream"></a>

HTTP/2 또는 WebSocket 스트림에서 개인 건강 정보(PHI)를 식별할 수 있습니다. PHI 식별을 활성화하면 Amazon Transcribe Medical은 트랜스크립션 결과에서 식별하는 PHI에 레이블을 지정합니다. Amazon Transcribe Medical에서 식별할 수 있는 PHI에 대한 자세한 내용은 섹션을 참조하세요[트랜스크립션의 개인 건강 정보(PHI) 식별](phi-id.md).



## 마이크에 대고 말하는 구술로 PHI 식별하기
<a name="console-stream-phi"></a>

를 사용하여 마이크가 선택한 음성 AWS Management Console 을 트랜스크립션하고 PHI를 식별하려면 오디오 입력 유형으로 **구술**을 선택하고 스트림을 시작한 다음 컴퓨터의 마이크에 대고 말하기 시작합니다.

**를 사용하여 구술에서 PHI를 식별하려면 AWS Management Console**

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

1. 탐색 창에서 **실시간 트랜스크립션**을 선택합니다.

1. **오디오 입력 유형**에서 **구술**을 선택합니다.

1. **추가 설정**에서 **PHI 식별**을 선택합니다.

1. **스트리밍 시작**을 선택하고 마이크에 대고 말합니다.

1. 구술을 종료하려면 **스트리밍 중지**를 선택합니다.

## HTTP/2 스트림에서 PHI 식별하기
<a name="http2-stream-phi"></a>

PHI 식별이 활성화된 상태에서 HTTP/2 스트림을 시작하려면 [https://docs.aws.amazon.com/transcribe/latest/APIReference/API_streaming_StartMedicalStreamTranscription.html](https://docs.aws.amazon.com/transcribe/latest/APIReference/API_streaming_StartMedicalStreamTranscription.html) API를 사용하고 다음을 지정하세요.
+ `LanguageCode`에는 스트림에서 사용하는 언어에 대한 언어 코드를 지정합니다. 미국 영어의 경우에는 `en-US`를 지정합니다.
+ `MediaSampleHertz`에서 오디오의 샘플 속도를 지정합니다.
+ `content-identification-type`에서 `PHI`를 지정합니다.

## WebSocket 스트림에서 PHI 식별하기
<a name="websocket-phi-id"></a>

 PHI 식별이 활성화된 WebSocket 스트림을 시작하려면 다음 형식을 사용하여 미리 서명된 URL을 만드세요.

```
GET wss://transcribestreaming.us-west-2.amazonaws.com:8443/medical-stream-transcription-websocket?
&X-Amz-Algorithm=AWS4-HMAC-SHA256 
&X-Amz-Credential=AKIAIOSFODNN7EXAMPLE%2F20220208%2Fus-west-2%2Ftranscribe%2Faws4_request 
&X-Amz-Date=20220208T235959Z 
&X-Amz-Expires=300 
&X-Amz-Security-Token=security-token 
&X-Amz-Signature=Signature Version 4 signature 
&X-Amz-SignedHeaders=host 
&language-code=en-US
&media-encoding=flac 
&sample-rate=16000 
&specialty=medical-specialty
&content-identification-type=PHI
```

파라미터 정의는 [API 참조](https://docs.aws.amazon.com/transcribe/latest/APIReference/API_Reference.html)에서 찾을 수 있습니다. 모든 AWS API 작업에 공통적인 파라미터는 [공통 파라미터](https://docs.aws.amazon.com/transcribe/latest/APIReference/CommonParameters.html) 섹션에 나열되어 있습니다.

# 대체 트랜스크립션 생성
<a name="alternative-med-transcriptions"></a>

 Amazon Transcribe Medical을 사용하면 신뢰도가 가장 높은 트랜스크립션을 얻을 수 있습니다. 그러나 신뢰도가 낮은 추가 트랜스크립션을 반환하도록 Amazon Transcribe Medical을 구성할 수 있습니다.

대체 트랜스크립션을 사용하여 트랜스크립션된 오디오의 다른 해석을 볼 수 있습니다. 예를 들어, 사람이 트랜스크립션을 검토할 수 있도록 하는 애플리케이션에 사람이 선택할 수 있는 대체 트랜스크립션을 제공할 수 있습니다.

 AWS Management Console 또는 [https://docs.aws.amazon.com/transcribe/latest/APIReference/API_StartMedicalTranscriptionJob.html](https://docs.aws.amazon.com/transcribe/latest/APIReference/API_StartMedicalTranscriptionJob.html) API를 사용하여 대체 트랜스크립션을 생성할 수 있습니다.

## AWS Management Console
<a name="alternative-med-transcriptions-console"></a>

를 사용하여 대체 트랜스크립션 AWS Management Console 을 생성하려면 작업을 구성할 때 대체 결과를 활성화합니다.

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

1. 탐색 창의 Amazon Transcribe Medical에서 **트랜스크립션 작업을** 선택합니다.

1. **작업 생성**을 선택합니다.

1. **작업 세부 정보 지정** 페이지에서 트랜스크립션 작업에 대한 정보를 제공합니다.

1. **다음**을 선택합니다.

1. **대체 결과**를 활성화합니다.

1. **최대 대안**에는 출력에 포함할 대체 트랜스크립션 최대 개수를 2에서 10 사이의 정수 값으로 입력합니다.

1. **생성(Create)**을 선택합니다.

## API
<a name="alternative-med-transcriptions-api"></a>

**배치 트랜스크립션 작업을 사용하여 오디오 파일에서 화자별로 텍스트를 구분하려면(API)**
+ [https://docs.aws.amazon.com/transcribe/latest/APIReference/API_StartMedicalTranscriptionJob.html](https://docs.aws.amazon.com/transcribe/latest/APIReference/API_StartMedicalTranscriptionJob.html) API의 경우 다음을 지정하세요.

  1. `MedicalTranscriptionJobName`에서 AWS 계정의 고유한 이름을 지정합니다.

  1. `LanguageCode`에는 오디오 파일에서 사용하는 언어와 어휘 필터의 언어에 해당하는 언어 코드를 지정합니다.

  1. `Media` 객체의 `MediaFileUri` 파라미터에서 트랜스크립션할 오디오 파일의 위치를 지정합니다.

  1. `Specialty`에는 오디오 파일에서 말하는 임상의의 전문 분야를 지정합니다.

  1. `Type`에서 의료 대화 또는 구술을 트랜스크립션할지 여부를 지정합니다.

  1. `OutputBucketName`에서 트랜스크립션 결과를 저장할 Amazon S3 버킷을 지정합니다.

  1. `Settings` 객체에서 다음을 지정합니다.

     1. `ShowAlternatives` – `true`.

     1. `MaxAlternatives` - 트랜스크립션 출력에 포함하려는 대체 트랜스크립트의 수를 나타내는 2에서 10 사이의 정수.

다음 요청은 AWS SDK for Python (Boto3) 를 사용하여 최대 2개의 대체 트랜스크립션을 생성하는 트랜스크립션 작업을 시작합니다.

```
from __future__ import print_function
import time
import boto3
transcribe = boto3.client('transcribe', 'us-west-2')
job_name = "my-first-transcription-job"
job_uri = s3://amzn-s3-demo-bucket/my-input-files/my-audio-file.flac
transcribe.start_medical_transcription_job(
    MedicalTranscriptionJobName = job_name,
    Media = {
        'MediaFileUri': job_uri
    },
    OutputBucketName = 'amzn-s3-demo-bucket',
    OutputKey = 'my-output-files/', 
    LanguageCode = 'en-US',
    Specialty = 'PRIMARYCARE',
    Type = 'CONVERSATION', 
    Settings = {
        'ShowAlternatives': True,
        'MaxAlternatives': 2
    }
)

while True:
   status = transcribe.get_medical_transcription_job(MedicalTranscriptionJobName = job_name)
   if status['MedicalTranscriptionJob']['TranscriptionJobStatus'] in ['COMPLETED', 'FAILED']:
       break
   print("Not ready yet...")
   time.sleep(5)
print(status)
```

## AWS CLI
<a name="alternative-med-transcriptions-cli"></a>

**1차 의료 임상의와 환자 간의 대화를 녹음한 오디오 파일을 오디오 파일에 트랜스크립션하려면(AWS CLI)**
+ 다음 코드를 실행합니다.

  ```
                      
  aws transcribe start-transcription-job \
  --cli-input-json file://filepath/example-start-command.json
  ```

  다음 코드는 `example-start-command.json`의 내용을 보여줍니다.

  ```
  {
        "MedicalTranscriptionJobName": "my-first-transcription-job",
        "LanguageCode": "en-US",
        "Specialty": "PRIMARYCARE",
        "Type": "CONVERSATION",
        "OutputBucketName":"amzn-s3-demo-bucket",
        "Media": {
            "MediaFileUri": "s3://amzn-s3-demo-bucket/my-input-files/my-audio-file.flac"
          },
        "Settings":{
            "ShowAlternatives": true,
            "MaxAlternatives": 2
          }
  }
  ```

# Amazon Transcribe 의료 및 인터페이스 VPC 엔드포인트(AWS PrivateLink)
<a name="med-vpc-interface-endpoints"></a>

*인터페이스 VPC 엔드포인트를 생성하여 VPC*와 Amazon Transcribe Medical 간에 프라이빗 연결을 설정할 수 있습니다. 인터페이스 엔드포인트는 인터넷 게이트웨이[AWS PrivateLink](https://aws.amazon.com/privatelink), NAT 디바이스, VPN 연결 또는 Direct Connect 연결 없이 Medical Amazon Transcribe APIs에 비공개로 액세스할 수 있는 기술로 구동됩니다. VPC의 인스턴스는 Amazon Transcribe Medical APIs와 통신하는 데 퍼블릭 IP 주소가 필요하지 않습니다. VPC와 Amazon Transcribe Medical 간의 트래픽은 Amazon 네트워크를 벗어나지 않습니다.

각 인터페이스 엔드포인트는 서브넷에서 하나 이상의 [Elastic Network Interfaces](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html)로 표현됩니다.

자세한 내용은 *Amazon VPC 사용 설명서*의 [인터페이스 VPC 엔드포인트(AWS PrivateLink)](https://docs.aws.amazon.com/vpc/latest/userguide/vpce-interface.html)를 참조하세요.

## Amazon Transcribe Medical VPC 엔드포인트에 대한 고려 사항
<a name="med-vpc-endpoint-considerations"></a>

 Amazon Transcribe Medical용 인터페이스 VPC 엔드포인트를 설정하기 전에 *Amazon VPC 사용 설명서*의 [인터페이스 엔드포인트 속성 및 제한 사항을](https://docs.aws.amazon.com/vpc/latest/userguide/vpce-interface.html#vpce-interface-limitations) 검토해야 합니다.

Amazon Transcribe Medical은 VPC에서 모든 API 작업을 호출할 수 있도록 지원합니다.

## Amazon Transcribe Medical용 인터페이스 VPC 엔드포인트 생성
<a name="med-vpc-endpoint-create"></a>

 AWS Management Console 또는를 사용하여 Amazon Transcribe Medical 서비스에 대한 VPC 엔드포인트를 생성할 수 있습니다 AWS CLI. 자세한 내용은 *Amazon VPC 사용 설명서*의 [인터페이스 엔드포인트 생성](https://docs.aws.amazon.com/vpc/latest/userguide/vpce-interface.html#create-interface-endpoint)을 참조하세요.

 Amazon Transcribe Medical의 배치 트랜스크립션의 경우 다음 서비스 이름을 사용하여 VPC 엔드포인트를 생성합니다.
+ com.amazonaws.*us-west-2*.transcribe 

 Amazon Transcribe Medical에서 스트리밍 트랜스크립션의 경우 다음 서비스 이름을 사용하여 VPC 엔드포인트를 생성합니다.
+ com.amazonaws.*us-west-2*.transcribestreaming 

엔드포인트에 대해 프라이빗 DNS를 활성화하는 경우와 AWS 리전같은의 기본 DNS 이름을 사용하여 Amazon Transcribe Medical에 API 요청을 할 수 있습니다`transcribestreaming.us-east-2.amazonaws.com`.

자세한 내용은 *Amazon VPC 사용 설명서*의 [인터페이스 엔드포인트를 통해 서비스 액세스](https://docs.aws.amazon.com/vpc/latest/userguide/vpce-interface.html#access-service-though-endpoint)를 참조하세요.

## Amazon Transcribe Medical 스트리밍을 위한 VPC 엔드포인트 정책 생성
<a name="med-vpc-endpoint-policy"></a>

 Amazon Transcribe Medical에 대한 액세스를 제어하는 VPC 엔드포인트에 엔드포인트 정책을 연결할 수 있습니다. 이 정책은 다음 정보를 지정합니다.
+ 작업을 수행할 수 있는 위탁자.
+ 수행할 수 있는 작업.
+ 작업을 수행할 수 있는 리소스.

자세한 내용은 *Amazon VPC 사용 설명서*의 [VPC 엔드포인트를 통해 서비스에 대한 액세스 제어](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-endpoints-access.html)를 참조하세요.

**예: Amazon Transcribe Medical 스트리밍 트랜스크립션 작업에 대한 VPC 엔드포인트 정책**  
다음은 Amazon Transcribe Medical에서 스트리밍 트랜스크립션을 위한 엔드포인트 정책의 예입니다. 엔드포인트에 연결되면이 정책은 모든 리소스의 모든 보안 주체에 대해 나열된 Amazon Transcribe Medical 작업에 대한 액세스 권한을 부여합니다.

```
{
   "Statement":[
      {
         "Principal":"*",
         "Effect":"Allow",
         "Action":[
            "transcribe:StartMedicalStreamTranscription",
         ],
         "Resource":"*"
      }
   ]
}
```

**예: Amazon Transcribe Medical 배치 트랜스크립션 작업에 대한 VPC 엔드포인트 정책**  
다음은 Amazon Transcribe Medical에서 배치 트랜스크립션을 위한 엔드포인트 정책의 예입니다. 엔드포인트에 연결되면이 정책은 모든 리소스의 모든 보안 주체에 대해 나열된 Amazon Transcribe Medical 작업에 대한 액세스 권한을 부여합니다.

```
{
   "Statement":[
      {
         "Principal":"*",
         "Effect":"Allow",
         "Action":[
            "transcribe:StartMedicalTranscriptionJob"
         ],
         "Resource":"*"
      }
   ]
}
```

## 공유 서브넷
<a name="med-vpc-shared-subnets"></a>

공유하는 서브넷의 VPC 엔드포인트는 생성, 설명, 수정 또는 삭제할 수 없습니다. 그러나 공유하는 서브넷의 VPC 엔드포인트를 사용할 수는 있습니다. VPC 공유에 대한 자세한 내용은 Amazon Virtual Private Cloud 가이드의 [다른 계정과 VPC 공유를 참조하세요](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-sharing.html#vpc-sharing-service-behavior).