SP03 Console - Getting Started
Last Modified: 2006-12-06
find:

basket

Acroname Robotics PDF webpage version SP03 Console - Getting Started PDF

Related
Products

Product image for Devantech Speech Synthesizer
Devantech Speech Synthesizer
Product image for SP03 Direct Interface Cable
SP03 Direct Interface Cable

Contents

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. 

  • Predefined Phrases — Using the serial port, you can load predefined phrases into the SP03 module.  The phrases are defined in a .chat file, which also contains settings for the volume, pitch, and speed of each phrase.  You can define as many as 30 phrases.  You call the phrase by referencing its index (line) number. 
  • General Text (Arbitrary) Phrases — The SP03 can speak arbitrary phrases up to 81 characters in length.  You enter phrases through the Console application, which sends the command to the SP03 module via an IIC or serial connection. 

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:

  • Volume - 0 (loudest) - 7 (quietest)
  • Pitch - 0 (highest) - 7 (lowest)
  • Speed - 0 (slowest) - 3 (fastest)

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. 

  • Direct SP03 - In this mode, the SP03 is wired directly to the host computer's serial port.  The synthesizer can speak predefined phrases and arbitrary text.  In addition, you can load new phrases into the SP03 from a file.  Working in SP03 mode disables the regular features of the BrainStem module.  Refer to the SP03 connections drawing for information on setting up a serial connection. 
  • Brainstem - In this mode, the SP03 is connected through the IIC BrainStem network.  The host computer's serial port is connected to the routing BrainStem module.  The synthesizer can speak predefined phrases and arbitrary text, however, you cannot load phrases into the SP03 in this mode.  Refer to the SP03 connections drawing for information on setting up an IIC connection. 
Note

You don't need your BrainStem interface cable for the direct SP03 mode; the console is started from the serial connection to the SP03. 

Console Application Running in Direct SP03 Mode

Before you can begin working in Direct SP03 mode, you need to do two things:

  • Set the serial baud rate to 38400
  • Set the Console mode to Direct SP03 mode

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. 
Tip

For more information on Console configuration, read the console section of the BrainStem Reference Guide. 

When you open the Console, it displays a text message that indicates it is running in SP03 mode. 

Screenshot of the Console application when running in SP03 mode.
The BrainStem Console Application running on MacOS X in Direct SP03 mode.

In Direct SP03 mode, you can:

  • Configure and load predefined phrases
  • Speak predefined phrases
  • Speak general text phrases
  • Modify the SP03 speech settings

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:

  • 2 is the address of the module
  • 18 is the cmdVAL_SET command
  • 3 is the parameter ID for the IIC baud rate
  • 0 is the value, representing 100 Kbps

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. 

Tip

The BrainStem mode is the default mode for the Console, so the Console does not display a message that it is running in BrainStem mode. 

In BrainStem mode, you can:

  • Speak predefined phrases
  • Speak general text phrases
  • Modify the SP03 speech settings

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"
Note

The speech settings you define in the ".chat" file for your phrases override the SP03 settings for speaking general text phrases. 

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. 

Note

For more documentation of the SP03 and Say commands and a list of other available Console commands, read the Console section of BrainStem Reference Guide

Next Steps

You can access the SP03 module other ways. 

  • TEA Libraries - The TEA Libraries include the aSystem file aSP03.tea, which provides the command to load and speak phrases across an IIC network from your BrainStem module.  These libraries are documented in the BrainStem Reference Guide
  • C Libraries - The C Development download includes aSP03.h and aSP03.c, which provide cross-platform routines for the SP03 functions used with the Console application.  Download the BrainStem C Development package at the Acroname Download Center. 

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:

  • 2003-04-28: Page Created

BrainStem
Resources

 
 
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.