With Dialogflow CX, you can let virtual agents respond with pre-recorded audio. This lets you use high-quality audio files instead of standard text-to-speech. This capability is available for all voice channels, including inbound and outbound calls. It's available for support virtual agents, task virtual agents, and post-session virtual agents. Barge-in is not supported during pre-recorded audio playback.
For more information, see Play prerecorded audio .
Before you begin
Host your audio files in a publicly-accessible service such as Cloud Storage. The audio file must be in WAV format.
Configure pre-recorded audio for virtual agent responses
To configure pre-recorded audio for virtual agent responses, follow these steps:
-
Go to the Conversational Agents console.
-
Select the project that contains your agent.
-
Select your agent.
-
In the navigation menu, click Flows.
-
Click the flow that you want.
-
In the flow pane, click the page that you want.
-
For Entry fulfillment, click Edit Fulfillment. The Fulfillmentdialog appears.
-
Click Add dialogue response > Play pre-recorded audio.
-
In the Play pre-recorded audiofield, enter the full, publicly-accessible URI for your WAV file—for example,
gs://YOUR_BUCKET/YOUR_AUDIO_FILE.wav. -
Optional: Add additional dialog response types. You can use the Move upand Move downarrows to reorder the dialog responses.
-
Click Save.
Failure handling
If playback of pre-recorded audio fails (due to an inaccessible URI or a malformed audio file, for example), you can expect the following behavior:
-
The system silently skips that fulfillment segment so that the end-user isn't aware of the failure.
-
Other fulfillments in the same response are processed as expected.
-
The system logs an error that includes the following:
-
Timestamp
-
Session ID
-
Virtual agent ID
-
Error code or error message
-

