Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 08:54 28 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : cheap (and good) speech for MMBasic with SYN6988

Author Message
scruss
Regular Member

Joined: 20/09/2021
Location: Canada
Posts: 86
Posted: 12:52am 17 Jul 2023
Copy link to clipboard 
Print this post

If you want to add speech to an electronics projects, the options were either use a very expensive eMic2 module or cobble together something from old chips that sounded like a buzzsaw in a sock drawer.

Recently, though, I found out about the YuTone VoiceTX SYN6988 text to speech module. Although it's primarily designed to speak Chinese, it does make a decent job of English text. Small demo here: Adding speech to MMBasic ... and yeah, I know that the chip gets speaking the time wrong in a very strange way.

Code:

REM                 SYN6988 speech demo - MMBasic / Armmite F4
REM                 scruss, 2023-07

OPEN "COM1:9600" AS #5
REM                 READY line on PA8
SETPIN PA8, DIN, PULLUP

REM    you can ignore font/text commands
CLS
FONT 1
TEXT 0,15,"[v1]Hello - this is a speech demo."
say("[v1]Hello - this is a speech demo.")
TEXT 0,30,"[x1]soundy[d]"
say("[x1]soundy[d]"): REM    chimes
TEXT 0,45,"The time is "+LEFT$(TIME$,5)+"."
say("The time is "+LEFT$(TIME$,5)+".")
END

