The program implements the Voicebots with Phone Call using ATK-SIM800C GSM/GPRS Module. Natural TTS will be integrated to facilitate advanced features. This project covers lots of scopes, like serial programming, multithreading, audio processing, and NLP-related features supported by Google Cloud Platform (GCP).
In order to use Python Client for Cloud Text-to-Speech API, you ought to go through the following steps:
- Select or create a Cloud Platform project.
- Enable billing for your project.
- Enable the Cloud Text-to-Speech API.
- Setup Authentication.
After that, you can do
from google.cloud import texttospeech
from google.cloud import speech
Given multiple APIs may be used, it is recommended to have a pre-project environment when developing locally with Python. Install this library in a virtualenv using pip, if you haven't done it before. virtualenv is a tool to create isolated Python environments. The basic problem it addresses is one of dependencies and versions, and indirectly permissions.
With virtualenv, it's possible to install this library without needing system install permissions, and without clashing with the installed system dependencies.
For more installing details, please refer to this.
Install other packages if needed.
Apart from calling function, it provides basic MP3 playing function, and audio recording. As for advanced NLP-related features that enable it to interact with the users, it includes
- Convert a text file to mp3/wav format utilizing GCP API, and vice versa, by transcribing streaming audio from a microphone.
- Integrate with the ready-made interface, and make it able to better identify some specific terms from the user's voice, irrespective of the language.
- Languages should preferably include English, Cantonese and Mandarin. When the user speaks one kind of language, it should reply in the same language.
Those are achieved with the help of GCP API, including texttospeech and speech.
This project is licensed under the MIT License - see the LICENSE file for details
google.oauth2.service_account module
As for the issue of testing ATK-SIM800C GSM/GPRS Module, please use XCOM V2.0 and, if necessary, RTFM 😆

