Uses Azure Speech Cloud, REST HTTP channel (streamed). +\ :description2: For the procedure for registering an MS Azure account and the cost of the service, see https://learn.microsoft.com/en-us/azure/ai-services/speech-service/.
Depending on whether caching is configured on the synthesis service and whether there is data for the synthesized text, the first one and a half seconds can be returned from 300 to 1500 ms.
Speech Synthesis Component (Azure Cloud Speech)
:icons:font :hardbreaks: :imagesdir: ../../../assets/images :toc-title: Contents :toc:
Description
Performs speech synthesis from text and playback to the current subscriber. +\
Setting up a connection in the section domain settings, field 'azure_cloud'.
Allows you to play the result, as well as simply record it into an audio file.
In playback mode, speech begins to play when it appears in the data buffer for 1.5 seconds. +\
Index |
|
Short name |
|
Script types |
|
Start module |
|
Mode |
Asynchronous |
Icon |
|
Branching type |
Branching, interrupting |
Properties
| Specification | Description |
|---|---|
Name: Azure Speech Account Code: Visibility condition: no Default: |
Indication of the account that defines connection points to the Microsoft Azure Speech service. The list contains the 'default' value, which sets the 'speech' root fields to be used in the 'settings.azure_cloud' object. Additionally, the list includes the keys of the 'settings.azure_cloud.accounts' object, each of which also contains an object with separately configured access parameters. |
Name: Mode Code: Visibility condition: no Default: Playback |
The operating mode of the component after receiving a response from the TTS Azure Speech service. Possible options:
|
Name: Content Type Code: Visibility condition: no Default: |
Format of data transmitted in the request body (content_type). Possible options:
|
Name: Text Code: Visibility condition: no Default: — |
SSML markup with text. In addition to the text, the markup indicates the voice model used. Example: <speak version='1.0' xml:lang='en-US'>
<voice xml:lang='en-US' xml:gender='Male' name='en-US-ChristopherNeural'>
I'm excited to try text to speech!
</voice>
</speak>
Details in the Azure TTS documentation (https://learn.microsoft.com/en-us/azure/ai-services/speech-service/rest-text-to-speech?tabs=streaming) |
Name: Caching Code: Visibility condition: no Default: no |
Caching mode for speech synthesis results. Caching is designed to speed up the output of the result when frequently accessing the same tasks to the synthesis service, as well as reduce the load on the synthesis service. If synthesis data changes regularly, it is harmful to cache such operations, since you will have to define and configure a procedure for periodically clearing them. The first time, if the value is missing, the file is generated using the service and saved in the folder ':GlobalShare/domains/DOMAIN/cache/azure_tts/…'. In the future, when a file is detected in the cache, calls to the TTS Azure Speech service do not occur, the file is copied from the cache. The unique file name hides the display of synthesis parameters: text, language, voice. Files from the cache are not automatically deleted. It is necessary to separately configure the procedure for deleting obsolete data. The criterion may be, for example, the time of the last access to the file. Possible options:
|
Name: Abort on DTMF
Code: Default: No |
DTMF detector switch. Opens the settings for the modes of saving characters and interrupting the operation. |
Name: Buffer for DTMF Code: Visibility condition: yes Default: — |
Variable for storing received DTMF characters. |
Name: Clear DTMF buffer Code: Visibility condition: yes Default: Yes |
DTMF buffer pre-clear switch. |
Name: Number of characters Code: Visibility condition: yes Default: — |
An argument containing a limit on the number of characters entered. Once the specified number of DTMF symbols are received during execution of a component, the playback operation is completed. |
Name: Interrupt characters Code: Visibility condition: yes Default: — |
A string containing sequences of break characters separated by commas. When a character sequence matching one of the specified interrupt sequences is detected at the end of the DTMF buffer, the playback operation is completed. For example, |
Name: Response waiting timeout, s Code: Visibility condition: no Default: — |
Timeout waiting for a response from the TTS Azure Speech service after sending a request to it. After the timeout expires, control is transferred to the next component along the Time branch. |
Name: Response code to variable Code: Visibility condition: no Default: — |
Variable for storing the HTTP response code of the recognition service. |
Name: Path to file in variable
Code: Default: — |
Variable for saving the path to the synthesized speech audio file in a local temporary directory. To save a file for a long time, the script requires further movement of the file to a permanent storage location. |
Name: Transition Code: Visibility condition: no Default: — |
The component to which control is transferred if the operation completes successfully. |
Name: Transition, time Code: Visibility condition: no Default: — |
The component to which control is transferred if the HTTP response from the service times out. |
Name: Transition, error
Code: Default: — |
Component to which control is transferred in case of an error. |