Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 09:12 27 Apr 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 : Did you know S.A.M.? (text to speech)

     Page 6 of 8    
Author Message
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8579
Posted: 10:12am 20 Oct 2018
Copy link to clipboard 
Print this post

  Quote  Have you made any changes to the project?


No, it is as per last post on page 8 except that I compiled it for MX150. Interested to hear if it now works on MX150?
 
astro1
Regular Member

Joined: 26/06/2016
Location: Australia
Posts: 51
Posted: 12:04am 21 Oct 2018
Copy link to clipboard 
Print this post

Great use for some spare MX150s.
Working well on a MX150.
I'll need to add the output filter.
Cool. :')

Edit: Nice with a filter.
Edit-2: Good on the MX170 too.Edited by astro1 2018-10-22
 
Frank N. Furter
Guru

Joined: 28/05/2012
Location: Germany
Posts: 813
Posted: 10:57am 21 Oct 2018
Copy link to clipboard 
Print this post

I also tried an MX150 - it works like an MX170.

CircuitGizmos is right: Fs and Ss don't sound good. SAM on website sounds better...

@astro1: What kind of filter did you use?

Frank
 
astro1
Regular Member

Joined: 26/06/2016
Location: Australia
Posts: 51
Posted: 12:07pm 21 Oct 2018
Copy link to clipboard 
Print this post

Filter as per MM+ manual, page 24.
 
twofingers
Guru

Joined: 02/06/2014
Location: Germany
Posts: 1133
Posted: 12:36pm 21 Oct 2018
Copy link to clipboard 
Print this post

Hmm,

I think the filter in the MMBasic-Manual is a low-pass filter plus a voltage divider.
Maybe one resistor (1k) and one capacitor (47nF) should be sufficient.

For Frank (Online calculator, german):
https://www.electronicdeveloper.de/FilterPassivTiefpassRC_1O.aspx

Michael


BTW: good job!
 
Frank N. Furter
Guru

Joined: 28/05/2012
Location: Germany
Posts: 813
Posted: 06:02pm 21 Oct 2018
Copy link to clipboard 
Print this post

@twofingers:

Thanks a lot! Did you know this site?
http://www.sengpielaudio.com/Rechner-RCglied.htm

There are many good calculators on this site:
http://www.sengpielaudio.com/Berechnungen.htm

... and for all English speaking:
http://www.sengpielaudio.com/calculator-RCpad.htm

http://www.sengpielaudio.com/Calculations03.htm

Try it out!

Frank

 
CircuitGizmos

Guru

Joined: 08/09/2011
Location: United States
Posts: 1421
Posted: 04:19pm 22 Oct 2018
Copy link to clipboard 
Print this post

  matherp said   Interested to hear if it now works on MX150?


Got crazy busy over the weekend, but yes it does!
Micromites and Maximites! - Beginning Maximite
 
twofingers
Guru

Joined: 02/06/2014
Location: Germany
Posts: 1133
Posted: 02:25pm 23 Oct 2018
Copy link to clipboard 
Print this post

The new SAM runs satisfactorily on a MX150 (on Micks Backpack170).
The only limitation I found is the text length (~100 bytes).
I guess a buffer issue - not a bug.

Pinout for 28-pin is:
console as per MM2 Tx_µC on pin 11
Rx_µC on pin 12
audio output - pin 7
audio Gnd (my setup) - pin 8
busy output (active high) - pin 17



@Peter
Thanks a lot for your efforts! I like this SAM guy!
The original has a phonetic mode that makes it possible to improve the output quality of SAM.
It would also possible to create german (or whatever your preferred language is) words.
I would really appreciate having this feature - only if it's easy to do.


@Frank
Many Thanks, great links! I was actually quite sure that you can calculate audio filters.
Do you have a fully functional C compiler to create .hex files?

Regards
MichaelEdited by twofingers 2018-10-25
 
Frank N. Furter
Guru

Joined: 28/05/2012
Location: Germany
Posts: 813
Posted: 05:01pm 23 Oct 2018
Copy link to clipboard 
Print this post

Hi Michael,

I downloaded the latest versions of MPLABX v5.05 and xc32 v2.10 from Microchip. (The IPE version of this MPLAB X version is a disaster!!! )

