Developed by 前線科技人員
今個星期日就係特首選舉,部分區議員身兼選委所以會有份投票。區議員嘅職責之一係聽市民意見,咁到底佢地會唔會投你想投個位呢?即刻打 5819 2689,講出你住係邊區,語音辨識系統就會幫你搵出你嗰區有邊個區議員係選委,再將你嘅電話駁去佢個度,等你親自問下佢、同佢傾下啦。
Before you can run or deploy the app, you will need to do the following:
-
Use the Google Developers Console to create a project/app id. (App id and project id are identical)
-
Enable Cloud Speech API.
-
Install the Google Cloud SDK, including the gcloud tool, and gcloud app component.
-
Setup the gcloud tool.
gcloud init
-
Get credentials used in calling Google APIs.
gcloud auth application-default login
-
Configure your Twilio settings in the environment variables.
export TWILIO_ACCOUNT_SID=[your-twilio-accoun-sid] export TWILIO_AUTH_TOKEN=[your-twilio-auth-token]
-
Create a virtualenv, install dependencies, and run the sample:
virtualenv env source env/bin/activate pip install -r requirements.txt python main.py
-
Start ngrok to allow Twilio to connect webhooks on your local server.
ngrok http 8080
-
Create a number on Twilio, if you haven't already. Configure the voice request URL to be
http://random-name.ngrok.io/
.
-
Copy
app.yaml.sample
toapp.yaml
. Configure your Twilio settings in the environment variables section inapp.yaml
.cp app.yaml.sample app.yaml
-
Use gcloud to deploy your app.
gcloud app deploy
-
Create a number on Twilio, if you haven't already. Configure the voice request URL to be
https://your-app-id.appspot.com/
.