Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 07:48 19 May 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 4 of 8    
Author Message
bigfix
Senior Member

Joined: 20/02/2014
Location: Austria
Posts: 124
Posted: 06:56am 03 Feb 2016
Copy link to clipboard 
Print this post

I have a version which does not require holy water or any C-Code !!!











It is THE original maximum version from Radio Shack parts built with WireWrap

I have no detailed memories about it at all, I believe I built it in the mid 80s
while I worked at DEC.

Soon after I got a scrapped DECtalk - which was the Rolls Royce of Voice HW...
So I shelved it and completely forgot it until just now...

cheers
Guenter
 
cicciocb
Regular Member

Joined: 29/04/2014
Location: France
Posts: 70
Posted: 08:14am 03 Feb 2016
Copy link to clipboard 
Print this post

Hello,
very nice old fashioned project.
Unfortunately this brings me back to very old memories.

It could be nice if you are able to make alive again and give us the joy to hear its voice.

CiccioCB
 
micronut
Newbie

Joined: 03/09/2014
Location: United States
Posts: 37
Posted: 01:28pm 03 Feb 2016
Copy link to clipboard 
Print this post

bigfix, does your SP0256 circuit still work? I got one of those chips too and have used it with a Basic Stamp and a Parallax Propeller but I had to use a colorburst crystal.

Last year I was lucky enough to come across the crystal and the CTS256 chip used in the circuit you made. I just need to get the latch ICs to build it.

I'm looking forward to trying the SAM code too on a spare 150 I have lying around
 
bigfix
Senior Member

Joined: 20/02/2014
Location: Austria
Posts: 124
Posted: 10:49pm 03 Feb 2016
Copy link to clipboard 
Print this post

Right now I have a complete mess here, as I try to sort the unfinished piles in my electronics room into meaningful heaps...

But I will try to reverse engineer what I did 30 years ago and post the outcome here
 
Frank N. Furter
Guru

Joined: 28/05/2012
Location: Germany
Posts: 815
Posted: 07:33am 17 Oct 2018
Copy link to clipboard 
Print this post

Hi to all!

I found another compilation of S.A.M. for a PIC32MX270F256D which is very similar to our PIC32MX170.

The code is here on GITHUB.

It's annoying, my C knowledge is unfortunately insufficient to convert the code to a 28 pin PIC32MX170!

Can anybody help me to convert this project and implementing a UART?

ANY HELP WOULD BE APPRECIATED!

THANKS!!!

Frank
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8605
Posted: 08:16am 17 Oct 2018
Copy link to clipboard 
Print this post

This code is implemented in both the Armmite H7 and Micromite eXtreme. I can't see that it would be possible to implement as a CFunction and it is far too big to include in the MM2 firmware.

If you just want to implement the code in github as a standalone program it should work on a MX170 without any changes - the MX270 is basically the same chip but with USB support. You will need an up-to-date version of MPLabX and XC32 to compile it.
 
Frank N. Furter
Guru

Joined: 28/05/2012
Location: Germany
Posts: 815
Posted: 08:27am 17 Oct 2018
Copy link to clipboard 
Print this post

Hi Peter,

thanks for your reply!
No, I'm not thinking of a C function but of a standalone version on a 28 pin MX170.

Annoyingly, this code only uses the TX pin and this on the RC5 port that the 28 pin chip doesn't have!

It would be necessary to put the UART (send and receive) on the pins of the Micromite console (11 and 12) - then the Micromite boards (like my SimpleMite) could be used for TTS.
This way the "normal" Micromites or any Arduino could also be used for speech output...

Frank
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8605
Posted: 09:50am 17 Oct 2018
Copy link to clipboard 
Print this post

Try adding the following 2 lines to the top of UART1_Initialize

U1RXR=2;
RPB4R=1;


See chapter 11 of the MX170 programming manual for why this should work

Change the device in the project properties to MX170B then compile

You will get 4 errors that reference USB. Comment out those lines and recompile then flash the MX170 and try it

Attached is my hex file (untested)

2018-10-17_195819_23_TTS.X.production.zip Edited by matherp 2018-10-18
 
Frank N. Furter
Guru

Joined: 28/05/2012
Location: Germany
Posts: 815
Posted: 11:11am 17 Oct 2018
Copy link to clipboard 
Print this post

Hi Peter,

I flashed your hex file but with no success. I have seen that RB4 (pin 11, which is the connection to the speaker) is our CONSOLE Tx.
Should I see anything on the UART?

I connected my terminal (I used Br@y++) to pin 11 (µC Tx) and 12 (µC Rx) with 9600 bps, but I don't get any useful characters...

Frank
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8605
Posted: 02:07pm 17 Oct 2018
Copy link to clipboard 
Print this post

Try this version, sound output should be on pin 7. Note, the code as written just speaks a pre-compiled string, would need some work to output from text received on the UART

2018-10-18_023608_23_TTS.X.production.zip Edited by matherp 2018-10-19
 
bigmik

Guru

