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-northeast1asia-south1asia-southeast1australia-southeast1eueurope-west1europe-west2europe-west3europe-west4northamerica-northeast1usus-central1us-east1us-east4us-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 MODELstatement. 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.getIamPolicyandresourcemanager.projects.setIamPolicy - Create a model and run inference:
bigquery.jobs.createbigquery.models.createbigquery.models.getDatabigquery.models.updateDatabigquery.models.updateMetadata
- Create an object table:
bigquery.tables.createandbigquery.tables.update - Create a speech recognizer:
speech.recognizers.createspeech.recognizers.getspeech.recognizers.recognizespeech.recognizers.update
You might also be able to get these permissions with custom roles or other predefined roles.
Before you begin
- 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.
-
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 theresourcemanager.projects.createpermission.