diff --git a/docs/examples/ncco.md b/docs/examples/ncco.md index 040bfc2..facb88c 100644 --- a/docs/examples/ncco.md +++ b/docs/examples/ncco.md @@ -28,6 +28,12 @@ Create a `talk` action to read some text into the call: talk := ncco.TalkAction{Text: "Greetings from the golang library", VoiceName: "Nicole"} ``` +or + +```go + talk := ncco.TalkAction{Text: "Greetings from the golang library", Style: 0, Language: "en-US} +``` + ## Notify Action Use `notify` to send a particular data payload to a nominated URL: diff --git a/docs/examples/voice.md b/docs/examples/voice.md index 8af04cf..085af15 100644 --- a/docs/examples/voice.md +++ b/docs/examples/voice.md @@ -262,7 +262,7 @@ func main() { result, _, _:= client.PlayTts("aaaabbbb-0000-1111-2222-abcdef01234567", "Hello, my friend", - vonage.PlayTtsOpts{Loop: 2, VoiceName: "Russell"} + vonage.PlayTtsOpts{Loop: 2, Style: 0, Language: "en-US"} ) // or to stop an in-progress TTS // result, _, _:= client.StopTts("aaaabbbb-0000-1111-2222-abcdef01234567") diff --git a/ncco/ncco.go b/ncco/ncco.go index 577470a..fe85a44 100644 --- a/ncco/ncco.go +++ b/ncco/ncco.go @@ -42,6 +42,8 @@ type TalkAction struct { BargeIn bool `json:"bargeIn"` Level int `json:"level,omitempty"` VoiceName string `json:"voiceName,omitempty"` + Style int `json:"style,omitempty"` + Language string `json:"language,omitempty"` CalculatedLoopValue int `json:"loop"` } diff --git a/voice.go b/voice.go index e1a4033..b431fb1 100644 --- a/voice.go +++ b/voice.go @@ -437,6 +437,8 @@ type PlayTtsOpts struct { Loop int32 Level string VoiceName string + Style int32 + Language string } // PlayTts starts playing TTS into the call