The demonstration script acts as a Websocket Server that conforms to Exotel's Websocket Streaming Protocol.
Python 3.7 and above
- Activate virtualenv or setup a new virtualenv using conda or virtualenv
- Run
pip install -r requirements.txt
- The script for Unidirectional Demo uses Google Speech-to-Text API; so please enable Speech-to-Text API in Google Cloud Console.
- Setup and export your google credentials to your system path Linux or MacOS, Windows
python app.py --port <PORT_NUMBER> --stream_type <STREAM_TYPE>
python app.py -h
usage: app.py [-h] [--port PORT] --stream_type {unidirectional,bidirectional}
ExoWS client to enable WS communication
optional arguments:
-h, --help show this help message and exit
--port PORT Specify the port on which WS server should be
listening
--stream_type {unidirectional,bidirectional}
Specify the type of stream