IBM Watson

Introduction:

The focus of this Project was to get familiar with web sockets and IBM Watson.
The main objectives were to (1) translate speech to text, (2) add a command to launch an application, and (3) detect a command that translates a phrase into french and then play it back.

Problem Discussion:

The first step was to create an IBM account in order to get credentials to access IBM Cloud Services.
The instructor provided some code for running the program. I added to it in order for it do the requirements.

1. Translating Speech to Text

The credentials allowed me to use the Speech to Text services from IBM Cloud Services.
The code below allowed me to interpret the words that Watson picked up. The run started by playing the greeting. Then it listened for the keywords. When "Watson" was heard, it printed that it found a command, and set the command state to "started".

After I said "Watson", i said "Ignore", which was another keyword. Saying "ignore" caused the program to play the wave file that i had for "ignore".

When i said "quit", the program stopped listening, played the goodbye wave file, and stopped the program.



Below is the video that tests "Watson" and "Ignore".

Below is the video that tests "Quit".

2. Adding a Command to Launch an Application

When I said Open, the program opened Notepad with the command subprocess.Popen("notepad.exe") and continued to listen.

Below is the testing video for the application launch.



3. Translating Text to Speech in French

Saying go made it so that Watson could pick up what im saying, and then go down to the else statement and translate the phrase i just said.
*Error* The program would understand what i said because it appeared on the console, but when translating, it did not translate the correct information that was fed. 
I did not get it to completely work after doing some research.

Below is the test video for the french voice translation.


Conclusion:

Overall, i was able to get Watson to translate speech to text and allow it to do different operations. It was able to also open the notepad application.
It was not able to translate from English to french, although it did understand what i said. I was able to get the program to respond, but it was the wrong output. I was not able to figure out how to get it to repeat what i said.
The source code and the wave files are provided on the submission on blackboard.

Comments

Popular posts from this blog

Web Server

SushiBot