Text to speech

Questions about the BASICtools and MakeItC
Post Reply
YahooArchive
Posts: 1463
Joined: Fri Oct 19, 2012 5:11 am

Text to speech

Post by YahooArchive » Tue Dec 04, 2012 5:57 am

Hi,

Has anyone used the EMIC text to speech with Armmite controllers?

I have been trying to get the device to speak "Hello World" and get a
reply back from the device. Unfortunately, no luck with sound output
but I have been getting back data from the device.

I troubleshooted the amplified speaker with an mp3 player and they work.

The Speech board was designed with BS2 from Parallax.
I am trying to avoid using the BS2 and use the ARMmite to get this
device to work.

Anyone have any ideas?... I have provided sample code from EMIC and
provided my own code below.

Any help will be greatly appreciated!!!


Here is the sample code from EMIC:
THE Device uses 2400 baud rate.

Tx PIN 0 ' connects to Emic SIn
Rx PIN 1 ' connects to Emic SOut
Busy PIN 2 ' 1 = busy
#SELECT $STAMP
#CASE BS2, BS2E, BS2PE
Baud CON 396 ' 2400 baud, N81
#CASE BS2SX, BS2P
Baud CON 1021
#ENDSELECT

Yes CON 1
No CON 0

' Emic Commands (Hex Mode)

Say CON $00 ' say Engish text
EOM CON $AA ' end of message

OK CON $55 ' "okay" for hex mode
' -----[ Program Code
]----------------------------------------------------

Main:
DO
GOSUB Check_Busy
SEROUT Tx, Baud, [Say, "Hello world. I am Emic. Hear me roar.", EOM]
PAUSE 2000
LOOP

END

-----[ Subroutines ]-----------------------------------------------------

' Check status of Emic TTS module
' -- wait until Busy line released by Emic
' -- code as written does not timeout

Check_Busy:
PAUSE 1 ' allow busy to activate
DO WHILE (Busy = Yes) : LOOP ' wait until not busy
RETURN

****************************************
****************************************
Coridium COde:

CONST YES = 1
CONST SAY = $00
CONST EOM = $AA
INPUT 2
DIM A$(10)
DIM B$(20)
A$ = "HELLO WORLD"
'------------main code-------------
MAIN:

DO
GOSUB CHKREADY
SEROUT 4, 2400,[SAY,A$,EOM] 'SEND STRING
SERIN 3,2400,[B$] 'TTSPEECH REPEATS WHAT IT SAYS
RRINT B$
WAIT(2000)
LOOP
END
'------------subroutine------------
CHKREADY:
WHILE IO(2) = YES
PRINT "WAITING..."
RETURN



Post Reply