mirror of
https://github.com/wassname/BitLit_test1.git
synced 2026-06-27 16:43:35 +08:00
use google cloud credentials
This commit is contained in:
@@ -19,9 +19,19 @@ Requirements:
|
|||||||
- PortAudio (mac: brew install portaudio)
|
- PortAudio (mac: brew install portaudio)
|
||||||
- for ubuntu:
|
- for ubuntu:
|
||||||
- PortAudio (sudo apt install portaudio19-dev)
|
- PortAudio (sudo apt install portaudio19-dev)
|
||||||
- gTTS (pip install gTTS)
|
- python package `pip install -r requirements.txt`
|
||||||
- SpeechRecognition (pip install SpeechRecognition)
|
- snowboy v1.1.1
|
||||||
- PyAudio (pip install pyaudio)
|
- either get
|
||||||
- Tensorflow (pip install tensorflow)
|
- a precompiled version for you platform and python version here (http://docs.kitt.ai/snowboy/#downloads)
|
||||||
- Unzip SNOWBOY v1.1.1 (http://docs.kitt.ai/snowboy/#downloads)
|
- or compile it yourself by cloning the repo, then going into swig/python and running make
|
||||||
|
- Copy the resources folder and the compiled files into the snowboy subdirectory.
|
||||||
|
|
||||||
|
|
||||||
|
API Keys:
|
||||||
|
- `cp secrets.template.json to secrets.json`
|
||||||
|
- get an API key for google cloud
|
||||||
|
- make a project or use an existing project
|
||||||
|
- download a credentials json for that project
|
||||||
|
- enable the speech recognition api https://console.cloud.google.com/apis/api/speech.googleapis.com/overview
|
||||||
|
- put the credentials in `./secrets/google_cloud_credintials.json`
|
||||||
|
- never commit this file!
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"type": "service_account",
|
||||||
|
"project_id": "lofty-foundry-111111",
|
||||||
|
"private_key_id": "x0x0xx0",
|
||||||
|
"private_key": "-----BEGIN PRIVATE KEY-----\nx0x0x0x0x0x0\n-----END PRIVATE KEY-----\n",
|
||||||
|
"client_email": "xx@lofty-foundry-111111.iam.gserviceaccount.com",
|
||||||
|
"client_id": "11111111111111",
|
||||||
|
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
|
||||||
|
"token_uri": "https://oauth2.googleapis.com/token",
|
||||||
|
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
|
||||||
|
"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/xxxx111111.iam.gserviceaccount.com"
|
||||||
|
}
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
"GOOGLE_SPEECH_RECOGNITION_API_KEY":""
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user