SUB say(a$)
 LOCAL dl%,maxlof%
 REM     data length is text length + 2 (for the 1 and 0 bytes)
 dl%=2+LEN(a$)
 maxlof%=LOF(#5)
 REM     SYN6988 simple data packet
 REM      byte  1 : &HFD
 REM      byte  2 : data length (high byte)
 REM      byte  3 : data length (low byte)
 REM      byte  4 : &H01
 REM      byte  5 : &H00
 REM      bytes 6-: ASCII string data
 PRINT #5, CHR$(&hFD)+CHR$(dl%\256)+CHR$(dl% MOD 256)+CHR$(1)+CHR$(0)+a$;
 DO WHILE LOF(#5)<maxlof%
 REM       pause while sending text
   PAUSE 5
 LOOP
 DO WHILE PIN(PA8)<>1
   REM       wait until RDY is high
   PAUSE 5
 LOOP
 DO WHILE PIN(PA8)<>0
   REM       wait until SYN6988 signals READY
   PAUSE 5
 LOOP
END SUB


I got my board on AliExpress: High-end Speech Synthesis Module Chinese/English Speech Synthesis XFS5152 Real Pronunciation TTS. I know that the listing says it's an XFS5152: it seems that the SYN6988 is a replacement for the older (standard?) XFS5152 Chinese text-to-speech chip. Don't be tempted to go for the SYN6288 or SYN6568 chips: I've tested them and they can't speak English.

Fun things about the SYN6988:

* there's no English documentation at all. At best, I worked it out via trial and error and Google Translate on the manual (which is linked in the article at the top)

* they connect via UART serial or SPI. They also have a RDY line which goes high shortly after the text is sent to the module, and then drops low one speech has finished

* volume, pitch, speech rate, etc. are mostly controlled through inline text tags. I listed most of them here: Embedded text commands

Hope someone finds this useful!
 
Frank N. Furter
Guru

Joined: 28/05/2012
Location: Germany
Posts: 831
Posted: 06:30am 17 Jul 2023
Copy link to clipboard 
Print this post

Have you seen this video, XFS5152 speech synthesis module ,on YouTube?
There is a LINK to a translated manual.

Frank
 
CaptainBoing

Guru

Joined: 07/09/2016
Location: United Kingdom
Posts: 2076
Posted: 10:28am 17 Jul 2023
Copy link to clipboard 
Print this post

I have added speech to one project where I needed specific phrases. I used one of those little MP3 players and some high quality speech synth on a web service (https://www.naturalreaders.com/ ) - sounds very natural, also handles other languages really well. I needed announcements in English, French Spanish and German, all from the same source and same text
EVAC.zip

as an aside, all these announcements use female voices as research has shown people take more notice if they find the voice attractive (both M & F but for different reasons). Don't know how true it is but I heard a story that US airforce pilots had critical messages recorded by their family members as it heightened their efforts to make remedial decisions. The example given was one pilot hearing the voice of his seven year old daughter: "Daddy, your left engine is on fire"... focuses the mind.
Edited 2023-07-17 21:05 by CaptainBoing
 
scruss
Regular Member

Joined: 20/09/2021
Location: Canada
Posts: 86
Posted: 12:50pm 17 Jul 2023
Copy link to clipboard 
Print this post

  Frank N. Furter said  Have you seen this video, XFS5152 speech synthesis module ,on YouTube?


I have, but so far, haven't managed to track down anyone selling XFS5152CE modules on AliExpress. I'm supposed to have one on the way arriving by the end of the month. The two SYN6988 modules I have were sold to me as XFS5152s. We shall see if I end up with a third one.

Note: XFS5152 <> XFS5152CE. The latter one, tested in the video, includes English language capabilities. The older XFS5152 is likely Chinese only.

CaptainBoing: using MP3s is a great solution if you know you're going to have a controlled set of voice prompts
 
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 2129
Posted: 06:22pm 17 Jul 2023
Copy link to clipboard 
Print this post

I used a picaxe mp3 player and audacity to make a robot face and Not speak proper.
https://www.youtube.com/watch?v=hMJvgKMIudI
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9308
Posted: 12:31am 18 Jul 2023
Copy link to clipboard 
Print this post

  CaptainBoing said  I have added speech to one project where I needed specific phrases. I used one of those little MP3 players and some high quality speech synth on a web service (https://www.naturalreaders.com/ ) - sounds very natural, also handles other languages really well.


Yes, that is EXACTLY how I did the voices for one of my talking nurse-call products.
These are only for large house type arrangements with seven or eight people, but when they press their button, the system "Speaks" the room number.

Simple and effective, and as you point out, the natural-reader softwares produce pretty good sounding voices these days, and far better then recoding my own horrible voice for the system!  
Smoke makes things work. When the smoke gets out, it stops!
 
CaptainBoing

Guru

Joined: 07/09/2016
Location: United Kingdom
Posts: 2076
Posted: 03:17pm 18 Jul 2023
Copy link to clipboard 
Print this post

nice! with mine, it wasn't a de-rigeur function - you hope you don't ever hear it, its the fire mode on feedback pods... rest of the sounds were just an assortment of bleeps (mp3s of course). Three smiley faces send the state of the toilets (well the worst two do) and then play the announcement when the fire alarm goes off just so people in the bog are left in no doubt.
Edited 2023-07-19 01:25 by CaptainBoing
 
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 2129
Posted: 05:21pm 18 Jul 2023
Copy link to clipboard 
Print this post

  CaptainBoing said  nice! with mine, it wasn't a de-rigeur function - you hope you don't ever hear it, its the fire mode on feedback pods... rest of the sounds were just an assortment of bleeps (mp3s of course). Three smiley faces send the state of the toilets (well the worst two do) and then play the announcement when the fire alarm goes off just so people in the bog are left in no doubt.

DON'T BEAM ME UP SCOTTY,I'M HAVING A SHIIIIiiiiiiiii...
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9308
Posted: 12:16am 19 Jul 2023
Copy link to clipboard 
Print this post

The "Talking elevator" annunciator things always make me laugh, especially when they say: "Please stand clear of the closing doors." - I mean.....who's that for?! (rhetorical)

Who needs to be told that?
People are getting really stupid in some cases.
I know WHY that message exists - cos if someone didn't stand clear, and the doors closed on them hurting them in any way, they could sue.  But if I were the judge in a case like that, it should be thrown out.  Society should not have to protect against people who literally have no common sense at all.

What's next? "Please do not lick the wall outlets."

...but I digress....sorry.
Smoke makes things work. When the smoke gets out, it stops!
 
CaptainBoing

Guru

Joined: 07/09/2016
Location: United Kingdom
Posts: 2076
Posted: 08:40am 19 Jul 2023
Copy link to clipboard 
Print this post

  Grogster said  Society should not have to protect against people who literally have no common sense


A Ugandan friend was amazed by the amount of signs we have in the UK, he said "you have a sign saying 'stay away from the cliff, stay away from the fierce animal, warning the coffee is hot' in Africa we accept that some people are too stupid to live"
Edited 2023-07-19 18:43 by CaptainBoing
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6798
Posted: 03:37pm 19 Jul 2023
Copy link to clipboard 
Print this post

I completely agree with him. When I was designing control panels I used to argue that all you needed was a Danger Of Death sign on the panel door. Nothing else. If it kills you then it's your fault for messing with something when you've had fair warning. For some reason they didn't agree with me, particularly the Health & Safety Executive. Dunno why not...

My pet hate is "This vehicle is turning left / right". So? Let it. Keep your eyes open.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
NPHighview

Senior Member

Joined: 02/09/2020
Location: United States
Posts: 200
Posted: 03:53pm 19 Jul 2023
Copy link to clipboard 
Print this post

Here in California and the American Southwest, National Parks are well-known for having razor-thin ridge line trails, subterranean trails subject to flash flooding, cliffs, hairpin turns on roads, etc. without warning signs or even railings. We call this the “Evolution-In-Action” philosophy
Live in the Future. It's Just Starting Now!
 
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 2129
Posted: 05:26pm 19 Jul 2023
Copy link to clipboard 
Print this post

What if you live in Wales where no one speaks Welsh but all the signs are for the minority who do
Cyclists get inflamed bladders
Mistranslation photo 1Instead of being told to dismount, Welsh-speaking cyclists were told that they had problems with an 'inflamed bladder' by a temporary bilingual road sign between Cardiff and Penarth. The translation makes no sense. Perhaps the translator mixed cyclists with cystitis and came up with "Overthrowing cystitis".

'Llid y bledren' means inflammation of the bladder, and 'dymchwelyd' means overthrow, demolish or collapse. The problem seems to be that there is no Welsh word for 'dismount'. Perhaps a better translation might have been 'Dim beicio' which means 'No cycling'.


Welsh people have no words for English,watching tour de france Welsh channel and oh my days and crashed not Welsh.

Beicio is obviously bicycle . dim means no.. like dim problemio means no prob...
just stick io after every English word. You need bronchitis to speak Welsh :)
Edited 2023-07-20 03:40 by stanleyella
 
scruss
Regular Member

Joined: 20/09/2021
Location: Canada
Posts: 86
Posted: 05:55pm 19 Jul 2023
Copy link to clipboard 
Print this post

  stanleyella said  What if you live in Wales where no one speaks Welsh but all the signs are for the minority who do


That's odd: when I worked in Wales I found plenty of Welsh speakers, learned a bit (the pronunciation is easy and phonetic) and even went to the Eisteddfod. Perhaps it helped that I wasn't from England. "Come home to a real fire: buy a holiday cottage in Wales", as the old joke went.

I see this board hasn't lost its rep for on-topic conversation and useful moderation ...
 
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 2129
Posted: 07:10pm 19 Jul 2023
Copy link to clipboard 
Print this post

  scruss said  
  stanleyella said  What if you live in Wales where no one speaks Welsh but all the signs are for the minority who do


That's odd: when I worked in Wales I found plenty of Welsh speakers, learned a bit (the pronunciation is easy and phonetic) and even went to the Eisteddfod. Perhaps it helped that I wasn't from England. "Come home to a real fire: buy a holiday cottage in Wales", as the old joke went.

I see this board hasn't lost its rep for on-topic conversation and useful moderation ...

odd indeed as no one works in Wales any more :(
whale kipper whelk um in the eel side...
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024