기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.
AWS SDK 또는 CLI와 StartMedicalTranscriptionJob
함께 사용
다음 코드 예제는 StartMedicalTranscriptionJob
의 사용 방법을 보여 줍니다.
- .NET
-
- AWS SDK for .NET
-
참고
GitHub에 더 많은 내용이 있습니다. AWS 코드 예시 리포지토리
에서 전체 예시를 찾고 설정 및 실행하는 방법을 배워보세요. /// <summary> /// Start a medical transcription job for a media file. This method returns /// as soon as the job is started. /// </summary> /// <param name="jobName">A unique name for the medical transcription job.</param> /// <param name="mediaFileUri">The URI of the media file, typically an Amazon S3 location.</param> /// <param name="mediaFormat">The format of the media file.</param> /// <param name="outputBucketName">Location for the output, typically an Amazon S3 location.</param> /// <param name="transcriptionType">Conversation or dictation transcription type.</param> /// <returns>A MedicalTransactionJob instance with information on the new job.</returns> public async Task<MedicalTranscriptionJob> StartMedicalTranscriptionJob( string jobName, string mediaFileUri, MediaFormat mediaFormat, string outputBucketName, Amazon.TranscribeService.Type transcriptionType) { var response = await _amazonTranscribeService.StartMedicalTranscriptionJobAsync( new StartMedicalTranscriptionJobRequest() { MedicalTranscriptionJobName = jobName, Media = new Media() { MediaFileUri = mediaFileUri }, MediaFormat = mediaFormat, LanguageCode = LanguageCode .EnUS, // The value must be en-US for medical transcriptions. OutputBucketName = outputBucketName, OutputKey = jobName, // The value is a key used to fetch the output of the transcription. Specialty = Specialty.PRIMARYCARE, // The value PRIMARYCARE must be set. Type = transcriptionType }); return response.MedicalTranscriptionJob; }
-
API 세부 정보는 AWS SDK for .NET API 참조의 StartMedicalTranscriptionJob을 참조하세요.
-
- CLI
-
- AWS CLI
-
예 1: 오디오 파일로 저장된 의료 구술을 트랜스크립션하는 방법
다음
start-medical-transcription-job
예시에서는 오디오 파일을 트랜스크립션합니다.OutputBucketName
파라미터에는 트랜스크립션 출력의 위치를 지정합니다.aws transcribe start-medical-transcription-job \ --cli-input-json
file://myfile.json
myfile.json
의 콘텐츠:{ "MedicalTranscriptionJobName": "simple-dictation-medical-transcription-job", "LanguageCode": "language-code", "Specialty": "PRIMARYCARE", "Type": "DICTATION", "OutputBucketName":"amzn-s3-demo-bucket", "Media": { "MediaFileUri": "s3://amzn-s3-demo-bucket/your-audio-file.extension" } }
출력:
{ "MedicalTranscriptionJob": { "MedicalTranscriptionJobName": "simple-dictation-medical-transcription-job", "TranscriptionJobStatus": "IN_PROGRESS", "LanguageCode": "language-code", "Media": { "MediaFileUri": "s3://amzn-s3-demo-bucket/your-audio-file.extension" }, "StartTime": "2020-09-20T00:35:22.256000+00:00", "CreationTime": "2020-09-20T00:35:22.218000+00:00", "Specialty": "PRIMARYCARE", "Type": "DICTATION" } }
자세한 내용은 Amazon Transcribe 개발자 안내서의 배치 트랜스크립션 개요를 참조하세요.
예시 2: 오디오 파일로 저장된 의사와 환자 간 대화 트랜스크립션
다음
start-medical-transcription-job
예시에서는 의사와 환자 간 대화가 포함된 오디오 파일을 트랜스크립션합니다. OutputBucketName 파라미터에는 트랜스크립션 출력의 위치를 지정합니다.aws transcribe start-medical-transcription-job \ --cli-input-json
file://mysecondfile.json
mysecondfile.json
의 콘텐츠:{ "MedicalTranscriptionJobName": "simple-dictation-medical-transcription-job", "LanguageCode": "language-code", "Specialty": "PRIMARYCARE", "Type": "CONVERSATION", "OutputBucketName":"amzn-s3-demo-bucket", "Media": { "MediaFileUri": "s3://amzn-s3-demo-bucket/your-audio-file.extension" } }
출력:
{ "MedicalTranscriptionJob": { "MedicalTranscriptionJobName": "simple-conversation-medical-transcription-job", "TranscriptionJobStatus": "IN_PROGRESS", "LanguageCode": "language-code", "Media": { "MediaFileUri": "s3://amzn-s3-demo-bucket/your-audio-file.extension" }, "StartTime": "2020-09-20T23:19:49.965000+00:00", "CreationTime": "2020-09-20T23:19:49.941000+00:00", "Specialty": "PRIMARYCARE", "Type": "CONVERSATION" } }
자세한 내용은 Amazon Transcribe 개발자 안내서의 배치 트랜스크립션 개요를 참조하세요.
예시 3: 의사와 환자 간 대화가 담긴 다중 채널 오디오 파일 트랜스크립션
다음
start-medical-transcription-job
예시에서는 오디오 파일에 있는 각 채널의 오디오를 트랜스크립션하고 각 채널의 개별 트랜스크립션을 단일 트랜스크립션 출력으로 병합합니다.OutputBucketName
파라미터에는 트랜스크립션 출력의 위치를 지정합니다.aws transcribe start-medical-transcription-job \ --cli-input-json
file://mythirdfile.json
mythirdfile.json
의 콘텐츠:{ "MedicalTranscriptionJobName": "multichannel-conversation-medical-transcription-job", "LanguageCode": "language-code", "Specialty": "PRIMARYCARE", "Type": "CONVERSATION", "OutputBucketName":"amzn-s3-demo-bucket", "Media": { "MediaFileUri": "s3://amzn-s3-demo-bucket/your-audio-file.extension" }, "Settings":{ "ChannelIdentification": true } }
출력:
{ "MedicalTranscriptionJob": { "MedicalTranscriptionJobName": "multichannel-conversation-medical-transcription-job", "TranscriptionJobStatus": "IN_PROGRESS", "LanguageCode": "language-code", "Media": { "MediaFileUri": "s3://amzn-s3-demo-bucket/your-audio-file.extension" }, "StartTime": "2020-09-20T23:46:44.081000+00:00", "CreationTime": "2020-09-20T23:46:44.053000+00:00", "Settings": { "ChannelIdentification": true }, "Specialty": "PRIMARYCARE", "Type": "CONVERSATION" } }
자세한 내용은 Amazon Transcribe 개발자 안내서의 채널 식별을 참조하세요.
예시 4: 의사와 환자 간 대화의 오디오 파일을 트랜스크립션하고 트랜스크립션 출력에서 화자 식별
다음
start-medical-transcription-job
예시에서는 오디오 파일을 트랜스크립션하고 트랜스크립션 출력에서 각 화자의 음성에 레이블을 지정합니다.OutputBucketName
파라미터에는 트랜스크립션 출력의 위치를 지정합니다.aws transcribe start-medical-transcription-job \ --cli-input-json
file://myfourthfile.json
myfourthfile.json
의 콘텐츠:{ "MedicalTranscriptionJobName": "speaker-id-conversation-medical-transcription-job", "LanguageCode": "language-code", "Specialty": "PRIMARYCARE", "Type": "CONVERSATION", "OutputBucketName":"amzn-s3-demo-bucket", "Media": { "MediaFileUri": "s3://amzn-s3-demo-bucket/your-audio-file.extension" }, "Settings":{ "ShowSpeakerLabels": true, "MaxSpeakerLabels": 2 } }
출력:
{ "MedicalTranscriptionJob": { "MedicalTranscriptionJobName": "speaker-id-conversation-medical-transcription-job", "TranscriptionJobStatus": "IN_PROGRESS", "LanguageCode": "language-code", "Media": { "MediaFileUri": "s3://amzn-s3-demo-bucket/your-audio-file.extension" }, "StartTime": "2020-09-21T18:43:37.265000+00:00", "CreationTime": "2020-09-21T18:43:37.157000+00:00", "Settings": { "ShowSpeakerLabels": true, "MaxSpeakerLabels": 2 }, "Specialty": "PRIMARYCARE", "Type": "CONVERSATION" } }
자세한 내용은 Amazon Transcribe 개발자 안내서의 화자 식별을 참조하세요.
예시 5: 최대 2개의 대체 트랜스크립션을 사용하여 오디오 파일로 저장된 의료 대화 트랜스크립션
다음
start-medical-transcription-job
예시에서는 단일 오디오 파일에서 최대 2개의 대체 트랜스크립션을 생성합니다. 모든 트랜스크립션에는 신뢰도가 있습니다. 기본적으로 Amazon Transcribe은 신뢰도가 가장 높은 트랜스크립션을 반환합니다. Amazon Transcribe가 신뢰도가 낮은 추가 트랜스크립션을 반환하도록 지정할 수도 있습니다.OutputBucketName
파라미터에는 트랜스크립션 출력의 위치를 지정합니다.aws transcribe start-medical-transcription-job \ --cli-input-json
file://myfifthfile.json
myfifthfile.json
의 콘텐츠:{ "MedicalTranscriptionJobName": "alternatives-conversation-medical-transcription-job", "LanguageCode": "language-code", "Specialty": "PRIMARYCARE", "Type": "CONVERSATION", "OutputBucketName":"amzn-s3-demo-bucket", "Media": { "MediaFileUri": "s3://amzn-s3-demo-bucket/your-audio-file.extension" }, "Settings":{ "ShowAlternatives": true, "MaxAlternatives": 2 } }
출력:
{ "MedicalTranscriptionJob": { "MedicalTranscriptionJobName": "alternatives-conversation-medical-transcription-job", "TranscriptionJobStatus": "IN_PROGRESS", "LanguageCode": "language-code", "Media": { "MediaFileUri": "s3://amzn-s3-demo-bucket/your-audio-file.extension" }, "StartTime": "2020-09-21T19:09:18.199000+00:00", "CreationTime": "2020-09-21T19:09:18.171000+00:00", "Settings": { "ShowAlternatives": true, "MaxAlternatives": 2 }, "Specialty": "PRIMARYCARE", "Type": "CONVERSATION" } }
자세한 내용은 Amazon Transcribe 개발자 안내서의 대체 트랜스크립션을 참조하세요.
예시 6: 최대 2개의 대체 트랜스크립션을 사용하여 의료 구술 오디오 파일 트랜스크립션
다음
start-medical-transcription-job
예시에서는 오디오 파일을 트랜스크립션하고 어휘 필터를 사용하여 원하지 않는 단어를 마스킹합니다. OutputBucketName 파라미터에는 트랜스크립션 출력의 위치를 지정합니다.aws transcribe start-medical-transcription-job \ --cli-input-json
file://mysixthfile.json
mysixthfile.json
의 콘텐츠:{ "MedicalTranscriptionJobName": "alternatives-conversation-medical-transcription-job", "LanguageCode": "language-code", "Specialty": "PRIMARYCARE", "Type": "DICTATION", "OutputBucketName":"amzn-s3-demo-bucket", "Media": { "MediaFileUri": "s3://amzn-s3-demo-bucket/your-audio-file.extension" }, "Settings":{ "ShowAlternatives": true, "MaxAlternatives": 2 } }
출력:
{ "MedicalTranscriptionJob": { "MedicalTranscriptionJobName": "alternatives-dictation-medical-transcription-job", "TranscriptionJobStatus": "IN_PROGRESS", "LanguageCode": "language-code", "Media": { "MediaFileUri": "s3://amzn-s3-demo-bucket/your-audio-file.extension" }, "StartTime": "2020-09-21T21:01:14.592000+00:00", "CreationTime": "2020-09-21T21:01:14.569000+00:00", "Settings": { "ShowAlternatives": true, "MaxAlternatives": 2 }, "Specialty": "PRIMARYCARE", "Type": "DICTATION" } }
자세한 내용은 Amazon Transcribe 개발자 안내서의 대체 트랜스크립션을 참조하세요.
예시 7: 사용자 지정 어휘로 정확도를 높여 의료 구술 오디오 파일 트랜스크립션
다음
start-medical-transcription-job
예시에서는 오디오 파일을 트랜스크립션하고 이전에 생성한 의료 사용자 지정 어휘를 사용하여 트랜스크립션 정확도를 높입니다.OutputBucketName
파라미터에는 트랜스크립션 출력의 위치를 지정합니다.aws transcribe start-transcription-job \ --cli-input-json
file://myseventhfile.json
mysixthfile.json
의 콘텐츠:{ "MedicalTranscriptionJobName": "vocabulary-dictation-medical-transcription-job", "LanguageCode": "language-code", "Specialty": "PRIMARYCARE", "Type": "DICTATION", "OutputBucketName":"amzn-s3-demo-bucket", "Media": { "MediaFileUri": "s3://amzn-s3-demo-bucket/your-audio-file.extension" }, "Settings":{ "VocabularyName": "cli-medical-vocab-1" } }
출력:
{ "MedicalTranscriptionJob": { "MedicalTranscriptionJobName": "vocabulary-dictation-medical-transcription-job", "TranscriptionJobStatus": "IN_PROGRESS", "LanguageCode": "language-code", "Media": { "MediaFileUri": "s3://amzn-s3-demo-bucket/your-audio-file.extension" }, "StartTime": "2020-09-21T21:17:27.045000+00:00", "CreationTime": "2020-09-21T21:17:27.016000+00:00", "Settings": { "VocabularyName": "cli-medical-vocab-1" }, "Specialty": "PRIMARYCARE", "Type": "DICTATION" } }
자세한 내용은 Amazon Transcribe 개발자 안내서의 의료 사용자 지정 어휘를 참조하세요.
-
API 세부 정보는 AWS CLI 명령 참조의 StartMedicalTranscriptionJob
을 참조하세요.
-
- JavaScript
-
- SDK for JavaScript (v3)
-
참고
GitHub에 더 많은 내용이 있습니다. AWS 코드 예시 리포지토리
에서 전체 예시를 찾고 설정 및 실행하는 방법을 배워보세요. 클라이언트를 생성합니다.
import { TranscribeClient } from "@aws-sdk/client-transcribe"; // Set the AWS Region. const REGION = "REGION"; //e.g. "us-east-1" // Create an Amazon Transcribe service client object. const transcribeClient = new TranscribeClient({ region: REGION }); export { transcribeClient };
의료 트랜스크립션 작업을 시작합니다.
// Import the required AWS SDK clients and commands for Node.js import { StartMedicalTranscriptionJobCommand } from "@aws-sdk/client-transcribe"; import { transcribeClient } from "./libs/transcribeClient.js"; // Set the parameters export const params = { MedicalTranscriptionJobName: "MEDICAL_JOB_NAME", // Required OutputBucketName: "OUTPUT_BUCKET_NAME", // Required Specialty: "PRIMARYCARE", // Required. Possible values are 'PRIMARYCARE' Type: "JOB_TYPE", // Required. Possible values are 'CONVERSATION' and 'DICTATION' LanguageCode: "LANGUAGE_CODE", // For example, 'en-US' MediaFormat: "SOURCE_FILE_FORMAT", // For example, 'wav' Media: { MediaFileUri: "SOURCE_FILE_LOCATION", // The S3 object location of the input media file. The URI must be in the same region // as the API endpoint that you are calling.For example, // "https://transcribe-demo.s3-REGION.amazonaws.com/hello_world.wav" }, }; export const run = async () => { try { const data = await transcribeClient.send( new StartMedicalTranscriptionJobCommand(params), ); console.log("Success - put", data); return data; // For unit tests. } catch (err) { console.log("Error", err); } }; run();
-
자세한 정보는 AWS SDK for JavaScript 개발자 안내서를 참조하십시오.
-
API 세부 정보는 AWS SDK for JavaScript API 참조의 StartMedicalTranscriptionJob을 참조하십시오.
-
AWS SDK 개발자 안내서 및 코드 예제의 전체 목록은 섹션을 참조하세요AWS SDK에서이 서비스 사용. 이 주제에는 시작하기에 대한 정보와 이전 SDK 버전에 대한 세부 정보도 포함되어 있습니다.