AWS SDK 또는 GetVocabulary CLI와 함께 사용 - Amazon Transcribe

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

AWS SDK 또는 GetVocabulary CLI와 함께 사용

다음 코드 예제는 GetVocabulary의 사용 방법을 보여줍니다.

작업 예제는 대규모 프로그램에서 발췌한 코드이며 컨텍스트에 맞춰 실행해야 합니다. 다음 코드 예제에서는 컨텍스트 내에서 이 작업을 확인할 수 있습니다.

.NET
AWS SDK for .NET
참고

더 많은 정보가 있습니다 GitHub. AWS 코드 예제 리포지토리에서 전체 예제를 찾고 설정 및 실행하는 방법을 배워보세요.

/// <summary> /// Get information about a custom vocabulary. /// </summary> /// <param name="vocabularyName">Name of the vocabulary.</param> /// <returns>The state of the custom vocabulary.</returns> public async Task<VocabularyState> GetCustomVocabulary(string vocabularyName) { var response = await _amazonTranscribeService.GetVocabularyAsync( new GetVocabularyRequest() { VocabularyName = vocabularyName }); return response.VocabularyState; }
  • API 세부 정보는 AWS SDK for .NET API GetVocabulary참조를 참조하십시오.

CLI
AWS CLI

사용자 지정 어휘에 대한 정보를 가져오려면

다음 get-vocabulary 예시에서는 이전에 생성한 사용자 지정 어휘에 대한 정보를 가져옵니다.

aws transcribe get-vocabulary \ --vocabulary-name cli-vocab-1

출력:

{ "VocabularyName": "cli-vocab-1", "LanguageCode": "language-code", "VocabularyState": "READY", "LastModifiedTime": "2020-09-19T23:22:32.836000+00:00", "DownloadUri": "https://link-to-download-the-text-file-used-to-create-your-custom-vocabulary" }

자세한 내용은 Amazon Transcribe 개발자 안내서사용자 지정 어휘를 참조하세요.

  • API 세부 정보는 AWS CLI 명령 GetVocabulary참조를 참조하십시오.

Python
SDK for Python(Boto3)
참고

자세한 내용은 에서 확인할 수 GitHub 있습니다. AWS 코드 예제 리포지토리에서 전체 예제를 찾고 설정 및 실행하는 방법을 배워보세요.

def get_vocabulary(vocabulary_name, transcribe_client): """ Gets information about a custom vocabulary. :param vocabulary_name: The name of the vocabulary to retrieve. :param transcribe_client: The Boto3 Transcribe client. :return: Information about the vocabulary. """ try: response = transcribe_client.get_vocabulary(VocabularyName=vocabulary_name) logger.info("Got vocabulary %s.", response["VocabularyName"]) except ClientError: logger.exception("Couldn't get vocabulary %s.", vocabulary_name) raise else: return response
  • API에 대한 자세한 내용은 파이썬용AWS SDK (Boto3) API 레퍼런스를 참조하십시오 GetVocabulary.

AWS SDK 개발자 가이드 및 코드 예제의 전체 목록은 을 참조하십시오. SDK와 함께 이 서비스 사용 AWS 이 주제에는 시작하기에 대한 정보와 이전 SDK 버전에 대한 세부 정보도 포함되어 있습니다.