Using the text-to-speech and speech-to-text to test the Google Assistant function automatially
Since pyttx3 was a pretty old module, it can only support up to python 3.6 Also, there are few module that need to install:
- openeyxl
- pyttx3
- pushbullet
- opencv
- speech_recognition
Those modules can be install by copy the following text into cmd: '''shell ㄨ
This project consissts of five major parts:
- give command from the test case (excel file)
- receive the Google assistant respond
- capture the system test result for the conformation using webcam
- output the results and export to an excel file
- push notification to the Android phone
The command need to be convert from text to speech from the test case, since the test cases are a google sheet format, it need to be download into a .xlsx file format so that we can read it using openpyxl. Also the file need to be filtered, we only need the test case's name and the steps.
In this part, the response need to be convert into the text. Here we are using the pyttx3 to convert the speech to text.
After we collect the respond from the Google Assisatant, we need to determine the results is vaild or not. This part is the most difficult part since the google assistant respond are different for different input. The only way I come up with is the fail cases, if the respond start with "sorry", this is the sign for Google assistant state that it cannot execute the command. But the hardest part is to determine the right respond and wether the command is block or not. This is the part that need to be explored furthermore.
This project is paused since other team was already working on this part accroding to Rick. I might come back in the future for integrading this with other project.