Jump to content

Photo

Introducing BlueWizard - QBoxPro replacement speech analysis TMS5220 tool

tms5220 ti-99 speech qbox pro

27 replies to this topic

#1 patrick99e99 OFFLINE  

patrick99e99

    Space Invader

  • 30 posts
  • Location:Los Angeles, CA

Posted Sun Jan 8, 2017 7:23 PM

Several years ago, I started creating a music educational video game called NoteBlaster for iOS.  From the beginning one of the things I wanted NoteBlaster to have was a very "Atari" vibe.  I wanted it to have a retro arcade graphics style, I wanted it to have FM synthesis music, and I wanted it to have TMS52220 speech synthesis.  Once I got to the point in development where it was time to start thinking about how I was going to get TMS5220 speech, I started a thread here --> http://atariage.com/...me-ti99-speech/

 

I spent a great deal of time trying to use QBox Pro, but despite my best efforts, the speech I generated was less than desirable.  Eventually I gave up on QBox Pro, and believed it was hopeless, my game would simply not be able to have the high quality Atari coin-op reminiscent speech that I so badly wanted.  At that moment, a friend of mine encouraged me not to give up, and he looked up the Speak & Spell toy on wikipedia and found the name of the person who worked at Texas Instruments at the time that was responsible for the algorithms used...  Richard Wiggins.  I figured, ok-- what have I got to lose? I picked up the phone and called various places trying to track him down, and eventually found him.  I told him I was creating a music video game, and asked if he could help supply me with the information about how TI's portable speech lab system (which is what Atari Games actually used for their speech processing) actually worked to generate linear predictive code for TMS5220 chips.  Richard agreed, and we had many phone conversations involving concepts of digital signal processing, autocorrelation, pre-emphasis filtering, chebychev filter poles, a to k conversions, pitch analysis, etc.  He sent me hand written notes involving math equations, illustrations, and photo copies of pages from text books that he had on the subject.  Finally, a good six months later, I had a Mac OS X desktop application that could analyze an 8khz 16-bit waveform and turn it into an LPC byte stream that could be fed to the TMS5220 chip and it sounded as good as the speech in all of Atari's arcade games.  It was incredibly exciting!  Around that time, I reached out to one of the MAME core developers, Jonathan Gevaryahu (aka Lord Nightmare), and he helped fine tune a handful of things on both the desktop analysis app side and also the actual TMS5220 emulation code.  I am very grateful for all of his help.

 

Once I had the capability to generate the high quality speech that I desired, it was time to go back to the remaining development work in my video game.  I then reached out to Ernie Fosselius, who if you are not aware, was the voice over actor that did the all of the dialog for the Atari Gauntlet and Gauntlet II arcade games.  I told him about the video game I was creating and asked if he would like to be a part of it, and he agreed to do all of the voice over work for NoteBlaster.

 

BlueWizard, my Mac OS X application for processing speech files is available on github:

 
If you don't want to build it from source yourself, there is a prebuilt OS X binary in a disk image found in the "Build" folder found at the root of the project.
 
At some point, I plan to enhance the software by adding more functionality to make editing speech frames more friendly, but this was sort of a quick-and-dirty first pass just so I could get all the synthetic speech for NoteBlaster generated.
 
Also, as a demonstration, I took the original CES audio file that was demonstrated with QBoxPro and here is what it sounds like from BlueWizard processing it:
 
As a final note, if anyone here is interested in getting good at reading music, or has friends or loved ones that would be interested, then please help spread the word about NoteBlaster!  I posted a thread announcing it here:
 
Thank you.
 
-Patrick
 
p.s. attached are some of the notes Richard Wiggins from Texas Instruments sent to me

Attached Files


Edited by patrick99e99, Mon Jan 9, 2017 7:20 PM.


#2 sometimes99er OFFLINE  

sometimes99er

    River Patroller

  • 3,869 posts
  • Location:Denmark

Posted Mon Jan 9, 2017 2:07 AM

Now that is absolutely wonderful. And the quality is amazing. Thanks.  :thumbsup:



#3 Tursi OFFLINE  

Tursi

    River Patroller

  • 4,716 posts
  • Location:BUR

Posted Tue Jan 10, 2017 12:15 AM

That's pretty impressive, kudos!



#4 Willsy ONLINE  

Willsy

    River Patroller

  • 3,004 posts
  • Location:Uzbekistan (no, really!)

Posted Tue Jan 10, 2017 1:23 PM

That's really cool! I just wish I had a Mac!

 

It was me that created that CES audio file. I think I may have put it on youtube or something. Can't remember!

 

