You will recall this diagram from the introduction:
We should now have all the software installed to be able to complete the first stage of integration testing.
If you explore the files in code/vox you will find the test_player.py script. The test player can operate in one of three modes:
- Direct
- Narrated
- Log
For this test we want to set the Direct mode, where test phrases are piped to the processor. You can set the mode on line 22. The Phrase Processor is initialised with 3 parameters:
- Base url for the home-hub
- Timeout (secs) for refreshing api cache
- Home Zone – so hub-vox can answer ‘where am I?’
Run the test player with the following command:
python test_player.py
I chose to run my tests on a Windows PC for convenience, as there is a simple interface with windows text-to-speech capabilities, so you may have to modify the test_player to run it on the pi.
I have provided a sample testfile to demonstrate the process, however, you will want to edit this to meet your own requirements, or start from scratch with your own list. During testing, you can move terms to the top of the list while you make adjustments to the Phrase Processor configuration to handle the phrase.
Once you are happy with the configuration and your test phrases are understood, you can move on to system testing, but first there are a couple of things that need to be completed: Google credentials and Snowboy watchword.
These are covered in the next post.