| SP03 Console - Getting Started Last Modified: 2006-12-06 | | |
| Acroname Robotics | PDF webpage version | ||
| Introduction About the SP03 SP03 Settings Communicating with the SP03 Via Different Console Modes Console Application Running in Direct SP03 Mode Console Application Running in Brainstem Mode Defining Phrases in Direct SP03 Mode Loading Phrases in Direct SP03 Mode Speaking Predefined Phrases: Direct SP03 and Brainstem modes Speaking General Text Phrases: Direct SP03 and Brainstem modes Changing SP03 Settings: Direct SP03 and Brainstem modes Next Steps Introduction You can administer and control the Devantech Text to Speech Synthesizer (SP03) through the BrainStem Console application. This document assumes you have downloaded and worked with the BrainStem Console application. If you aren't familiar with the Console, we suggest reading the BrainStem Console Getting Started Guide before you begin working with the SP03. About the SP03 The SP03 is a text to speech synthesizer. The module can speak predefined phrases or general (arbitrary) text up to 81 characters long.
SP03 Settings You can define three speaking parameters for the synthesizer: volume, pitch, and speed. You can use the SP03 command to apply them to general (arbitrary) phrases or you can specify them for each predefined phrase. The valid values for each are:
Communicating with the SP03 Via Different Console Modes The Console has two modes for communicating with the synthesizer: direct SP03 and BrainStem. Depending which mode you use, you need to configure a serial or IIC connection to the SP03 module.
Console Application Running in Direct SP03 Mode Before you can begin working in Direct SP03 mode, you need to do two things:
You configure both of these settings through the "console.config" file. The "console.config" file enables you to override the default settings for the Console. Step 1 Create the "console.config" file using a simple text editor, such as NotePad, and save it in the aBinary directory under the main brainstem directory. Step 2 To specify the direct SP03 mode, open the "console.config" file and type the following line: mode = SP03
Step 3 To set the baud rate to 38400, type the following in "console.config": baudrate = 38400
Step 4 Save the file.
When you open the Console, it displays a text message that indicates it is running in SP03 mode. ![]() The BrainStem Console Application running on MacOS X in Direct SP03 mode. In Direct SP03 mode, you can:
Console Application Running in Brainstem Mode Brainstem mode is the default mode for the brainstem module. It is not necessary to create a "console.config" file. If you have created one (it is located in the aBinary directory under the main brainstem directory), comment out or remove mode settings and baud rate settings. Before you begin working in BrainStem mode, you must set the IIC baud rate to 100 Kbps on the BrainStem module. To change the IIC baud rate, enter the following information in the Console input area: 2 18 3 0
In this string:
For more information on changing the system parameters on your BrainStem module, read the Console Getting Started Guide or refer to the Command Reference section of the BrainStem Reference Guide.
In BrainStem mode, you can:
Defining Phrases in Direct SP03 Mode Predefined phrases are stored in .chat files in the aUser directory, which is in the main brainstem directory. Each phrase is defined by three numbers separated by white space and then a string, which is set off in quotation marks. The three numbers represent the values for the three speaking parameters you can define for your synthesizer: volume, pitch, and speed. First, use a simple text editor, such as NotePad, to create a file with a ".chat" extension, for example, "test.chat". Save the file in your aUser directory. Use a text editor to open the file and enter the SP03 speech settings and text for each phrase, one phrase to a line. Be sure to use a valid value for each speech setting. The following example shows one line from a ".chat" file: 0 5 2 "this is phrase 1"
You can define as many as 30 phrases in a ".chat" file. To add phrases, simply create a new line and add the settings and desired text: 0 5 2 "this is phrase 1"
0 4 1 "this is phrase 2"
0 3 3 "the SP03 is fun"
Loading Phrases in Direct SP03 Mode To load ".chat" files into your SP03 module, you use the SP03 command, followed by the load command and the filename. The filename must be in quotation marks. If no extension is specified, the Console assumes the file is a .chat file. The following example loads "test.chat". In the console input area, enter: SP03 load "test"
Speaking Predefined Phrases: Direct SP03 and Brainstem modes To speak a predefined phrase from the ".chat" file you loaded into the SP03 module, you need to know the index (the line number) of the phrase you want to speak. To speak the phrase located at index 3 (the third line in the file) in our previous example, enter the following in the Console input field: say 3
The synthesizer speaks the phrase stored in index 3: "the SP03 is a great module". Speaking General Text Phrases: Direct SP03 and Brainstem modes The "say" command causes the synthesizer to speak whatever you specify as the command parameter, such as a specific phrase or quoted text. The SP03 can speak general text phrases up to 81 characters in length. To speak an arbitrary line of text, such as "the SP03 is a great module", type the following in the Console input field: say "The SP03 is a great module"
The synthesizer speaks the entered text. The synthesizer uses the module settings for volume, pitch, and speed settings, which can viewed and changed using the SP03 command. Changing SP03 Settings: Direct SP03 and Brainstem modes As mentioned previously, you define the volume, pitch, and speed settings for each phrase of your predefined text directly in the .chat file. On the module level, you can also configure these settings to apply to all general (arbitrary) text phrases. To view the module settings, type the SP03 command, with no parameters, in the Console input area. SP03
The Console displays the settings. To change volume, pitch, or speed, type the SP03 command followed by the parameter name and the value. Be sure to use a valid value. For example, to change the volume setting to 2, enter the following in the console input area: SP03 volume 2
To change the pitch setting to 3, enter the following in the console input area: SP03 pitch 3
To change the speed setting to 2, enter the following in the console input area: SP03 speed 2
Remember, changing the settings using the SP03 command does not affect the settings specified for predefined phrases.
Next Steps You can access the SP03 module other ways.
For more information on the interface between the BrainStem Console and the Devantech SP03, including example TEA programs, please take a look at our examples. Revision History:
|
| |||||||||||||||
| voice: 720-564-0373, email: sales@acroname.com, address: 4822 Sterling Dr., Boulder CO, 80301-2350, privacy © Copyright 1994-2008 Acroname, Inc., Boulder, Colorado. All rights reserved. |