Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 05:49 26 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 2 of 8    
Author Message
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5900
Posted: 05:11pm 04 Jan 2016
Copy link to clipboard 
Print this post

Somewhere in the junk pile I have a chip that I used on the parallel port of the Microbee (Z80) for voice. Having this one with serial interface is much better.

I had a LM386 audio module handy so it was easy to program a 150 and start making noise.
The wife is impressed but the dog won't sit when SAM gives the command.

I just need to put a low pass filter in to remove some of the raspy sound.

Thanks for the working code.

Jim
VK7JH
MMedit   MMBasic Help
 
CircuitGizmos

Guru

Joined: 08/09/2011
Location: United States
Posts: 1421
Posted: 05:43pm 04 Jan 2016
Copy link to clipboard 
Print this post

If bugs are fixed, it would be nice to add a larger input buffer.

I did "Four score and seven years ago our fathers brought forth on this continent, a new nation, conceived in Liberty, and dedicated to the proposition that all men are created equal." and got as far as conceived...

Also accepting lower case commands would be a nice thing, but not absolutely necessary.

I've had a bit of fun with this at my desk.

Again, if anyone wants a programmed chip just let me know.
Micromites and Maximites! - Beginning Maximite
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9060
Posted: 06:06pm 04 Jan 2016
Copy link to clipboard 
Print this post

Yeah, I programmed a spare 150 up using a VideoMite board last night, and it was really nice to hear SAM again after all this time brought back many memories of my youth, getting him to say various offensive things with my Atari 800XL.
Smoke makes things work. When the smoke gets out, it stops!
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5900
Posted: 07:33pm 04 Jan 2016
Copy link to clipboard 
Print this post

I found that the device is likely to stop emitting audio after a (short) while.
This even happens when sending singe characters at a time so it is not buffer overflow.
The characters/words are still echoed to the terminal but the only way to get it talking again is to reset or power cycle.

I managed 20 numbers before silence.
Next time it was 12.

Jim.

VK7JH
MMedit   MMBasic Help
 
Frank N. Furter
Guru

Joined: 28/05/2012
Location: Germany
Posts: 813
Posted: 07:58pm 04 Jan 2016
Copy link to clipboard 
Print this post

Have anybody experience with a SP0256-AL2? (I am not...)

When I understand it correctly is this chip sold by microchip. It seems that this chip have a good sound quality... (look at this video)

You can find a ROM image on this side - but what can we do with this image???

There is a emulator (probably based on this image) on this side.


Frank
 
kiiid

Guru

Joined: 11/05/2013
Location: United Kingdom
Posts: 671
Posted: 11:10pm 04 Jan 2016
Copy link to clipboard 
Print this post

Dedicated chip is cool, but there are many similar options already out there, and some of them are really nice.
A whole new level would have been if this was a loadable library function for MM+ so no extra hardware would be needed except for the audio output.
Can it be?
http://rittle.org

--------------
 
Chris Roper
Senior Member

Joined: 19/05/2015
Location: South Africa
Posts: 280
Posted: 01:26am 05 Jan 2016
Copy link to clipboard 
Print this post

  cicciocb said   Enjoy.
2016-01-03_155408_PIC32_SAM_beta.production.zip
Cicciocb


Thanks Cicciocb,

It works great once I convinced my PICkit 3 to work.

Took 2 day to find out how to make the PICKit 3 reload its firmware to eliminate a totally misleading error message about power to the MX150 being wrong.

Did I mention I hate MPLABX and PICKit3, I never had these problems just flashing a chip with PICKit 2 and MPLab 8.

I guess its progress :(

Now that I have it working the fun begins, although it gives me the shivers when it sounds like Professor Hawking :)

Cheers
Chris


http://caroper.blogspot.com/
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2286
Posted: 05:43am 05 Jan 2016
Copy link to clipboard 
Print this post

  Chris Roper said  Did I mention I hate MPLABX and PICKit3, I never had these problems just flashing a chip with PICKit 2 and MPLab 8


you do realize that you can use pic32prog with a PicKit 2 to program any of the PIC32MX devices? the limitations microchip have placed on what devices a PicKit 2 can program via their own software (mplab) are almost entirely artificial. if one were a suspicious sort, one might even think it was a marketing ploy to try and force people into buying PicKit 3 programmers.

cheers,
rob :-)
 