I'm not sure (but I think) that the phonetic mode is also implemented in the code. I've experimented with it in the past - but I never managed to get SAM to talk. I only ever created one TTS error with it...

Just for the sake of interest - which area are you from?


Frank
 
twofingers
Guru

Joined: 02/06/2014
Location: Germany
Posts: 1133
Posted: 04:15pm 24 Oct 2018
Copy link to clipboard 
Print this post

Hi Frank,

  Quote  I downloaded the latest versions of MPLABX v5.05 and xc32 v2.10 from Microchip.
I guess you got the Free Edition (will not build in PRO or Standard mode).
I'm not sure which are the limitations. I've still the older versions (for CFunctions) installed.
  Quote  I'm not sure (but I think) that the phonetic mode is also implemented in the code.
I suspect that too. Perhaps is it as simple as disabling the TextToPhonemes function? But the code is not very good readable - many Gotos and cryptic labels (reverse-engineered version).

  Quote  Just for the sake of interest - which area are you from?
I live in the "northern territorys" of Germany.

Kind regards
Michael
 
Frank N. Furter
Guru

Joined: 28/05/2012
Location: Germany
Posts: 813
Posted: 04:38pm 24 Oct 2018
Copy link to clipboard 
Print this post

Hi Michael,

yes, this is the free edition. This version should be fully functional for 60 days.

