Transcribe audio files with the ML.TRANSCRIBE function

This document describes how to use the ML.TRANSCRIBE function with a remote model to transcribe audio files from an object table.

Supported locations

You must create the remote model used in this procedure in one of the following locations:

  • asia-northeast1
  • asia-south1
  • asia-southeast1
  • australia-southeast1
  • eu
  • europe-west1
  • europe-west2
  • europe-west3
  • europe-west4
  • northamerica-northeast1
  • us
  • us-central1
  • us-east1
  • us-east4
  • us-west1

You must run the ML.TRANSCRIBE function in the same region as the remote model.

Required roles

To create a remote model and transcribe audio files, you need the following Identity and Access Management (IAM) roles at the project level:

  • Create a speech recognizer: Cloud Speech Editor (roles/speech.editor)
  • Create and use BigQuery datasets, tables, and models: BigQuery Data Editor (roles/bigquery.dataEditor)
  • Create, delegate, and use BigQuery connections: BigQuery Connections Admin (roles/bigquery.connectionsAdmin)

    If you don't have a default connection configured, you can create and set one as part of running the CREATE MODEL statement. To do so, you must have BigQuery Admin (roles/bigquery.admin) on your project. For more information, see Configure the default connection.

  • Grant permissions to the connection's service account: Project IAM Admin (roles/resourcemanager.projectIamAdmin)

  • Create BigQuery jobs: BigQuery Job User (roles/bigquery.jobUser)

These predefined roles contain the permissions required to perform the tasks in this document. To see the exact permissions that are required, expand the Required permissions section:

Required permissions

  • Create a dataset: bigquery.datasets.create
  • Create, delegate, and use a connection: bigquery.connections.*
  • Set service account permissions: resourcemanager.projects.getIamPolicy and resourcemanager.projects.setIamPolicy
  • Create a model and run inference:
    • bigquery.jobs.create
    • bigquery.models.create
    • bigquery.models.getData
    • bigquery.models.updateData
    • bigquery.models.updateMetadata
  • Create an object table: bigquery.tables.create and bigquery.tables.update
  • Create a speech recognizer:
    • speech.recognizers.create
    • speech.recognizers.get
    • speech.recognizers.recognize
    • speech.recognizers.update

You might also be able to get these permissions with custom roles or other predefined roles.

Before you begin

  1. Sign in to your Google Cloud account. If you're new to Google Cloud, create an account to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.
  2. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Roles required to select or create a project

    • Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
    • Create a project: To create a project, you need the Project Creator role (roles/resourcemanager.projectCreator), which contains the resourcemanager.projects.create permission.