Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 20:58 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 7 of 8    
Author Message
Frank N. Furter
Guru

Joined: 28/05/2012
Location: Germany
Posts: 813
Posted: 07:09am 30 Oct 2018
Copy link to clipboard 
Print this post

Hi Michael,

what would you pay for it? (...little bad joke!)

Of course I will share the work with this fantastic forum!!!
Please let me implement a better interface, then I will provide the sources and the hex-files for MX150 and MX170!

...I will need a few more days for this...

Has any of you also noticed that SAM sometimes resets uncontrollably???

Frank
 
twofingers
Guru

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

Hi Frank,
  Frank N. Furter said   ...I will need a few more days for this...

No problem.

  Frank N. Furter said  Has any of you also noticed that SAM sometimes resets uncontrollably???

Yes, but I thought that it was because of my setup.
Generally not necessarily disturbing.

Michael
 
Frank N. Furter
Guru

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

Hi Michael,

I'm afraid that you can't say this without further ado - if SAM was switched to Phonetic Mode or Speed, Pitch etc. was changed, everything is reset to the default settings after the reset.

So you would have to send the desired mode (speed, pitch etc.) every time before sending the text, just to be on the safe side! - very annoying!!!

Frank
 
twofingers
Guru

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

  Frank N. Furter said   So you would have to send the desired mode (speed, pitch etc.) every time before sending the text, just to be on the safe side! - very annoying!!!

Yes, but I think it's manageable in program mode. It is something to investigate further.
 
Frank N. Furter
Guru

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

New insight:

SAM RESETTED ALL 998 SECONDS! - no matter if a text was spoken or not!

@Peter: Maybe the watchdog is not reset? Do you have any idea?

Frank
 
twofingers
Guru

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

I can confirm that. My SAM (MX150) resets every 1004 seconds (16m 44s).
 
Frank N. Furter
Guru

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

I THINK I'VE FOUND THE RESTART PROBLEM!

I found this on the web:

  Quote  I had the following Configuration Bits by default, and I didn't notice after a long time:

#pragma config WDTPS = PS1048576 // Watchdog Timer Postscaler (1:1048576)
#pragma config FWDTEN = ON // Watchdog Timer Enable (WDT Enabled)

As the manual states, when using the Postscaler I was using the Time-out Period is of 1048.576s (nominal), that is about 17.5 minutes. If you consider the variation of the internal LPRC Oscillator (+/- 15%), you have a window that could span from aprox 15 minutes to 20 minutes.

Now I've disabled the Watchdog (FWDTEN = OFF) and everything is working fine.


I couldn't find the activation of the WDT in the code anywhere - apparently it is activated by default!
#pragma config FWDTEN = OFF
in PIC32MX270_STD.c do the trick!
SAM has now been running for over an hour without resetting itself!


Frank
Edited by Frank N. Furter 2018-11-03
 
twofingers
Guru

Joined: 02/06/2014
Location: Germany
Posts: 1133
Posted: 03:17pm 01 Nov 2018
Copy link to clipboard 
Print this post

Hi Frank,

that is really cool.
I did not expect you to find a solution to this problem.
Yesterday I checked the code on counter and timer and found nothing.
Seems you learned C pretty fast!

Next time maybe we had to read the manual first (A case of RTFM?) ...
But which one? The compiler or the PIC32MX manual?

Michael
 
Frank N. Furter
Guru

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

Hi Michael,

  Quote  I did not expect you to find a solution to this problem.
...neither do l!
  Quote  Seems you learned C pretty fast!
...you can't say that like this - I have been programming PIC's for many years - but not the PIC32 family and not in "C." I wish you were right! I'm afraid I'm a long way from understanding "C"!
  Quote  Next time maybe we had to read the manual first (A case of RTFM?) ...
But which one? The compiler or the PIC32MX manual?
Good Question!!!
I suspected it was related to the WDT and searched the code specifically for the registers - ...and found nothing! I also didn't find anything in the compiler settings - but maybe I overlooked it!
The Time-out Period makes me wonder - that was too much in line with our restart!

Frank
 
twofingers
Guru

Joined: 02/06/2014
Location: Germany
Posts: 1133
Posted: 05:43pm 01 Nov 2018
Copy link to clipboard 
Print this post



Anyway a surprising but successful finish.

BTW. I asked me why the default setting for the Watchdog Timer is 1048576.
1048576 = 0x100000 = 0b100000000000000000000.

In the meantime I found the FWDTEN also in the MMBasic source (Configuration_Bits.h).
Maybe a good idea to compare it further?

Michael
 
Frank N. Furter
Guru

Joined: 28/05/2012
Location: Germany
Posts: 813
Posted: 07:14pm 03 Nov 2018
Copy link to clipboard 
Print this post

Okay, guys!

Dear Ladies and Gentlemen,

