Play text to a member

    This API will play text to a member in a conference.

    API Endpoint

    POST https://api.plivo.com/v1/Account/{auth_id}/Conference/{conference_name}/Member/{member_id}/Speak/


    The member_id attribute which is passed in the URL can be one of the following three forms:

    1. Member ID: The member specified by the member_id.

    2. Comma separated list of member IDs: List of member IDs on which this operation will be performed.

    3. ‘all’: The string ‘all’, this action will be performed on all members of the conference.

    Arguments

    text Required

    The text that should be played to the members in the conference.

    voice string

    The voice to be used. Can be MAN or WOMAN. Defaults to WOMAN.

    language string

    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 Languages supported section.

    List of Languages Supported

    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

    Portugese pt-PT

    Only MAN voice

    Portugese - 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

    Returns an acknowledgement that the text will be played to the members specified in the conference

    Response

    HTTP Status Code: 202

    {
      "message" : "speak queued into conference",
      "api_id" : "8dd6820e-fe83-11e6-b6f4-061564b78b75",
      "member_id" : "[u'all']"
    }
    

    Example Request

    1
    2
    3
    4
    5
    6
    7
    8
    
    import plivo
    
    client = plivo.RestClient()
    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("YOUR_AUTH_ID", "YOUR_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';
        
        // As the auth_id and auth_token are unspecified, Plivo will fetch them from the PLIVO_AUTH_ID and PLIVO_AUTH_TOKEN environment variables.
        var client = new plivo.Client();
        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("YOUR_AUTH_ID", "YOUR_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();
            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("YOUR_AUTH_ID", "YOUR_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
    
    // Example for Conference Member Speak create
    package main
    
    import "fmt"
    import "github.com/plivo/plivo-go"
     
    func main() {
    	client, err := plivo.NewClient("", "", &plivo.ClientOptions{})
    	if err != nil {
    		panic(err)
    	}
    	response, err := client.Conferences.MemberSpeak(
    		"My Conf Room",
    		"10",
    		plivo.ConferenceMemberSpeakParams{
    			Text: "Hello World!",
    		},
    	)
    	if err != nil {
    		panic(err)
    	}
    	fmt.Printf("Response: %#v\n", response)
    }