Super work - sincerest congratulations!



#5 Fredrik Öhrström OFFLINE  

Fredrik Öhrström

    Star Raider

  • 55 posts
  • Location:Sweden

Posted Tue Jan 10, 2017 1:35 PM

Very impressive!!!!

#6 mizapf OFFLINE  

mizapf

    River Patroller

  • 2,474 posts
  • Location:Germany

Posted Tue Jan 10, 2017 2:38 PM

Any plans for a port to Linux? (Console application would suffice.)



#7 adamantyr OFFLINE  

adamantyr

    Stargunner

  • 1,129 posts

Posted Tue Jan 10, 2017 2:44 PM

Very nice! I could use a Windows version. :) Great job getting Ernie too, funny enough I was just playing Gauntlet...



#8 patrick99e99 OFFLINE  

patrick99e99

    Space Invader

  • Topic Starter
  • 30 posts
  • Location:Los Angeles, CA

Posted Tue Jan 10, 2017 11:29 PM

Any plans for a port to Linux? (Console application would suffice.)

 

Actually, when I started the project, I did it in Ruby-- but it turned out to be too much of a pain to communicate between the ruby program and the TMS5220 emulator, so I rewrote it in objective-c and then took advantage of being able to build a UI for it.  The ruby program can be run on any platform (linux, windows), It just has no UI, so you can't edit frames or hear the generated speech.  You will have to take the hex dump the program generates and send that to a TMS5220.  If that would be useful, I can update that project and share it as well.



#9 adamantyr OFFLINE  

adamantyr

    Stargunner

  • 1,129 posts

Posted Wed Jan 18, 2017 12:01 PM

If you want, I can take a crack at producing a .NET Windows version...



#10 _The Doctor__ OFFLINE  

_The Doctor__

    River Patroller

  • 2,354 posts
  • Location:10-0-11-00:02

Posted Fri Feb 3, 2017 3:33 PM

um you realize you already have a mac these days... as it's just the OS now... there are ways to put the OS on the PC.... you can do it....



#11 OLD CS1 OFFLINE  

OLD CS1

    River Patroller

  • 3,822 posts
  • Technology Samurai
  • Location:Tallahassee, FL

Posted Fri Feb 3, 2017 6:55 PM

um you realize you already have a mac these days... as it's just the OS now... there are ways to put the OS on the PC.... you can do it....

 

Yes, but for those who do not want to go through the pain of running Yet Another Operating System... technically I could run Linux and a host of other x86-based operating systems (and some I do as a course of the work I do.)  I tried doing Mac in VirtualBox and the damned thing would not run, even after following the article to the letter.

 

I do not have the time for the trial-and-error it could, would, or will take to be successful in installing MacOS X on something other than Apple hardware which I do not own.  Therefore, I would greatly appreciate a dotNet version.



#12 Lee Stewart OFFLINE  

Lee Stewart

    River Patroller

  • 3,272 posts
  • Location:Silver Run, Maryland

Posted Fri Feb 3, 2017 11:51 PM

 

...  I would greatly appreciate a dotNet version.

 

Likewise.

 

...lee



#13 OLD CS1 OFFLINE  

OLD CS1

    River Patroller

  • 3,822 posts
  • Technology Samurai
  • Location:Tallahassee, FL

Posted Mon Feb 6, 2017 12:37 PM

FWIW, I did finally come across a useful tutorial and have Sierra running in VirtualBox 5.  Anyone who is interested can drop me a PM.



#14 Doctor Hue OFFLINE  

Doctor Hue

    Combat Commando

  • 6 posts
  • Location:Hertfordshire, England

Posted Sun Feb 12, 2017 5:57 PM

This is my first post to this forum.

 

Whilst hearing about this the other day in the news ( in England )

 

 

http://www.bbc.co.uk...-leeds-38854411

 

It reminded me of the speech system used in the 1980's BBC Micro

 

 

 I am trying to get the old Speech system from the BBC Micro to work with modern

computers and have ordered a TMS5220 and PHROM ( which haven't arrived yet ) and so have been trying to use QBOX on an old XP machine. It works ok and have attached a conversion here

along with the original file from the BBC News of 1974. This is voiced by Kenneth Kendall whose voice was used on the TMS6100 PHROM for the BBC Micro.

 

Today I got BlueWizard working on my Hackintosh. It would be nice if there was an option to save the sound files like you can with QBOX. I have recorded the BlueWizard output with my Nokia N808 'phone.

 

When I hit 'inspect' a new window opens - but it is blank ?

 

I'm still trying to figure out what the K1 to K10 coefficients are. Are they fixed frequency formants or do the peaks move ?

 

This is fantastic work Patrick; it was great that you managed to contact the original TI people. Does any one still

have the SDS5000 LPC card and software for Windows 95 ?

Attached Files



#15 acadiel OFFLINE  

acadiel

    Dragonstomper

  • 918 posts
  • www.hexbus.com
  • Location:USA

Posted Thu Feb 16, 2017 6:12 PM

Very, very impressive.

#16 patrick99e99 OFFLINE  

patrick99e99

    Space Invader

  • Topic Starter
  • 30 posts
  • Location:Los Angeles, CA

Posted Wed Feb 22, 2017 12:23 AM

Today I got BlueWizard working on my Hackintosh. It would be nice if there was an option to save the sound files like you can with QBOX. I have recorded the BlueWizard output with my Nokia N808 'phone.

 

When I hit 'inspect' a new window opens - but it is blank ?

 

I'm still trying to figure out what the K1 to K10 coefficients are. Are they fixed frequency formants or do the peaks move ?

 

Yeah, as of right now it doesn't save files, but rather just gives you the byte stream to feed to the tms5220...  I will try to add a save feature sometime.  If you notice in the project there's actually an Output.m file which I created with plans for saving the audio, I just never got around to hooking it up to the UI.

 

The inspect button is supposed to open a large waveform view, but I noticed that was somehow broken.  I just fixed it and pushed up those changes and also updated the binary in the disk image, so if you pull down the latest you'll have that fix.

 

The K's are the bins that represent the different parts of the human vocal tract.  So those values can be edited manually if you know what you're doing.

 

I intend to make the interface more user friendly for editing at some point, but my focus has been on NoteBlaster so like I said, once I got this program to the point where I could actually process the speech I needed for my game, that's where I stopped the development of BlueWizard...  But I would like to polish it up and make it much better at some point.


Edited by patrick99e99, Wed Feb 22, 2017 12:31 AM.


#17 deladriere OFFLINE  

deladriere

    Combat Commando

  • 1 posts

Posted Fri Mar 17, 2017 8:25 AM

Hi Patrick
This is really outstanding and job!

I am a great fan of these vintage speech chip. Did you know that there is an Arduino library that emulates the TMS5220? (Talkie, It just needs a small speaker on pin3! See: https://github.com/adafruit/Talkie

 

Many people are using this library to made speaking clocks, robot or weird sounds

 

I am making speech synth around that library and until now I was also using QBoxPro to compress new sound. (see: http://www.polaxis.b...talkie-library/)

( you can hear how they sound here :  https://soundcloud.c...i-re/sets/talko

 

Bluewizard is already amazing in many ways: loading waves, tweaking the output and ... I just discovered I can paste my stream of data to have it rendered !!

 

I have 2 little requests: the Arduino library needs a stop signal otherwise, the synth produces a gibberish sound after the end.
I am trying to edit the frame but BlueWizard doesn't let me add a dummy frame with an Energy of 15 to stop the synth.

Could you add an option so it adds a stop frame at the end?

Could you have an option to have the data frame displayed in a C++/ Arduino format so we could paste the data directly into the Arduino IDE (like this one {0xCC,0x67,0x75,0x42,0x59,0x5D,0x3A,0x4F,0x9D,0x36,0x63,0xB7,0x59,0xDC,0x30,0x5B,0x5C,0x23,0x61,0xF3,0xE2,0x1C,0xF1,0xF0,0x98,0xC3,0x4B,0x7D,0x39,0xCA,0x1D,0x2C,0x2F,0xB7,0x15,0xEF,0x70,0x79,0xBC,0xD2,0x46,0x7C,0x52,0xE5,0xF1,0x4A,0x6A,0xB3,0x71,0x47,0xC3,0x2D,0x39,0x34,0x4B,0x23,0x35,0xB7,0x7A,0x55,0x33,0x8F,0x59,0xDC,0xA2,0x44,0xB5,0xBC,0x66,0x72,0x8B,0x64,0xF5,0xF6,0x98,0xC1,0x4D,0x42,0xD4,0x27,0x62,0x38,0x2F,0x4A,0xB6,0x9C,0x88,0x68,0xBC,0xA6,0x95,0xF8,0x5C,0xA1,0x09,0x86,0x77,0x91,0x11,0x5B,0xFF,0x0F};

(reading it from that format would be great too!
 
Thanks a lot!
ps, I just installed NoteBlaster on my iPhone : the sounds are really vintage !


#18 patrick99e99 OFFLINE  

patrick99e99

    Space Invader

  • Topic Starter
  • 30 posts
  • Location:Los Angeles, CA

Posted Mon Mar 27, 2017 1:37 AM

 

Hi Patrick
This is really outstanding and job!

 

Could you add an option so it adds a stop frame at the end?

Could you have an option to have the data frame displayed in a C++/ Arduino format so we could paste the data directly into the Arduino IDE (like this one {0xCC,0x67,0x75,0x42,0x59,0x5D,0x3A,0x4F,0x9D,0x36,0x63,0xB7,0x59,0xDC,0x30,0x5B,0x5C,0x23,0x61,0xF3,0xE2,0x1C,0xF1,0xF0,0x98,0xC3,0x4B,0x7D,0x39,0xCA,0x1D,0x2C,0x2F,0xB7,0x15,0xEF,0x70,0x79,0xBC,0xD2,0x46,0x7C,0x52,0xE5,0xF1,0x4A,0x6A,0xB3,0x71,0x47,0xC3,0x2D,0x39,0x34,0x4B,0x23,0x35,0xB7,0x7A,0x55,0x33,0x8F,0x59,0xDC,0xA2,0x44,0xB5,0xBC,0x66,0x72,0x8B,0x64,0xF5,0xF6,0x98,0xC1,0x4D,0x42,0xD4,0x27,0x62,0x38,0x2F,0x4A,0xB6,0x9C,0x88,0x68,0xBC,0xA6,0x95,0xF8,0x5C,0xA1,0x09,0x86,0x77,0x91,0x11,0x5B,0xFF,0x0F};

(reading it from that format would be great too!
 
Thanks a lot!
ps, I just installed NoteBlaster on my iPhone : the sounds are really vintage !

 

 

Thank you, I am glad you are enjoying BlueWizard.  I went ahead and added two checkbox options to the UI, one for adding the 0x prefix, and the other for appending the stop frame.  I have updated the github repo with the code changes as well as a new pre-built binary. Let me know if you have any problems.


Edited by patrick99e99, Mon Mar 27, 2017 1:37 AM.


#19 Doctor Hue OFFLINE  

Doctor Hue

    Combat Commando

  • 6 posts
  • Location:Hertfordshire, England

Posted Tue Mar 28, 2017 4:19 PM

Thanks Patrick,

 

That's just what I needed as I've now got my TMS5220NL DEP 8419 PHILIPPINES chip onto my breadboard and am trying to download data to it using the

Speak External command.

 

BTW I tried to edit you Project Builder source code to save the audio to a .aiff file. I managed to get the Menu modified using Storyboard but just couldn't see where to connect it to in the 'OUTPUT' code :-(

 

And thanks to Deladriere for requesting the addition of '0x'



#20 patrick99e99 OFFLINE  

patrick99e99

    Space Invader

  • Topic Starter
  • 30 posts
  • Location:Los Angeles, CA

Posted Sun Apr 2, 2017 2:21 AM

BTW I tried to edit you Project Builder source code to save the audio to a .aiff file. I managed to get the Menu modified using Storyboard but just couldn't see where to connect it to in the 'OUTPUT' code :-(

 

I just updated the code and prebuilt binary on github, with the following improvements (v 1.3.0):

 

- Adds file menu option to save TMS5220 output as an .aif file

- Adds file menu option to load LPC byte stream files (in either 12,34 or 0x12,0x34 format) as an alternative to pasting them in from the clipboard.  (the project has an LPC directory with tons of lpc from Gauntlet so those can now easily be loaded and played).

- Allows byte streams to be played / pitch manipulated without requiring an input audio file signal being loaded.

- Fixes bug where speed changes did not update total number of samples in output buffer

- Fixes bug where byte streams were getting messed up due to the unvoiced threshold parameter being set

- Adds "raw excitation filter" option so you can hear the TMS excitation filter on its own.

- Changes appearance of byte stream text so that it's blue on black background.


Edited by patrick99e99, Sun Apr 2, 2017 12:39 PM.


#21 Doctor Hue OFFLINE  

Doctor Hue

    Combat Commando

  • 6 posts
  • Location:Hertfordshire, England

Posted Sun Apr 2, 2017 3:43 PM

This is excellent stuff!

 

Thanks for adding aif export.

 

I managed to get my system working this weekend and can output analogue speech using both SPEAK and SPEAK EXTERNAL .

 

I managed to copy the byte stream from BlueWizard but had to edit it to remove spaces/commas, using a text editor and then using

 

Linux command xxd -r -p

 

so that I ended up with a raw .bin file. ( LPC binary 8 bit Data, no spaces , no commas , no 0x )

 

It would be great if BlueWizard could import and export RAW 8 bit data  *.bin files as your LPC imports are TEXT files with commas.

 

I've attached my bin file as an example.

 

 

Attached File  output.bin   1.8KB   3 downloads

 

Also photo of current state of my breadboard.

 

Attached File  DHue-LPC-2017-04-02.png   5.76MB   1 downloads


Edited by Doctor Hue, Sun Apr 2, 2017 3:47 PM.


#22 patrick99e99 OFFLINE  

patrick99e99

    Space Invader

  • Topic Starter
  • 30 posts
  • Location:Los Angeles, CA

Posted Sun Apr 2, 2017 6:16 PM

It would be great if BlueWizard could import and export RAW 8 bit data  *.bin files as your LPC imports are TEXT files with commas.

 

Ok, I just updated the code again, it now can read .bin files, and under the file menu is a Save LPC Byte Stream option, if you give the output file an ".lpc" or ".txt" extension, it will be a comma delimited text file.  However, if you give it a ".bin" extension, it will save it as a raw data format.

 

Btw, your breadboard looks awesome.



#23 Doctor Hue OFFLINE  

Doctor Hue

    Combat Commando

  • 6 posts
  • Location:Hertfordshire, England

Posted Mon Apr 3, 2017 4:03 PM


Btw, your breadboard looks awesome.

 

 

Thanks :-)

Thanks also Patrick for enabling the raw bin import which works great.

I'm having trouble with the "Save LPC" options. dotLPC doesn't seem to save anything and dotbin seems to save a file with zero bytes :-(


>>>Also, as a demonstration, I took the original CES audio file that was demonstrated with QBoxPro and here is what it sounds like from BlueWizard processing it:


It occured to me that most PCs and Laptops have at least a 15KHz ( if not a lot more ) audio bandwidth and don't usually
filter audio above 4 KHz.

Analyzing your ces-processed.mp3 file I see that it has loads of components upto 21 KHz. normally the analogue audio signal from the TMS5220 would have been routed via a 4 KHz low pass filter to remove alias components above half the sampling frequency of 8 KHz. However your mp3 sounds more metaliic and harsher than  it ought to due to the spectrum alias beyond 4 KHz that repeats and is reflected every 4 KHz upto 21 KHz.

I've applied a 100th order Butterworth filter to your ces-processed audio file. The characteristics of the filter are that it has an extremely steep cut-off with very high attenuation around -90 dB at 4 kHz. Attached is the filtered audio file.

 

 

Attached File  freq-plot-22K.jpg   108.3KB   1 downloads

 

 

Attached File  freq-plot-4k.jpg   102.33KB   1 downloads

 

 

Attached File  ces-processed-BlueWiz-4KHzLPF-mono-r.wav   1.5MB   8 downloads


Edited by Doctor Hue, Mon Apr 3, 2017 4:07 PM.


#24 patrick99e99 OFFLINE  

patrick99e99

    Space Invader

  • Topic Starter
  • 30 posts
  • Location:Los Angeles, CA

Posted Mon Apr 3, 2017 4:15 PM

 

I'm having trouble with the "Save LPC" options. dotLPC doesn't seem to save anything and dotbin seems to save a file with zero bytes :-(
 

 

Can you give me a step-by-step example of this problem so that it is reproducible?  I just tried saving a .lpc and .bin file and both worked fine over here...

 

As far as the frequency spectrum, I am not at all surprised..  I did an extremely quick & dirty approach of outputting the tms5220's 8khz audio to the system output at 48khz by doing a zero-order hold (repeating the signal's value 6 times for every sample) rather than doing proper interpolation...  There's much improvement that could be done quality-wise.



#25 Doctor Hue OFFLINE  

Doctor Hue

    Combat Commando

  • 6 posts
  • Location:Hertfordshire, England

Posted Mon Apr 3, 2017 4:42 PM

 

Can you give me a step-by-step example of this problem so that it is reproducible?  I just tried saving a .lpc and .bin file and both worked fine over here...

 

OK, I'm using BlueWizard 1.4.1 (7) and running OS X 10.11.6

 

I launch BlueWizard then file open 8KHz wave

 

Then check Pre-Emphasis alpha

 

Then hit Play TMS5220 output

 

All good so far

 

Then Save LPC Byte stream

 

Then hit save button

 

If I leave .lpc option , nothing happens

 

If I select .bin option a zero byte file gets saved.

 

I've attached file just saved

 

Actually Atari Age wouldn't save a zero byte file so I've attached a screen shot of what was created.

 

 

Attached File  screenBW5bin.tiff   68.53KB   9 downloads






0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users