I would like to present our SAM to you!
I equipped it with a (catastrophically programmed - ...I can't program "C"!) extended interface.

(Please see page 10 of this thread for more information)

After a start it looks like this now:

************************************
* Welcome to SAM on the PIC32 V1.0 *
************************************
(not case sensitive)
---
$HELP : This page!
$TABLE : Show PHONEME TABLE
$DEFAULT : Resets all values to their default values
$STATUS : Displays current settings
---
$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
---
$TEXT : Activate Text mode
$PHONEME : Activate Phoneme mode
$SING : Activate Sing mode
( pitch,phonemes - wrong input forces reset!!!
Example: 96,sehehehehehehehehehey )
---
$DEMO1 : Speak DEMO1
$DEMO2 : Speak DEMO2
$DEMO3 : Sing DEMO3
---
$DEBUG_ON : Show generated phonemes (...and leftover garbage from the array ;-)
$DEBUG_OFF : Hide generated phonemes

Her are the hex files for MX150 (not tested) and MX170: 2018-11-04_050231_SAM_TTS_MMX150-170.zip

...and here are the sources:
2018-11-04_050327_23_TTS.X-Final_Version_01.zip

If someone finds mistakes, they can keep them!

PLEASE INFORM ME ABOUT ERRORS AND CHANGE REQUESTS!

Dear Backshaders we have our own TTS Chip!!!

Frank
 
twofingers
Guru

Joined: 02/06/2014
Location: Germany
Posts: 1133
Posted: 07:45pm 03 Nov 2018
Copy link to clipboard 
Print this post

Hi Frank,

I can confirm that your firmware works on a MX150.
I like the demo3! Realy EHKSAY4TIHNX!
Far better then expected. (perfect, except some "\n" or " " in the demos).

You made my day! Congratulation.

Best regards
Michael

EDIT
  Quote  ************************************
* Welcome to SAM on the PIC32 V1.0 *
************************************

Better V2.0? Because he has grown up. Edited by twofingers 2018-11-05
 
Frank N. Furter
Guru

Joined: 28/05/2012
Location: Germany
Posts: 813
Posted: 08:39pm 03 Nov 2018
Copy link to clipboard 
Print this post

Hi Michael,

what did you mean with
  Quote  some "\n" or " " in the demos
???

- I copied it from toughdev.com/public/SAM_TTS. zip

  Quote  Better V2.0? Because he has grown up.

I think we still have enough time to increase the version number once we've eliminated the teething troubles...

Frank
 
twofingers
Guru

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

  Frank N. Furter said   Hi Michael,

what did you mean with
  Quote  some "\n" or " " in the demos
???


What I meant:
printf("\n\rSAM Speaking Demo 1 in progress...\n\r");

SpeakDemoText("Hello everyone. My name is SAM, short for Software Automatic Mouth.\n\r");
SpeakDemoText("I am ported from SAM on the P C to a P I C 3 2 using P W M for audio.\n\r");
SpeakDemoText("I am so small that I can fit into embedded computers such as P I C and A V R.\n\r");
SpeakDemoText("Honestly, do my voice sound better than the T T S 2 5 6 ?\n\r");
SpeakDemoText("Even though obviously I still sound like a robot to you.\n\r");
SpeakDemoText("Thank you for listening to me. Have a nice day. Good bye!\n\r");

printf("\n\rSAM Speaking Demo 1 done...\n\r");

Just some cosmetic work.
 
Frank N. Furter
Guru

Joined: 28/05/2012
Location: Germany
Posts: 813
Posted: 09:18pm 03 Nov 2018
Copy link to clipboard 
Print this post

Hi Michael,

you mean in sourcecode? You'll find more f**king programmed stuff there!!!



Frank
 
twofingers
Guru

Joined: 02/06/2014
Location: Germany
Posts: 1133
Posted: 09:35pm 03 Nov 2018
Copy link to clipboard 
Print this post

  Frank N. Furter said   Hi Michael,

you mean in sourcecode?

Sure! (in main.c)
 
retepsnikrep

Senior Member

Joined: 31/12/2007
Location: United Kingdom
Posts: 131
Posted: 08:14am 04 Nov 2018
Copy link to clipboard 
Print this post

Can we have some recordings/yt videos of what this sounds like please.
Gen1 Honda Insights.
 
paceman
Guru

Joined: 07/10/2011
Location: Australia
Posts: 1326
Posted: 11:54am 04 Nov 2018
Copy link to clipboard 
Print this post

Frank, minor editing point and I haven't been following this carefully, but shouldn't the PHONEME.TABLE and all other PHONEME's be PHENOME's.

Greg
 
twofingers
Guru

Joined: 02/06/2014
Location: Germany
Posts: 1133
Posted: 12:10pm 04 Nov 2018
Copy link to clipboard 
Print this post

  paceman said   Frank, minor editing point and I haven't been following this carefully, but shouldn't the PHONEME.TABLE and all other PHONEME's be PHENOME's.

Greg
@Greg
I know I'm not Frank, but I guess you are kidding?!?
Or perhaps I'm missing something? (no offence intended, I'm just perplexed!)
https://en.wikipedia.org/wiki/Phoneme

@Frank
There is still a minor bug ...
Last night I was able to compile your last version for MX150 (Free Version).

Best regards
Michael


Edited by twofingers 2018-11-05
 
Frank N. Furter
Guru

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

@retepsnikrep:

Unfortunately I don't have the possibility to record audio or video at the moment - can someone else do it? Maybe Michael?

@Greg:

In the original manual it is called "phoneme chart" (top on page 12)...

@Michael:

What kind of bug did you notice? Nice that the compilation worked!

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