Joined: 20/06/2011
Location: Australia
Posts: 2870
Posted: 11:28pm 17 Oct 2018
Copy link to clipboard 
Print this post

Hi Bigfix,

Why not just flash it into a '270 chip instead?

Kind Regards,

Mick
Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<<
 
Frank N. Furter
Guru

Joined: 28/05/2012
Location: Germany
Posts: 815
Posted: 07:49am 18 Oct 2018
Copy link to clipboard 
Print this post

Hi Peter,
this version works!!! - it sounds not very clear, probably it would be better to use the hardware PWM, but it works...
UART also works and always sends "begin" and "end".

I have "MPLAB X IDE v3.55" and "xc32-v1.33" on my computer. Can you offer me your project files?
I was not able to create an executable project from the files of Github.
...the old MPLAB IDE was much easier to use...

The next step would be to get the chip to read the text about UART that he has to speak.

@Mik: The 270 is a 44 pin chip and it would be much better to have a single TTS chip in THT.
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8605
Posted: 08:19am 18 Oct 2018
Copy link to clipboard 
Print this post

  Quote   probably it would be better to use the hardware PWM

It does.

  Quote  DISM /Online /Cleanup-Image /RestoreHealth

You need a much later version of MPLabX. I'm on 5.05 and XC32 1.44

  Quote  I was not able to create an executable project from the files of Github.

They work fine with these later versions

  Quote  The next step would be to get the chip to read the text about UART that he has to speak.

I spent a few minutes on this and completely failed. For some reason the UART is not receiving with the code provided

  Quote  Can you offer me your project files?


Attached
2018-10-18_181907_23_TTS.X.zip
 
twofingers
Guru

Joined: 02/06/2014
Location: Germany
Posts: 1141
Posted: 10:42am 18 Oct 2018
Copy link to clipboard 
Print this post

  bigmik said   Hi Bigfix,

Why not just flash it into a '270 chip instead?

Kind Regards,

Mick


  Quote  @Mik: The 270 is a 44 pin chip and it would be much better to have a single TTS chip in THT.


@Frank:
There are also 28 pinners (DIL).

Kind regards
 
Frank N. Furter
Guru

Joined: 28/05/2012
Location: Germany
Posts: 815
Posted: 12:29pm 18 Oct 2018
Copy link to clipboard 
Print this post

Peter,

I have now installed MPLABX-v5.05 and xc32-v2.10.
I can open and compile your project files and SAM is speaking! (Thank you very much!!!)
I found out that "U1RXR = 0x0010;" is wrong! - it works with:

U1RXR = 0x0002; //RA4->UART1 RX

Now I can receive chars over UART pin 12...


@twofingers: You are right! Not the MX270, but the PIC32MX270F256D is the problem for which is SAM compiled! THIS is a 44 pin device and the UART and soundout are on pins that are not available on the THT.

Now SAM runs on a 28 pin MX170 THT - but there is still a lot to do...

Frank
 
twofingers
Guru

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

@Frank
Upps!
Interested to see the progress ...
I guess your version will probably also work on a MX270 and MX150?
 
Frank N. Furter
Guru

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

@twofingers:

I hope so! SAM should run on all 28-pin chips of this series...

Frank
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8605
Posted: 01:09pm 18 Oct 2018
Copy link to clipboard 
Print this post

  Quote  I found out that "U1RXR = 0x0010;" is wrong! - it works with:


Aaaaaaaagh!!!!! mixed my 0b0010 with my 0x0010

The attached appears to work:

int main()
{
char input[512];
int j;
uc_init();
initMain();

// initialize UART
UART1_Initialize();
delay_ms(300);

// initialize the TTS module
initTTS();

while(1)
{
// configure printf to use UART1
__XC_UART = 1;

// begin speaking
printf(">");

j=0;
while((input[j++]=UART1_Read())!=13);
input[j++]=10;
input[j]=0;
printf(input);
// speak text
speakText(input);

// end speaking
}
}
 
CircuitGizmos

Guru

Joined: 08/09/2011
Location: United States
Posts: 1421
Posted: 03:33pm 18 Oct 2018
Copy link to clipboard 
Print this post

If it runs on a '150 I have a bunch I don't have plans to use. I'll offer them up here (programmed to this TTS) to TBS'ers for the cost of shipping. (If the final firmware is open and the authors willing.)


Micromites and Maximites! - Beginning Maximite
 
Frank N. Furter
Guru

Joined: 28/05/2012
Location: Germany
Posts: 815
Posted: 07:47pm 18 Oct 2018
Copy link to clipboard 
Print this post

Hi Peter,

your new "main ()" works very well!

The sound is unfortunately very unsatisfactory! SAM sounds much better on my BBC:Microbit! Why??? Is there an error in the PWM setting (or with the speed)?

I think my code on the PIC24FJ64GA002 also sounded better... (...and the PWM is supposed to be worse on this chip...)

Peter, can you help me to implement a BUSY_PIN? Is it a big effort to make PITCH, SPEED, MOUTH and THROAT adjustable?


For fun I compiled the project once for the MX150 - it seems to work!

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