How to speak a sentence on a call

Before Speaking

  1. Create call with callback URL -or- Recieve Incoming Call
  2. Make sure call is answered and active

Speak Sentence options

Bandwidth supports many voice options. You may specify the gender, accent, and voice. Click herefor a full list of the speaker options.

Speak Sentence to the resource (ie..../{userId}/calls/{callId}/...)

POST https://api.catapult.inetwork.com/v1/users/{userId}/.../{Resrouce_Id}/audio HTTP/1.1
Content-Type: application/json; charset=utf-8

{
    "gender"   : "female",
    "sentence" : "Hello from Bandwidth.",
    "locale"   : "en_US",
    "voice"    : "julie"
}

Response

HTTP/1.1 200 OK

This sends these call backs

POST your_server.com HTTP/1.1
Content-Type: application/json; charset=utf-8
User-Agent: BandwidthAPI/v1

{
  "eventType" : "string",
  "callId"    : "string",
  "callUri"   : "string",
  "status"    : "string",
  "time"      : "date",
  "tag"       : "string"
}

Speak Sentence to call

client.Call.speakSentence("callId", "Hello From Bandwidth").then(function (res) {});

Speak Sentence to bridge

client.Bridge.speakSentence("bridgeID", "Hello From Bandwidth").then(function (res) {});

Speak Sentence to entire conference

client.Conference.speakSentence("conferenceID", "Hello From Bandwidth", function (err, res) {});

Speak Sentence to specific conference member

client.Conference.speakSentenceToMember("conferenceID", "memberID", "Hello From Bandwidth")
 .then(function (res) {});

Stop Speaking Sentence to call

client.Call.stopSpeaking("callId").then(function (res) {});

Stop Speaking Sentence to bridge

client.Bridge.stopSpeaking("bridgeID").then(function (res) {});

Stop Speaking Sentence to entire conference

client.Conference.stopSpeaking("conferenceID").then(function (res) {});

Stop Speaking Sentence to specific conference member

client.Conference.speakSentenceToMember("conferenceID", "memberID", "")

Speak Sentence to call

await client.Call.SpeakSentenceAsync("{callId1}", "Hello From Bandwidth");

Speak Sentence to bridge

await client.Bridge.SpeakSentenceAsync("{bridgeId}", "Hello From Bandwidth");

Speak Sentence to entire conference

await client.Conference.SpeakSentenceAsync("{conferenceId1}", "Hello From Bandwidth");

Speak Sentence to specific conference member

await client.Conference.SpeakSentenceToMemberAsync("{conferenceId1}", "{memberId1}", "Hello From Bandwidth");

Stop Speaking Sentence to call

await client.Call.SpeakSentenceAsync("{callId1}", "");

Stop Speaking Sentence to bridge

await client.Bridge.SpeakSentenceAsync("{bridgeId}", "");

Stop Speaking Sentence to entire conference

await client.Conference.SpeakSentenceAsync("{conferenceId1}", "");

Stop Speaking Sentence to specific conference member

await client.Conference.SpeakSentenceToMemberAsync("{conferenceId1}", "{memberId1}", "");

Speak Sentence to call

call.play_audio({:sentence => "Hello from Bandwidth"})

Speak Sentence to bridge

bridge.play_audio({:sentence => "Hello from Bandwidth"})

Speak Sentence to entire conference

conference.play_audio({:sentence => "Hello from Bandwidth"})

Stop Speaking Sentence to call

call.play_audio({:sentence => ""})

Stop Speaking Sentence to bridge

bridge.play_audio({:sentence => ""})

Stop Speaking Sentence to entire conference

conference.play_audio({:sentence => ""})

Speak Sentence to call

api.speak_sentence_to_call('callId', 'Hello from Bandwidth')

Speak Sentence to bridge

api.speak_sentence_to_bridge('bridgeId', 'Hello from Bandwidth')

Speak Sentence to entire conference

api.speak_sentence_to_conference('conferenceId', 'Hello from Bandwidth')

Speak Sentence to specific conference member

api.speak_sentence_to_conference_member('conferenceId', 'memberId', 'Hello from Bandwidth')

Stop Speaking Sentence to call

api.speak_sentence_to_call('callId', '')

Stop Speaking Sentence to bridge

api.speak_sentence_to_bridge('bridgeId', '')

Stop Speaking Sentence to entire conference

api.speak_sentence_to_conference('conferenceId', '')

Stop Speaking Sentence to specific conference member

api.speak_sentence_to_conference_member('conferenceId', 'memberId', '')

results matching ""

    No results matching ""