How to include currency on TTS messages

 

SCG service provides the Text-To-Speech (TTS) functionality for the transmission of voice messages using voice enabled sender ids. This TTS functionality is available in the messages API and in the Calls API end points.

This article describes the Calls API functionality to play TTS on active calls. We will describe the steps to initiate voice calls for different use cases, initiating outbound calls that will include the transmission of Text-to-Speech messages.

In some use cases, the message includes currency amounts that must to be spoken correctly, according to currency speech conventions. In the practice, SCG requires explicit notation for this functionality to correctly speech currency amounts and can include a variety of different currency symbols as Dollars ($), Euros (€), Pounds (£), Yens (¥).

 

This document provides an example of how SCG Voice Calls service can start a voice call and TTS a voice message that includes a currency amount.

 

Use Case: Account balance

This use case is the typical account balance inquiry for a financial institution.

1. Create the call: this API call returns a call_id.

curl -X POST https://api.syniverse.com/scg-external-api/api/v1/calling/calls \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{
"from": "QMSaQfsYiQ00BgNXXXXXXX",
"to": "+5066173XXXX"
}'

R/ {"id":"cHxCtNpFkDbFUXrXXXXXXX"}

 

2. Send the TTS using the call_id: cHxCtNpFkDbFUXrXXXXXXX

curl -X POST https://api.syniverse.com/scg-external-api/api/v1/calling/calls/cHxCtNpFkDbFUXrXXXXXXX/play_tts \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{
"text": "Hello, your balance is \\$123.60",
"voice":"matthew"
}'

 

The 'Matthew' voice will speech: "Hello, your balance is one hundred twenty-three dollars and sixty cents"

The prefix \\ and the currency symbol are the key for the correct speech of the amount.

 

3. Hanging up the call

curl -X POST https://api.syniverse.com/scg-external-api/api/v1/calling/calls/cHxCtNpFkDbFUXrXXXXXXX \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{
"state":"COMPLETED"
}'

 

The advantage of the use Voice Calling API is that the customer can add other functionalities as DTMF and Digits Collectors to implement more complex logic as validating pin codes in the active Voice call.

 

 

For further information about Voice Calls API click here

 

 

 

 

 

 

 

 

Was this article helpful?
0 out of 0 found this helpful

0 Comments

Please sign in to leave a comment.