CircuitGizmos

Guru

Joined: 08/09/2011
Location: United States
Posts: 1421
Posted: 06:14am 05 Jan 2016
Copy link to clipboard 
Print this post

  TassyJim said   I found that the device is likely to stop emitting audio after a (short) while.
This even happens when sending singe characters at a time so it is not buffer overflow.
The characters/words are still echoed to the terminal but the only way to get it talking again is to reset or power cycle.

I managed 20 numbers before silence.
Next time it was 12.

Jim.


I've found the exact same problems. It was cool that this was ported, but unless you plan to reset the chip from another controller and hear the startup announcement, it isn't that useful of a port.

It was a fun walk down memory lane.



Micromites and Maximites! - Beginning Maximite
 
Chris Roper
Senior Member

Joined: 19/05/2015
Location: South Africa
Posts: 280
Posted: 07:40am 05 Jan 2016
Copy link to clipboard 
Print this post

  robert.rozee said   you do realize that you can use pic32prog with a PicKit 2 to program any of the PIC32MX devices? the limitations microchip have placed on what devices a PicKit 2 can program via their own software (mplab) are almost entirely artificial.


Thanks Robert, but yes I did know and have used your PIC32Prog with both Pickit 2 and the MicroBlocks Chip. Very handy tool.

In this instance the PICKit 3 was already connected to my dev system as I had been using it just befor christmas with some PIC24 devices.

When it started complaining about Voltage Levels on the PIC32 I assumed I had a fault with the Dev Board so spent a day faultfinding that, rather than jumping to the logical conclusion that it was, in fact, a misleading error from Microchip.

It had nothing to do with my hardware. Turns out it messed itself up when it reflashed itself from PIC24 to PIC32 modes (Why does it even have to do that?).

Bottom line is at least now I can start the new year confident that my dev tools are all working :)

Cheers
Chris

P.S. As it was a tricky one to find and Microchip offered no help on the forum search this is how I forced the PICKit 3 to reflash itself:

Load the PICKit 3 Programmer Standalone Tool (Not the MPLAB IPE tool) and goto tools, download operating system, then tools revert to MPLAB Mode.

It is as good as doing a factory reset.
Edited by Chris Roper 2016-01-06
http://caroper.blogspot.com/
 
Frank N. Furter
Guru

Joined: 28/05/2012
Location: Germany
Posts: 813
Posted: 10:34am 05 Jan 2016
Copy link to clipboard 
Print this post

Hi,

I have this problem (stopping audio) on my PIC24FJ64GA002 only when I feed SAM unintentional with some wrong characters like cursor commands...

The programmer of the PIC code wrote on his side that he has a problem with the memory model under the project build options:

  Quote  However, in my experiment, the code compiled but ran erratically when using large memory model, perhaps due to pointer behavior differences. It is therefore better to compile with the default settings and use the PIC24FJ64GA002 (or one with more memory) to save the trouble and have more code space for other purposes.


Is this maybe the problem? My SAM seems to work correctly with the slightly modified original PIC code.

FrankEdited by Frank N. Furter 2016-01-06
 
cicciocb
Regular Member

Joined: 29/04/2014
Location: France
Posts: 70
Posted: 09:02am 07 Jan 2016
Copy link to clipboard 
Print this post

No, the problem is not the same.
 
CircuitGizmos

Guru

Joined: 08/09/2011
Location: United States
Posts: 1421
Posted: 10:14am 07 Jan 2016
Copy link to clipboard 
Print this post

  CircuitGizmos said   Again, if anyone wants a programmed chip just let me know.


Reluctantly after a series of Personal Messages I feel the need to remove the offer of sending any free chips to TBS members.
Micromites and Maximites! - Beginning Maximite
 
cicciocb
Regular Member

Joined: 29/04/2014
Location: France
Posts: 70
Posted: 05:55am 09 Jan 2016
Copy link to clipboard 
Print this post

Hi all,
please find here the next release of the PIC32 SAM.
The main improvements are :
- Correction of some phonemes, in particular the one for the 'S' and for 'the'.
- Introduction of a digital lowpass filter:
- don't needs an external filter.
- the quality is strongly improved.
- The backspace key works as expected
- The commands can be given in lower case
- More commands available, in particular the lowpass filter control and the volume

Commands Available :
@TEXT : Activate the Text mode
@PHONEME : Activate the Phoneme mode
@DEBUG_ON : Show the phonemes generated
@DEBUG_OFF : Hide the phoneme generated
@SPEED= : Change the speed (0-255) default=72
@PITCH= : Change the pitch (0-255) default=64
@MOUTH= : Change the mouth (0-255) default=128
@THROAT= : Change the throat(0-255) default=128
@CUTOFF= : Set the lowpass filter cutoff freq (default=1000)
@RESON= : Set the lowpass filter resonance (default=1.414)
@FILTER_ON : Turn the lowpass filter ON
@FILTER_OFF: Turn the lowpass filter OFF
@VOLUME= : Set the volume in (0-200) (Filter ON only)
@HELP : This page!

Speed:
RS232 9600 8 bits No parity

Pins:
TX : RB10 (pin 21)
RX : RB11 (pin 22)
BUSY_PIN : RB2 (pin 6)
OUT : RB15 (pin 26)

2016-01-09_155237_PIC32_SAM_beta_0.9.zip

Enjoy.

Cicciocb
 
cosmic frog
Senior Member

Joined: 09/02/2012
Location: United Kingdom
Posts: 278
Posted: 09:14am 09 Jan 2016
Copy link to clipboard 
Print this post

Has this latest release sorted out the problem of it not working after a short while or does it still need a reset after 20 or so words?

Thanks. Dave.
 
Frank N. Furter
Guru

Joined: 28/05/2012
Location: Germany
Posts: 813
Posted: 09:48am 09 Jan 2016
Copy link to clipboard 
Print this post

Hi Cicciocb,

would you please send me your project files (only for personal use) for learning?

Thank you very much!

Frank
 
Frank N. Furter
Guru

Joined: 28/05/2012
Location: Germany
Posts: 813
Posted: 09:48am 10 Jan 2016
Copy link to clipboard 
Print this post

Hi Cicciocb,

I tested your SAM today - your sound quality is amazing!
...but it sounds better with @FILTER_OFF on my active loudspeaker (I coupled it with a 10µF).

It sounds very flannelly with active filter...

Is there a way to eliminate the startup message?

Thanks a lot for your very good job!!!

Frank
 
Henk
Newbie

Joined: 06/10/2015
Location: Netherlands
Posts: 20
Posted: 04:36am 12 Jan 2016
Copy link to clipboard 
Print this post

Great work! I can confirm it also works on a PIC170F256B chip. I used the latest HEX file you posted. I also think it sounds better with filter off. Furthermore I have also noticed that after some time it stops generating speech and you have to reset it to start again.

At some point when I entered rows of iiiiiiiiiiii, ooooooooooo and so on (fast after each other) , I started to get the message BUSY and it hanged. Reset solved this again.


It would be nicer if it does not start with that long message after every reset ;-). Could that be deleted? And what could be the problem with the program hanging after some time? I have tried several times with different characters but it seems to be random.
Edited by Henk 2016-01-13
 
paceman
Guru

Joined: 07/10/2011
Location: Australia
Posts: 1326
Posted: 06:28pm 12 Jan 2016
Copy link to clipboard 
Print this post

Yes great work Cicciocb - I found the filter was good but it needed a bit of fiddling with the parameters on my system. I have it running on an MX150 and sending some test text to it from MMBasic V5 running on an MX170 (Mik's MUP). The code snippet I'm using is below.

open "com1:" as #1
setpin 15,intl,newtext 'interrupt from HI to LO transition

Do
loop

sub newtext
read text$
count=count+1
data "england expects--","every man--","to do his duty--"
print #1,text$
if count=3 then
restore: count=0
endif
end sub

I used the three text segments just to test that the falling edge interrupt "busy" signal from the 150's pin6 (into the MUP's pin 15) would work OK. The dashes just space the segments a bit better - they're not really needed.

I see the same hangup problem as the others. If it's left looping for a while (about a minute) it then hangs up.

Greg
 
Frank N. Furter
Guru

Joined: 28/05/2012
Location: Germany
Posts: 813
Posted: 06:30am 17 Jan 2016
Copy link to clipboard 
Print this post

Hi Cicciocb,

how are you? Why didn't you reply?

I sent you a PM one week ago...

Frank
 
     Page 2 of 8    
Print this page
© JAQ Software 2024