Page Hits: #COUNT Amiga Rulez! (but you knew that)
HOME SOFTWARE GRAPHICS ARTICLES HARDWARE CONTACT LINKS
Revised 2009-01-06

Using Speech with OS4 - A Tutorial

This is a tutorial on adding text-to-speech capabilities to OS4.
It is written with the AmigaOne in mind but may also apply to Amiga 1200/3000/4000 running OS4.

Some useful applications for speech are:

  • Providing informations to a user who's away from the monitor
  • Reading electronic books or emails
  • Listening to what's being said on IRC while browsing the web
  • Speaking clocks, reminders, alarms, etc.


REQUIREMENTS:

The following files will be needed:

Path/Filename Version Size (bytes) Date
DEVS:narrator.device
37.7
65760
22-May-91
L:speak-handler
37.4
4188
21-Feb-91
LIBS:translator.library
43.1
14528
30-Jun-97
C:Say
43.0
13536
27-Jul-97
SYS:PREFS/Translator
1.0
9180
16-May-95
SYS:PREFS/Translator.info
ENVARC:Sys/Translator.prefs
LOCALE:Accents/*.accent
SYS:STORAGE/DosDrivers/SPEAK
SYS:STORAGE/DosDrivers/SPEAK.info


LOCATING AND INSTALLING THE FILES:

Narrator.device and speak-handler originally came with Workbench 2.04, and might possibly be on the AmigaForever CD too.

Copy narrator.device to DEVS: and speak-handler to L:

Translator.library 42, its preferences program and accent files can be found in aminet.net/util/libs/translator42.lha

You can install the 68020 version of the library.
After installing it, open Translator (the prefs), select an accent and click save to create the prefs in ENVARC: but don't use the "Test" button just yet.

After installation it should be patched to V43 with aminet.net/util/libs/Tran43pch.lha

The replacement Say command which supports V43 accents is at aminet.net/util/sys/SayV43.lha

Copy it to C:

The mountlist for SPEAK: can be created easily by pasting this text...

/* Speak handler */
Handler = L:Speak-Handler
Stacksize = 4096
Priority = 1
GlobVec = -1

...into an empty file and saving it with the filename "SPEAK".

Its icon should be of type "Project" and edited as follows:

  • Default Tool: C:Mount
  • Start from: Workbench
  • Tooltypes: ACTIVATE=1

Place the file in DEVS:DosDrivers if you want it mounted automatically at boot time, or place it in SYS:Storage/DosDrivers if you'd rather mount it manually.

If you plan on using the Say command, I'd recommend that you keep the SPEAK mountfile in DEVS:DosDrivers to make sure the narrator.device has an "open count" of at least 1 at all time because some old bug in the device expunge code causes a crash if the open count returns to 0.
With OS3.x it doesn't crash but it's still possible that some memory gets corrupted.


USING SPEECH:

From this point on you should be able to type "Say Hello" and hear the voice, or test the accents with Translator prefs (more accents are on Aminet).

With Say you can control the gender, pitch, speed, and accent of the spoken text with:
-n -r -m -f -p -s -a
(see Translator and SayV43 docs for details).

If you placed the SPEAK mountfile in SYS:Storage/DosDrivers, the first time you'll use the device, e.g.
"Copy TextFile TO SPEAK:", a requester will appear and you can mount it from there by selecting the "Mount" button.

When sending plain text to SPEAK: the punctuation marks are ignored, but the accent selected in the prefs is used.


HINTS:

Not many people know this so I'll mention it just in case:

Even with SPEAK: you can specify the voice, by adding the modifiers as a path, e.g.:

"Echo >SPEAK:opt/p65/s100 ..." does the same as "Say -p65 -s100 ..."

SPEAK: can be very handy with SnoopDos to notice specific failures or events while keeping its window iconified. Make sure you set a very narrow filter and short log format though, or it will babble forever!

If you use AmIRC or WookieChat and want to add speech to it, try the updated AmIRSay: aminet.net/comm/irc/AmIRSayUpdate.lha

To explore the depths of narrator.device and especially to have fun with strange voices, check out aminet.net/util/misc/nartest.lha

Published: Febuary 17th 2005, Rev 1.0
Updated: June 17th 2005, Rev 2.0
Updated: January 6th 2009, Rev 3.0

 

Copyrights ©2005-2021 AM1GA.COM (AlexC) - You can copy and distribute this page all you want, you just don't own it. (Muhaha)