Skip to content

Instantly share code, notes, and snippets.

@tommorris
Created July 17, 2017 13:02
Show Gist options
  • Save tommorris/067b562db0323c78bf1d73a3147abb41 to your computer and use it in GitHub Desktop.
Save tommorris/067b562db0323c78bf1d73a3147abb41 to your computer and use it in GitHub Desktop.
Nexmo: Flask incoming call, basic TTS response with NCCO JSON
from flask import Flask, jsonify
app = Flask(__name__)
@app.route("/incoming-call")
def incoming_tts_call():
ncco = [
{
"action": "talk",
"voiceName": "Jennifer",
"text": "Hello, thank you for calling. This is Jennifer from Nexmo. Ciao."
}
]
return jsonify(ncco)
if __name__ == '__main__':
app.run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment