After you create your notebook and add data sources to it, you can programmatically generate an audio overview of the notebook. At a time, a given notebook can have only one audio overview. This page describes how to create and delete audio overviews.
Difference between an audio overview and a podcast
An audio overview is different from a podcast in the following ways:
- An audio overview must be associated with a notebook with data sources added to it. On the other hand, a podcast can be generated without a NotebookLM Enterprise notebook, an Agentspace license, or a data store. To create a podcast, all you need is an enabled Google Cloud project and the Podcast API User role.
- To create an audio overview, call the
notebooks.audioOverview
method. To create a podcast, call thepodcasts
method—a standalone API.
Create an audio overview
To generate an audio overview for the content in your notebook, call the
notebooks.audioOverviews.create
method. Because you can have only one audio overview per notebook, this method
is successful only if the notebook has no existing audio overview.
REST
curl -X POST \
-H "Authorization:Bearer $(gcloud auth print-access-token)" \
"https://ENDPOINT_LOCATION-discoveryengine.googleapis.com/v1alpha/projects/PROJECT_NUMBER/locations/LOCATION/notebooks/NOTEBOOK_ID/audioOverviews" \
-d '{
"sourceIds": [
{
"id": "SOURCE_ID"
}
],
"episodeFocus": "EPISODE_FOCUS",
"languageCode": "LANGUAGE_CODE"
}
Replace the following:
ENDPOINT_LOCATION
: the multi-region for your API request. Assign one of the following values:us-
for the US multi-regioneu-
for the EU multi-regionglobal-
for the Global location
PROJECT_NUMBER
: the number of your Google Cloud project.LOCATION
: the geographic location of your data store, such asglobal
. For more information, see Locations.NOTEBOOK_ID
: the unique identifier of the notebook.SOURCE_ID
: the ID of the source based on which you want to generate the audio overview. ThesourceIdsfield
is optional array; if you don't specify any source IDs, all sources in the notebook are used. For information about source ID, see Add and manage data sources in a notebook (API).EPISODE_FOCUS
: a string that describes which topics or content must be highlighted in the audio overview.LANGUAGE_CODE
: the language code that the audio overview was requested in.
If the request is successful, you should get a JSON response similar to the following. This response shows that the audio overview generation is in progress.
{
"audioOverview": {
"status": "AUDIO_OVERVIEW_STATUS_IN_PROGRESS",
"audioOverviewId": "AUDIO_OVERVIEW_ID",
"generationOptions": {},
"name": "AUDIO_OVERVIEW_NAME"
}
}
It takes a few minutes to generate an audio overview.
Verify a generated audio overview
To verify the generated audio overview, do the following:
- Open your notebook. For more information, see Access the created notebook.
In your notebook's Studio, click Load to load the conversation. It takes a few moments to load the overview.
In the studio, you can manage your audio overview with tasks such as changing the playback speed and downloading or deleting the audio overview file.
Delete an audio overview
To delete an existing audio overview, call the
notebooks.audioOverviews.delete
method.
REST
curl -X DELETE \
-H "Authorization:Bearer $(gcloud auth print-access-token)" \
"https://ENDPOINT_LOCATION-discoveryengine.googleapis.com/v1alpha/projects/PROJECT_NUMBER/locations/LOCATION/notebooks/NOTEBOOK_ID/audioOverviews/default" \
Replace the following:
ENDPOINT_LOCATION
: the multi-region for your API request. Assign one of the following values:us-
for the US multi-regioneu-
for the EU multi-regionglobal-
for the Global location
PROJECT_NUMBER
: the number of your Google Cloud project.LOCATION
: the geographic location of your data store, such asglobal
. For more information, see Locations.NOTEBOOK_ID
: the unique identifier of the notebook.
If the request is successful, you should get an empty JSON.