This API plays spoken text to a member in a conference.
POST
https://api.plivo.com/v1/Account/{auth_id}/Conference/{conference_name}/Member/{member_id}/Speak/
The member_id
attribute that’s passed in the URL can be a member_id
, a comma-separated list of member IDs on which this operation will be performed, or the string all
. In the latter case, the speak text action is performed for all members of the conference.
text Required | The text that should be spoken to the members in the conference. |
voice string | The voice to be used. Allowed values: MAN, WOMAN |
language string | The language that needs to be used to speak the text. The default language is US English (en-US). See the list of supported languages below. |
Danish da-DK | Only WOMAN voice |
Dutch nl-NL | Both WOMAN and MAN voices |
English — Australian en-AU | Both WOMAN and MAN voices |
English — British en-GB | Both WOMAN and MAN voices |
English — USA en-US | Both WOMAN and MAN voices |
French fr-FR | Both WOMAN and MAN voices |
French — Canadian fr-CA | Only WOMAN voice |
German de-DE | Both WOMAN and MAN voices |
Italian it-IT | Both WOMAN and MAN voices |
Polish pl-PL | Both WOMAN and MAN voices |
Portuguese pt-PT | Only MAN voice |
Portuguese — Brazilian pt-BR | Both WOMAN and MAN voices |
Russian ru-RU | Only WOMAN voice |
Spanish es-ES | Both WOMAN and MAN voices |
Spanish — USA es-US | Both WOMAN and MAN voices |
Swedish sv-SE | Only WOMAN voice |
Returns an acknowledgement that the text will be played to the members specified in the conference.
HTTP Status Code: 202
{
"message" : "speak queued into conference",
"api_id" : "8dd6820e-fe83-11e6-b6f4-061564b78b75",
"member_id" : "[u'all']"
}
1
2
3
4
5
6
7
8
import plivo
client = plivo.RestClient('<auth_id>','<auth_token>')
response = client.conferences.member_speak(
conference_name='testing',
member_id=27800,
text='Hello World!', )
print(response)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#
# Example for Conference Member Speak Create
#
require 'rubygems'
require 'plivo'
include Plivo
include Plivo::Exceptions
api = RestClient.new("<auth_id>","<auth_token>")
begin
response = api.conferences.speak_member(
'My Conf Room',
[10],
'Hello World!',
voice: 'MAN'
)
puts response
rescue PlivoRESTError => e
puts 'Exception: ' + e.message
end
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Example for Conference Member Speak create
var plivo = require('plivo');
(function main() {
'use strict';
// If auth id and auth token are not specified, Plivo will fetch them from the environment variables.
var client = new plivo.Client("<auth_id>","<auth_token>");
client.conferences.speakTextToMember(
"My Conf Room", // conference name
10, // member id
"Hello World!", // text
).then(function (response) {
console.log(response);
}, function (err) {
console.error(err);
});
})();
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php
/**
* Example for Conference Member Speak create
*/
require 'vendor/autoload.php';
use Plivo\RestClient;
use Plivo\Exceptions\PlivoRestException;
$client = new RestClient("<auth_id>","<auth_token>");
try {
$response = $client->conferences->startSpeaking(
'My Conf Room',
[10,11],
'TEXT_TO_SPEAK'
);
print_r($response);
}
catch (PlivoRestException $ex) {
print_r($ex);
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package com.plivo.api.samples.conference.member.speak;
import java.io.IOException;
import com.plivo.api.Plivo;
import com.plivo.api.exceptions.PlivoRestException;
import com.plivo.api.models.conference.Conference;
import com.plivo.api.models.conference.ConferenceMemberActionResponse;
/**
* Example for Conference Member Speak create
*/
class SpeakCreate {
public static void main(String [] args) {
Plivo.init("<auth_id>","<auth_token>");
try {
ConferenceMemberActionResponse response = Conference.memberSpeaker("My Conf Room", "10", "Hello World!")
.speak();
System.out.println(response);
} catch (PlivoRestException | IOException e) {
e.printStackTrace();
}
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/**
* Example for Conference Member Speak Create
*/
using System;
using System.Collections.Generic;
using Plivo;
using Plivo.Exception;
namespace PlivoExamples
{
internal class Program
{
public static void Main(string[] args)
{
var api = new PlivoApi("<auth_id>","<auth_token>");
try
{
var response = api.Conference.SpeakMember(
memberId:new List<string>(){"10","11"},
text:"Hello World!",
conferenceName:"My Conf Room"
);
Console.WriteLine(response);
}
catch (PlivoRestException e)
{
Console.WriteLine("Exception: " + e.Message);
}
}
}
}
1
2
3
4
curl -i --user AUTH_ID:AUTH_TOKEN \
-H "Content-Type: application/json" \
-d '{"text":"Hey, How are you?"}' \
https://api.plivo.com/v1/Account/{auth_id}/Conference/{conference_name}/Member/{member_id}/Speak/
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Example for Conference Member Speak create
package main
import (
"fmt"
"github.com/plivo/plivo-go/v7"
)
func main() {
client, err := plivo.NewClient("<auth_id>", "<auth_token>", &plivo.ClientOptions{})
if err != nil {
fmt.Print("Error", err.Error())
return
}
response, err := client.Conferences.MemberSpeak(
"My Conf Room",
"10",
plivo.ConferenceMemberSpeakParams{
Text: "Hello World!",
},
)
if err != nil {
fmt.Print("Error", err.Error())
return
}
fmt.Printf("Response: %#v\n", response)
}