Skip to main content

Audio (Voice recording) block

Use the Audio block to add an audio file to your script.

You can add pre-recorded phrase, some music, or any other sound file.

caution
In scripts for calls, the block for sending audio is called Voice recording.

What channels support the Audio block?

You can use the Audio block:

  • In call campaigns
  • In voice assistants (Yandex Alice, Google Assistant)
  • In VK
  • In Telegram

The bot will only play the contents of the audio file in call campaigns or voice assistants.

  • In Telegram, you can add an mp3 file to an Audio block. The bot will just send this mp3 file to the user. Then the user will have to click the file to play the audio.

  • In VK, you can add an mp3 or a wav file. The file will be sent as a voice message. Then the user will have to click the audio file to play it.

    However, you will have to make sure the Allow access to the documents of the community permission is enabled in your community settings.

If there’s an Audio block in a script you’ve published to some other channel, where this block is not supported, the audio won’t be displayed or played there.

How do I add an Audio block?

To add a new screen with Audio block, hover your mouse over empty space in your script and press Add screen. From the block menu, pick Audio.

To add an Audio block to an existing screen, click + Block on the screen and pick Audio from the block menu.

Adding an audio file

You can upload a file from your computer or specify the link to it if you want to add an audio file.

In any case, make sure it complies to the file requirements

  • To upload a file from you computer, drag it to the block area or click Attach file to use Finder or Explorer and select the file from your disk.

  • To add a file via link switch to the Using link tab and paste your link into the field. You can add script variables into the URL.

    • To use variables in the Audio block, you add an HTTP query block and make a correct request to the service that will return the required variables
    • Make sure you click Add after pasting the link or do Ctrl+Enter (Cmd+Enter for macOS)

Alternating files

You can add multiple audio files to a single Audio block. The bot will then randomly choose the file to be played.

File requirements

For calling:

  • .wav file format,
  • 1 channel (mono),
  • 16-bit (PCM) little endian encoding,
  • frequency: 8000 to 48 000 Hz.

For voice assistants and Telegram:

  • .mp3 file format,
  • 16-bit encoding,
  • frequency: 24 000 Hz,
  • bitrate: 24kbps to 96kbps.

Recommended audio duration per reply:

  • up to 240 seconds for Google Assistant
  • up to 120 seconds for Alice

This restriction applies to the combined duration of all Audio blocks within a single screen.

The file is not played in the channel. What should I do?

If the file you uploaded fails to play in the channel, try converting it to the format and the parameters specified above for your channel. You can use any service to convert your file, such as this one.

For example, you should select the following parameters to convert your file to wav: