Speech Synthesizer in Blitz

BlitzMax Forums/BlitzMax Programming/Speech Synthesizer in Blitz

Rico(Posted 2008) [#1]
I used to have software speech synthesizers on both my BBC Micro and Amiga computers. You could just type a command like Say "Hello - How are you today?" and it would say it. You could alter the tone and timbre and speed of the voice too.

I was wondering if there are any modules available for Blitz to do this?


ImaginaryHuman(Posted 2008) [#2]
No.

Fairly tricky to do I'd think you'd have to generate audio sample data on the fly based on presampled parts of words or whatever, to make it sound half decent. The Amiga version was quite monotonous.


plash(Posted 2008) [#3]
Here is a library for BlitzPlus/3D for TTS ('So To Speak')

I'm attempting to convert it to Max but InitVoice is throwing an unhandled memory exception error.
I've tried "C" and "win32" at the end of the function declarations, that didn't do anything.
Debugging shows the functions have obtained pointers.

sts_lib.bmx


example.bmx

SuperStrict

Import brl.standardio
Import pub.win32

Include "sts_lib.bmx"


If TSpeaker.SetupSpeaker() = True
	
	sts_SetVoiceRate(1)
	
	sts_Say("Hello World!")
	
Else
	Print("Failed to load speaker.dll") ; End
End If



TSpeaker.FreeSpeaker()



Rico(Posted 2008) [#4]
Actually I don;t mind if it doesn;t sound like a real human - just something recognizeable as speech will do.

Plash - so what you're saying is that that library doesn't work yet?

Thanks for the help.


plash(Posted 2008) [#5]
so what you're saying is that that library doesn't work yet?
Not for Max.. I still don't know why it crashes on the call.

It still works in BlitzPlus.


Rico(Posted 2008) [#6]
ok - thats a shame :(

I wish I could help - but I'm not very knowledgeable with this sort of thing. Maybe someone else could help?

Good luck - hopefully one day I will be able to use that module too!


plash(Posted 2008) [#7]
It seems to be that one function.. the function VoiceAvailable() seems to be working (although, it was written illogically, with a return of False actually saying that there is a voice API present.)

Updated code in previous post..

EDIT: I apparently cannot read BlitzPlus code anymore. VoiceAvailable is logically correct, I just didn't pay attention.. It seems to be returning False always, where in BlitzPlus it returns True.


allos(Posted 2009) [#8]
I am very interested in using text to speech unde blitzmax; I know 'So to speak' library is usable in blitzplus, but I never succeeded in porting it to blitzmax; can someone help please?


Ginger Tea(Posted 2009) [#9]
i guess the others 'worked' on lowly 8 and 16bit computers as they had 'chip music' sound chips and we never really had that option with adlib or creative in the early days and beep wouldnt cut it

to them the phonetic alphabet would just be small chunks of data (by todays standards) yet on a pc you'd need alot of (perhaps) cd quality wav files to stitch words together
or do what interplay did over a decade ago with a startrek game
have some patented script that people read out that sounded gibberish
then mark the sound file with reference points
they managed to get jean luc picard to sound like jean luc picard even though patric stewart only read a small script instead of every line of dialogue (which was the norm for the time)


allos(Posted 2009) [#10]
mmmhh
I wonder if there is a way to access Microsoft Speech SDK 5.1 through Speech API (SAPI)
yes I know it's Microsoft, and only working on windows, but it's free and it works...
someone could show me a way to access Speech API in BlitzMax?
I think a dedicated module should do the work, but it'out of my programming abilities....


skidracer(Posted 2009) [#11]
if you have maxgui you may want to try playing with microsoft agent technology

not sure if this stuff just works or not from vista, all downloads for xp at microsoft seem to be broken