This repository was archived by the owner on Aug 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 472
Say snippets #1022
Merged
Merged
Say snippets #1022
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| { | ||
| "title": "<Say> basic usage", | ||
| "type": "server" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <Response> | ||
| <Say>Hello!</Say> | ||
| </Response> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| const VoiceResponse = require('twilio').twiml.VoiceResponse; | ||
|
|
||
| const response = new VoiceResponse(); | ||
| response.say('Hello!'); | ||
|
|
||
| console.log(response.toString()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| require 'twilio-ruby' | ||
|
|
||
| response = Twilio::TwiML::VoiceResponse.new | ||
| response.say(message: 'Hello!') | ||
|
|
||
| puts response |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| using System; | ||
| using Twilio.TwiML; | ||
| using Twilio.TwiML.Voice; | ||
|
|
||
|
|
||
| class Example | ||
| { | ||
| static void Main() | ||
| { | ||
| var response = new VoiceResponse(); | ||
| response.Say("Hello!"); | ||
|
|
||
| Console.WriteLine(response.ToString()); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| <?php | ||
| require_once './vendor/autoload.php'; | ||
| use Twilio\TwiML\VoiceResponse; | ||
|
|
||
| $response = new VoiceResponse(); | ||
| $response->say('Hello!'); | ||
|
|
||
| echo $response; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| from twilio.twiml.voice_response import VoiceResponse, Say | ||
|
|
||
| response = VoiceResponse() | ||
| response.say('Hello!') | ||
|
|
||
| print(response) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| import com.twilio.twiml.VoiceResponse; | ||
| import com.twilio.twiml.voice.Say; | ||
| import com.twilio.twiml.TwiMLException; | ||
|
|
||
|
|
||
| public class Example { | ||
| public static void main(String[] args) { | ||
| Say say = new Say.Builder("Hello!").build(); | ||
| VoiceResponse response = new VoiceResponse.Builder().say(say).build(); | ||
|
|
||
| try { | ||
| System.out.println(response.toXml()); | ||
| } catch (TwiMLException e) { | ||
| e.printStackTrace(); | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| { | ||
| "title": "<Say> using language attribute", | ||
| "type": "server" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <Response> | ||
| <Say language="fr-FR">Bonjour!</Say> | ||
| </Response> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| const VoiceResponse = require('twilio').twiml.VoiceResponse; | ||
|
|
||
| const response = new VoiceResponse(); | ||
| response.say({ | ||
| language: 'fr-FR' | ||
| }, 'Bonjour!'); | ||
|
|
||
| console.log(response.toString()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| require 'twilio-ruby' | ||
|
|
||
| response = Twilio::TwiML::VoiceResponse.new | ||
| response.say(language: 'fr-FR', message: 'Bonjour!') | ||
|
|
||
| puts response |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| using System; | ||
| using Twilio.TwiML; | ||
| using Twilio.TwiML.Voice; | ||
|
|
||
|
|
||
| class Example | ||
| { | ||
| static void Main() | ||
| { | ||
| var response = new VoiceResponse(); | ||
| response.Say("Bonjour!", language: "fr-FR"); | ||
|
|
||
| Console.WriteLine(response.ToString()); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| <?php | ||
| require_once './vendor/autoload.php'; | ||
| use Twilio\TwiML\VoiceResponse; | ||
|
|
||
| $response = new VoiceResponse(); | ||
| $response->say('Bonjour!', ['language' => 'fr-FR']); | ||
|
|
||
| echo $response; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| from twilio.twiml.voice_response import VoiceResponse, Say | ||
|
|
||
| response = VoiceResponse() | ||
| response.say('Bonjour!', language='fr-FR') | ||
|
|
||
| print(response) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| import com.twilio.twiml.VoiceResponse; | ||
| import com.twilio.twiml.voice.Say; | ||
| import com.twilio.twiml.TwiMLException; | ||
|
|
||
|
|
||
| public class Example { | ||
| public static void main(String[] args) { | ||
| Say say = new Say.Builder("Bonjour!").language(Say.Language.FR_FR).build(); | ||
| VoiceResponse response = new VoiceResponse.Builder().say(say).build(); | ||
|
|
||
| try { | ||
| System.out.println(response.toXml()); | ||
| } catch (TwiMLException e) { | ||
| e.printStackTrace(); | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| { | ||
| "title": "<Say> using loop attribute", | ||
| "type": "server" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <Response> | ||
| <Say loop="2">Hello!</Say> | ||
| </Response> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| const VoiceResponse = require('twilio').twiml.VoiceResponse; | ||
|
|
||
| const response = new VoiceResponse(); | ||
| response.say({ | ||
| loop: 2 | ||
| }, 'Hello!'); | ||
|
|
||
| console.log(response.toString()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| require 'twilio-ruby' | ||
|
|
||
| response = Twilio::TwiML::VoiceResponse.new | ||
| response.say(loop: 2, message: 'Hello!') | ||
|
|
||
| puts response |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| using System; | ||
| using Twilio.TwiML; | ||
| using Twilio.TwiML.Voice; | ||
|
|
||
|
|
||
| class Example | ||
| { | ||
| static void Main() | ||
| { | ||
| var response = new VoiceResponse(); | ||
| response.Say("Hello!", loop: 2); | ||
|
|
||
| Console.WriteLine(response.ToString()); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| <?php | ||
| require_once './vendor/autoload.php'; | ||
| use Twilio\TwiML\VoiceResponse; | ||
|
|
||
| $response = new VoiceResponse(); | ||
| $response->say('Hello!', ['loop' => 2]); | ||
|
|
||
| echo $response; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| from twilio.twiml.voice_response import VoiceResponse, Say | ||
|
|
||
| response = VoiceResponse() | ||
| response.say('Hello!', loop=2) | ||
|
|
||
| print(response) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| import com.twilio.twiml.VoiceResponse; | ||
| import com.twilio.twiml.voice.Say; | ||
| import com.twilio.twiml.TwiMLException; | ||
|
|
||
|
|
||
| public class Example { | ||
| public static void main(String[] args) { | ||
| Say say = new Say.Builder("Hello!").loop(2).build(); | ||
| VoiceResponse response = new VoiceResponse.Builder().say(say).build(); | ||
|
|
||
| try { | ||
| System.out.println(response.toXml()); | ||
| } catch (TwiMLException e) { | ||
| e.printStackTrace(); | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| { | ||
| "title": "<Say> using voice attribute", | ||
| "type": "server" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <Response> | ||
| <Say voice="Polly.Mathieu" language="fr-FR">Bonjour! Je m'appelle Mathieu.</Say> | ||
| </Response> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| const VoiceResponse = require('twilio').twiml.VoiceResponse; | ||
|
|
||
| const response = new VoiceResponse(); | ||
| response.say({ | ||
| voice: 'Polly.Mathieu', | ||
| language: 'fr-FR' | ||
| }, 'Bonjour! Je m\'appelle Mathieu.'); | ||
|
|
||
| console.log(response.toString()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| require 'twilio-ruby' | ||
|
|
||
| response = Twilio::TwiML::VoiceResponse.new | ||
| response.say(voice: 'Polly.Mathieu', language: 'fr-FR', message: "Bonjour! Je m'appelle Mathieu.") | ||
|
|
||
| puts response |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| using System; | ||
| using Twilio.TwiML; | ||
| using Twilio.TwiML.Voice; | ||
|
|
||
|
|
||
| class Example | ||
| { | ||
| static void Main() | ||
| { | ||
| var response = new VoiceResponse(); | ||
| response.Say("Bonjour! Je m'appelle Mathieu.", voice: "Polly.Mathieu", language: "fr-FR"); | ||
|
|
||
| Console.WriteLine(response.ToString()); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| <?php | ||
| require_once './vendor/autoload.php'; | ||
| use Twilio\TwiML\VoiceResponse; | ||
|
|
||
| $response = new VoiceResponse(); | ||
| $response->say('Bonjour! Je m\'appelle Mathieu.', ['voice' => 'Polly.Mathieu', 'language' => 'fr-FR']); | ||
|
|
||
| echo $response; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| from twilio.twiml.voice_response import VoiceResponse, Say | ||
|
|
||
| response = VoiceResponse() | ||
| response.say( | ||
| 'Bonjour! Je m\'appelle Mathieu.', voice='Polly.Mathieu', language='fr-FR') | ||
|
|
||
| print(response) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| import com.twilio.twiml.VoiceResponse; | ||
| import com.twilio.twiml.voice.Say; | ||
| import com.twilio.twiml.TwiMLException; | ||
|
|
||
|
|
||
| public class Example { | ||
| public static void main(String[] args) { | ||
| Say say = new Say.Builder("Bonjour! Je m'appelle Mathieu.").voice(Say.Voice.POLLY_MATHIEU).language(Say.Language.FR_FR).build(); | ||
| VoiceResponse response = new VoiceResponse.Builder().say(say).build(); | ||
|
|
||
| try { | ||
| System.out.println(response.toXml()); | ||
| } catch (TwiMLException e) { | ||
| e.printStackTrace(); | ||
| } | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.