Created
July 17, 2017 13:02
-
-
Save tommorris/067b562db0323c78bf1d73a3147abb41 to your computer and use it in GitHub Desktop.
Nexmo: Flask incoming call, basic TTS response with NCCO JSON
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
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