Play Text During a Call
POST https://api.plivo.com/v1/Account/{{auth_id}}/Call/{call_uuid}/Speak/
This endpoint allows you to speak text in an active call.
Below is the list of arguments that can be passed in this API request, more information can be found here
Arguments | Description | Required/Conditional/Optional |
---|---|---|
text | The text that needs to be spoken in the ongoing call. | Required |
voice | The voice in which the text should be spoken. The two allowed values are MAN and WOMAN. The default voice used is WOMAN. | Optional |
language | The language that needs to be used to speak the text. The default language is US English (en-US). The complete list of supported languages can be found in List of Languages Supported section.. | Optional |
legs | The call leg in which the text has to be spoken. This can take three values aleg (first leg of the call), bleg(second leg of the call) or both. The default value is aleg. | Optional |
loop | If set to true, the text will be spoken repeatedly unless stopped. The default value is set to false. | Optional |
mix | This flag is used to determine the behaviour of current call audio when the file is being played. If this is set to ‘false’ then participants of the call would not be able to hear anyone speaking in the call until the Play is stopped. If set to ‘true’ both call audio and the Play audio will be mixed and played. Defaults to true. | Optional |
Request Body
{"text"=>"Hello world", "voice"=>"WOMAN", "language"=>"en-US", "legs"=>"aleg", "loop"=>"false", "mix"=>"true"}