Jump to content
IGNORED

Introducing BlueWizard - QBoxPro replacement speech analysis TMS5220 tool


patrick99e99

Recommended Posts

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/forums/topic/218272-trying-to-generate-some-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

post-8711-0-95014400-1483924509_thumb.jpg

post-8711-0-01099900-1483924535_thumb.jpg

post-8711-0-48904600-1483924752_thumb.png

post-8711-0-83231300-1483924761_thumb.png

post-8711-0-72291600-1483924770_thumb.png

post-8711-0-13555700-1483925659_thumb.png

post-8711-0-62408900-1483925734_thumb.png

post-8711-0-85575500-1483925743_thumb.png

post-8711-0-13358900-1483925753_thumb.png

post-8711-0-40037900-1483925764_thumb.png

Edited by patrick99e99
  • Like 15
  • Thanks 1
Link to comment
Share on other sites

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.

  • Like 3
Link to comment
Share on other sites

  • 3 weeks later...

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.

  • Like 4
Link to comment
Share on other sites

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/news/uk-england-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 ?

grab2.tiff

KENDAL~1-wlp.wav

kendall1974trim-left-8k.wav

BlueWizOutputN808.mp4

  • Like 4
Link to comment
Share on other sites

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
Link to comment
Share on other sites

  • 4 weeks later...

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.be/2015/12/lpc-encoding-for-the-arduinos-talkie-library/)

( you can hear how they sound here : https://soundcloud.com/jean-luc-deladri-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 !
  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

 

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
  • Like 2
Link to comment
Share on other sites

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'

Link to comment
Share on other sites

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
  • Like 2
Link to comment
Share on other sites

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.

 

 

output.bin

 

Also photo of current state of my breadboard.

 

post-51579-0-46542800-1491169031_thumb.png

Edited by Doctor Hue
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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:

http://collinatorstudios.com/projects/bluewizard/ces-processed.mp3

 

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.

 

 

post-51579-0-36330100-1491256929_thumb.jpg

 

 

post-51579-0-93799200-1491256920_thumb.jpg

 

 

ces-processed-BlueWiz-4KHzLPF-mono-r.wav

Edited by Doctor Hue
Link to comment
Share on other sites

 

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.

Link to comment
Share on other sites

 

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.

 

 

screenBW5bin.tiff

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...