Google Cloud 프로젝트에 Cloud Speech-to-Text 설정

Cloud Speech-to-Text는 오디오 데이터를 입력으로 받아 Google의 AI 기술을 사용하여 텍스트 변환을 출력하는 API입니다. 이 페이지에서는 API를 호출할 수 있도록 프로젝트의 Cloud Speech-to-Text API를 설정하는 방법을 보여줍니다.

이 문서에서는 다음 내용을 다룹니다.

  • Google Cloud 프로젝트에 Cloud Speech-to-Text API 사용 설정 및 중지
  • Cloud Speech-to-Text 결제 사용 설정
  • 선택사항: 대용량 파일의 오디오 데이터를 저장할 새 Google Cloud 스토리지 버킷 만들기

이 문서에서는 Cloud Speech-to-Text API를 사용하여 요청을 보내고 받는 방법을 다루지 않습니다. 실제 코드에 Cloud Speech-to-Text를 통합하는 방법을 알아보려면 개요 페이지를 참고하세요.

시작하기 전에

서비스에 액세스하는 방법에는 REST API를 사용하거나Google Cloud 콘솔을 사용하는 두 가지가 있습니다.

이 가이드에서는 REST API로 요청을 보내기 위해 필요한 단계를 설명합니다. 코딩을 처음 사용하는 경우 이 단계를 시작하기 전에 Google Cloud플랫폼의 단계별 콘솔 내 튜토리얼부터 시작하는 것이 좋습니다.

Google Cloud 프로젝트에 Cloud Speech-to-Text API 사용 설정

  1. Google Cloud 콘솔에 로그인합니다.

  2. 프로젝트 선택기 페이지를 열고 기존 프로젝트를 선택하거나 새 프로젝트를 만듭니다. 프로젝트 생성에 대한 자세한 내용은 프로젝트 만들기 및 관리를 참고하세요.

  3. 새 프로젝트를 만들면 결제 계정을 이 프로젝트에 연결하라는 메시지가 표시됩니다. 기존 프로젝트를 사용중인 경우 결제가 사용 설정되어 있는지 확인합니다.

    프로젝트에 결제가 사용 설정되어 있는지 확인하는 방법을 알아보세요.

  4. Cloud Speech-to-Text API를 사용 설정합니다. 페이지 상단의 제품 및 리소스 검색 텍스트 필드를 클릭하고 'speech'를 입력합니다. 결과 목록에서 Cloud Speech-to-Text API를 선택합니다.

  5. 프로젝트에서 사용할 Cloud Speech-to-Text API를 사용 설정하려면 사용 설정을 클릭합니다. API를 프로젝트에 연결하지 않고 Cloud Speech-to-Text를 사용해 보려면 API 사용해 보기를 클릭합니다.

  6. 선택사항: (API V1만 해당) 데이터 로깅을 사용 설정합니다. 데이터 로깅을 선택하면 Cloud Speech-to-Text로 전송하는 모든 오디오 데이터를 Google이 기록하도록 허용할 수 있습니다. 이 데이터는 Cloud Speech-to-Text 모델을 개선하는 데 사용됩니다. 데이터 로깅을 선택한 사용자는 더 저렴한 가격으로 이용할 수 있습니다. 자세한 내용은 가격 책정 및 데이터 로깅 이용약관 페이지를 참고하세요.

선택사항: Cloud Storage 버킷 만들기

60초보다 길거나 파일 크기가 10MB보다 큰 오디오 스크립트를 작성하려면 Cloud Storage 버킷에 오디오 데이터를 저장해야 Cloud Speech-to-Text를 사용해 스크립트를 작성할 수 있습니다.

새 Cloud Storage 버킷을 만들려면 다음 단계를 따르세요.

  • In the Google Cloud console, go to the Cloud Storage Buckets page.

    Go to Buckets

  • Click Create.
  • On the Create a bucket page, enter your bucket information. To go to the next step, click Continue.
    1. For Name your bucket, enter a unique bucket name. Don't include sensitive information in the bucket name, because the bucket namespace is global and publicly visible.
    2. In the Choose where to store your data section, do the following:
      1. Select a Location type.
      2. Choose a location where your bucket's data is permanently stored from the Location type drop-down menu.
      3. To set up cross-bucket replication, select Add cross-bucket replication via Storage Transfer Service and follow these steps:

        Set up cross-bucket replication

        1. In the Bucket menu, select a bucket.
        2. In the Replication settings section, click Configure to configure settings for the replication job.

          The Configure cross-bucket replication pane appears.

          • To filter objects to replicate by object name prefix, enter a prefix that you want to include or exclude objects from, then click Add a prefix.
          • To set a storage class for the replicated objects, select a storage class from the Storage class menu. If you skip this step, the replicated objects will use the destination bucket's storage class by default.
          • Click Done.
    3. In the Choose how to store your data section, do the following:
      1. Select a default storage class for the bucket or Autoclass for automatic storage class management of your bucket's data.
      2. To enable hierarchical namespace, in the Optimize storage for data-intensive workloads section, select Enable hierarchical namespace on this bucket.
    4. In the Choose how to control access to objects section, select whether or not your bucket enforces public access prevention, and select an access control method for your bucket's objects.
    5. In the Choose how to protect object data section, do the following:
      • Select any of the options under Data protection that you want to set for your bucket.
        • To enable soft delete, click the Soft delete policy (For data recovery) checkbox, and specify the number of days you want to retain objects after deletion.
        • To set Object Versioning, click the Object versioning (For version control) checkbox, and specify the maximum number of versions per object and the number of days after which the noncurrent versions expire.
        • To enable the retention policy on objects and buckets, click the Retention (For compliance) checkbox, and then do the following:
          • To enable Object Retention Lock, click the Enable object retention checkbox.
          • To enable Bucket Lock, click the Set bucket retention policy checkbox, and choose a unit of time and a length of time for your retention period.
      • To choose how your object data will be encrypted, expand the Data encryption section (), and select a Data encryption method.
  • Click Create.
  • Cloud Speech-to-Text API 사용 중지

    프로젝트에서 Cloud Speech-to-Text API를 더 이상 사용할 필요가 없는 경우 다음 단계를 따르세요.

    1. Google Cloud 대시보드로 이동하여 API 개요로 이동을 클릭합니다.
    2. Cloud Speech-to-Text API를 선택합니다.
    3. API 사용 중지를 클릭합니다.

    다음 단계

    클라이언트 라이브러리, gcloud, 명령줄 또는 Speech-to-Text UI를 사용하여 Cloud Speech-to-Text API에 스크립트 작성 요청을 보내는 방법을 알아보세요.