Play audio to Member

Speak text or play audio to ONLY a single conference member.

Request URL

POSThttps://api.catapult.inetwork.com/v1/users/{userId}/conferences/{conferenceId}/members/{memberId}/audio


Supported Parameters

Parameter Description Mandatory
fileUrl The location of an audio file to play (WAV and MP3 supported).

To STOP AUDIO FILE PLAYBACK send an empty string like: {"fileUrl": ""}
*
sentence The sentence to speak MAXIMUM LENGTH 1000 CHARACTERS.

To STOP SENTENCE PLAYBACK send an empty string like: {"sentence": ""}
*
gender The gender of the voice used to synthesize the sentence. It will be considered only if sentence is not null. The female gender will be used by default. No
locale The locale used to get the accent of the voice used to synthesize the sentence. Currently audio supports:
- en_US or en_UK (English)
- es or es_MX (Spanish)
- fr or fr_FR (French)
- de or de_DE (German)
- t or it_IT (Italian) It will be considered only if sentence is not null/empty. The en_US will be used by default.
No
voice The voice to speak the sentence. Audio currently supports the following voices:
- English US: Kate, Susan, Julie, Dave, Paul
- English UK: Bridget
- Spanish: Esperanza, Violeta, Jorge
- French: Jolie, Bernard
- German: Katrin, Stefan
- Italian: Paola, Luca It will be considered only if sentence is not null/empty. Susan’s voice will be used by default.
No
loopEnabled When value is true , the audio will keep playing in a loop. Default: false. No
tag A string that will be included in the events delivered when the audio playback starts or finishes. No

Example 1 of 2: Speak text to a conference member

curl -v -X POST https://api.catapult.inetwork.com/v1/users/{userId}/conferences/{conferenceId}/members/{memberId}/audio \
    -u {token}:{secret} \
    -H "Content-type: application/json" \
    -d \
    '
    {
        "sentence": "Hi there member, I have a message only for you",
        "gender": "female",
        "locale": "en_US",
        "voice": "kate"
    }'
//Speak sentence
//Promise
client.Conference.speakSentenceToMember("conferenceID", "memberID", "Hello From Bandwidth")
 .then(function (res) {});
//Callback
client.Conference.speakSentenceToMember("conferenceID", "memberID", "Hello From Bandwidth",
    function (err, res) {});

  //Speak sentence with options
  var options = {
      sentence : "hola de Bandwidth",
      gender   : "male",
      locale   : "es",
      voice    : "Jorge"
  }
  //Promise
  client.Conference.playAudioAdvancedToMember("conferenceId", "memberId", options)
    .then(function (res) {});

  //Callback
  client.Conference.playAudioAdvanced("conferenceId", options, function (err,res) {});
//Speak sentence with options
await client.Conference.PlayAudioToMemberAsync("{conferenceId1}", "{memberId1}", new PlayAudioData
{
    Sentence = "hola de Bandwidth",
    Gender = Gender.Male,
    Voice = "Jorge",
    Locale = "es"
});

//Speak sentence in a conference
await client.Conference.SpeakSentenceToMemberAsync("{conferenceId1}", "{memberId1}", "Hello From Bandwidth");
member.speak_sentence(:sentence => "Hello From Bandwidth")

Example 2 of 2: Play audio to a conference member

curl -v -X POST https://api.catapult.inetwork.com/v1/users/{userId}/conferences/{conferenceId}/members/{memberId}/audio \
    -u {token}:{secret} \
    -H "Content-type: application/json" \
    -d \
    '
    {
        "fileUrl": "https://catapult.inetwork.com/.../media/{mediaName1}"
    }'
//Play Audio file

//Promise
client.Conference.playAudioFileToMember("conferenceID", "memberId", "http://myurl.com/file.mp3")
  .then(function (res) {});

//Callback
client.Conference.playAudioFileToMember("conferenceID", "memberId", "http://myurl.com/file.wav",
   function (err, res) {});

//Play Audio File on loop
var options = {
    fileUrl     : "http://myurl.com/file.mp3",
    loopEnabled : true
}
//Promise
client.Conference.playAudioAdvancedToMember("conferenceId", "memberId", options)
 .then(function (res) {});

//Callback
client.Conference.playAudioAdvancedToMember("conferenceId", "memberId", options,
  function (err,res) {});
//Play audio file with options
await client.Conference.PlayAudioToMemberAsync("{conferenceId1}", "{memberId1}", new PlayAudioData
{
    FileUrl = "http://myurl.com/file.mp3",
    LoopEnabled = true
});

//Speak sentence in a conference
await client.Conference.PlayAudioFileToMemberAsync("{conferenceId1}", "{memberId1}", "http://myurl.com/file.mp3");
member.play_audio(:file_url => "http://host1")

results matching ""

    No results matching ""