You should compare the original version from Sebastian (https://github.com/s-macke/SAM) and the PIC version from here (http://www.toughdev.com/content/2014/09/english-text-to-speech-on-a-pic-microcontroller/);(toughdev.com/public/SAM_TTS. zip) with our version.

Have you ever tried Sebastian's PC version? Phonetic mode is implemented in this version.

I live more to the south...

Frank

 
twofingers
Guru

Joined: 02/06/2014
Location: Germany
Posts: 1133
Posted: 03:16pm 25 Oct 2018
Copy link to clipboard 
Print this post

  Frank N. Furter said   yes, this is the free edition. This version should be fully functional for 60 days.

Hi Frank,
and you can successfully compile Peters SAM code project?
Actually I hoped that Microchip makes his C compiler complettly free in the meantime.

  Frank N. Furter said   You should compare the original version from Sebastian (https://github.com/s-macke/SAM) and the PIC version from here (http://www.toughdev.com/content/2014/09/english-text-to-speech-on-a-pic-microcontroller/);(toughdev.com/public/SAM_TTS. zip) with our version.

I did. Thanks!

I like the LD3320 speech recognition module on
http://www.toughdev.com/content/2014/08/ld3320-chinese-speech-recognition-and-mp3-player-module/
Something to play with ...

  Frank N. Furter said   Have you ever tried Sebastian's PC version? Phonetic mode is implemented in this version.
Hmm, I've tried the Windows version, the demos. I like my (Peters) MX150 version more (crystal earphones). The Armmite has also the phonetic mode.
I think TTS is an impressive gimmick, well suited for use by the disabled or simply as feedback for non-display devices.

  Frank N. Furter said  I live more to the south...
as your name implies!?

Michael
 
Frank N. Furter
Guru

Joined: 28/05/2012
Location: Germany
Posts: 813
Posted: 04:49pm 25 Oct 2018
Copy link to clipboard 
Print this post

Hi Michael,

I can compile it with no problems! I copied the whole project to MPLABXProjects, opened and compiled it - I was amazed that it worked so easily! I flashed it with my PicKit3...

No, I live about 250 km more towards the southeast.

Frank

 
Andrew_G
Guru

Joined: 18/10/2016
Location: Australia
Posts: 840
Posted: 11:18pm 25 Oct 2018
Copy link to clipboard 
Print this post

Hi I've been keeping an eye on this thread, more from general interest than an immediate need, but a need may arise...
I have run foul of fully understanding the incremental changes that flow through a 10-page thread.
I have a mixture of "understandings" and questions:

U - Peter M has engineered the code so it can be flashed (via MPLAB/PicKit3) to a 28 pin MM170?
? - is the bottom of page 8 his latest version?
U - it will take text typed (say via TeraTerm) and speak it?
U - it can't take input (say from buttons) and speak prepared text? (eg speech confirmation of keypad presses)?
? - is a way around this to have say x "messages" stored in a text file (edited by hand) so that event y calls up and speaks message y?

? - what components are required (especially speaker)
? - is there a simple circuit (I'm sorry but I couldn't follow the "Holy Water" one)

? - if not this, is there a sensible way to "announce" key-presses or switch activations?

Many thanks, Andrew


 
Frank N. Furter
Guru

Joined: 28/05/2012
Location: Germany
Posts: 813
Posted: 02:00pm 26 Oct 2018
Copy link to clipboard 
Print this post

Hi Andrew,

  Quote  Peter M has engineered the code so it can be flashed (via MPLAB/PicKit3) to a 28 pin MM170?
- YES (and there is a hex version for a 32MX150 also available)
  Quote  is the bottom of page 8 his latest version?
- YES
  Quote   it will take text typed (say via TeraTerm) and speak it?
- YES
  Quote  it can't take input (say from buttons) and speak prepared text? (eg speech confirmation of keypad presses)?
- Hmmm, you need a Micromite or Arduino etc. to send the text to SAM. Otherwise you would have to rewrite the code from page 8 (which would be possible).
  Quote  is a way around this to have say x "messages" stored in a text file (edited by hand) so that event y calls up and speaks message y?
- You can save your various texts in a Micromite (or Arduino) and respond to a keystroke or event to send the text to SAM via the UART (9600,8,N,1). Otherwise you would have to rewrite the SAM code.
  Quote  what components are required (especially speaker)
- you need only a flashed PIC32MX170 or PIC32MX150 and a small active loudspeaker. The sound should be better if you use the filter (as described in the Micromite Plus manual):

  Quote   is there a simple circuit (I'm sorry but I couldn't follow the "Holy Water" one)
- You only need the circuit as described in the Micromite manual as "Basic Circuit" (even if SAM is not a Micromite). The "terminal" is now the Micromite or an Arduino, the connection with Pin11 is not absolutely necessary. Audio OUT is on pin 7 (and if desired: BUSY on pin 17)



  Quote  - if not this, is there a sensible way to "announce" key-presses or switch activations?
- I would use a Micromite to react to the keystrokes and then send the respective text to SAM.

FrankEdited by Frank N. Furter 2018-10-28
 
Andrew_G
Guru

Joined: 18/10/2016
Location: Australia
Posts: 840
Posted: 09:31pm 26 Oct 2018
Copy link to clipboard 
Print this post

Hi Frank,
Thanks for your explanation and your time in putting it together.
It really is quite simple (but possibly near my limits).
I can even envisage the Tx/Rx being via HC-12 (or similar) - many possibilities.
(Many thanks to Peter too for his work in re-writing the code and posting it).

Regards, Andrew

 
gadgetjack
Senior Member

Joined: 15/07/2016
Location: United States
Posts: 127
Posted: 11:03pm 26 Oct 2018
Copy link to clipboard 
Print this post

I found a couple "spare" chips and tried this. Works great! Brings back some old memories of 8 bit computers from my past. Great work! Thanks.
 
gadgetjack
Senior Member

Joined: 15/07/2016
Location: United States
Posts: 127
Posted: 05:49pm 27 Oct 2018
Copy link to clipboard 
Print this post

I found my old project I had built with a chip called a SPEAKJET. It did only the sounds you had to put together to get words. That chip cost 25 dollars!!! This project sounds 10 times better and a lot cheaper!! Peter really knows his stuff!
 
Frank N. Furter
Guru

Joined: 28/05/2012
Location: Germany
Posts: 813
Posted: 09:40pm 29 Oct 2018
Copy link to clipboard 
Print this post

@Michael:

I was able to activate the phonetic mode!

It was quite difficult for me (especially with my very limited C knowledge...)

Frank
 
twofingers
Guru

Joined: 02/06/2014
Location: Germany
Posts: 1133
Posted: 01:33am 30 Oct 2018
Copy link to clipboard 
Print this post

Hi Frank,

that sounds promising!
The bigger the challenge the bigger the gain ... or something like that!

Will you share your work with us? Maybe you can something say HOW you did it.
Anyway: Thanks in advance and congratulations!

Michael
 
     Page 6 of 8    
Print this page
© JAQ Software 2024