Emic 2 text to speech

alhoop

Member
Anyone care to offer comments on this.
I don't know it the wait for routine works - I get back an inverted L.
But it doesn't seem to overrun.The reading of b.3 is waiting for a switch closure.
Code:
#picaxe 18M2
#no_data
setfreq m8
pause 3500
main:
serout b.5,T9600_8,("v","+18",cr)
repeat:
if pinb.3 <> 0 then repeat
pause 3500
serout b.5,T9600_8,("s","Al's trains welcomes Kim the master scenery builder",cr)
gosub waitforready
serout b.5,T9600_8,("s","It will soon be train time.",cr)
gosub waitforready
serout b.5,T9600_8,("s","All aboard.",cr)
gosub waitforready
goto repeat
waitforready:
serin b.2,T9600_8,(":")
sertxd("received" ,b.2," ",13,10)
return
Thanks
Al
 

hippy

Technical Support
Staff member
Code:
waitforready:
serin b.2,T9600_8,(":")
sertxd("received" ,b.2," ",13,10)
The 'B.2' in the SERTXD is not what you want; that's a pin identifier constant. As you are simply waiting for a ":" the best you can report is "Got it" or similar.

If it continues past there ( no matter what it currently displays ) then it is working, ":" was received.
 

alhoop

Member
Thanks hippy:
with the following code I get a c/r and a colon. Seems to work either way.
Al
Code:
waitforready:
serin b.2,T9600_8,b0,b1
sertxd("received" ,#b0," ",#b1,13,10)
return
 
Last edited:

jims

Senior Member
alhoop. try an "L0" command to set the language. It has a turnaround time of about 0.2 Mseconds and your set volume command turns around in about 3 Mseconds. The "L0" turns around much faster and you may not see all of the Emic2 response. I checked many of the response times on a PC Scope, and here's What I found.....

.... Approximate Emic2 response times (turnaround time) that I observed on a PC Scope:
Command Response Time What Command Does
R 3.1 Msec Revert to default settings.
Lx 0 .2 Msec Select language: x = 0,1,2.
Nx 0 .2 Msec Select voice: x = 0 to 8.
Vxx 3.0 Msec Set audio volume (db): xx = -48 to 18.
Wxxx 0.3 Msec Set speaking rate WPM:xx x =75 to 600.
Sxxxx Emic2 responds after it finishes speaking (may be several seconds).
Sxxxx is the message.
NOTE: &#8220;turnaround time&#8221; as used here is defined as the time after the last stop bit is sent from the 20x2 until the Emic2 begins to transmit its first response bit. Emic2 does not send unsolicited responses. It responds only when spoken to....

With the Sxxxx speaking commands Emic2 doesn't xmit a response until after it stops talking...This is usually in the seconds region, so plenty of time for serin to see it. Jims
 
Last edited:
Top