Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding words or converting .wav file #4

Open
elac opened this issue Sep 17, 2013 · 34 comments
Open

Adding words or converting .wav file #4

elac opened this issue Sep 17, 2013 · 34 comments
Assignees
Labels

Comments

@elac
Copy link

elac commented Sep 17, 2013

Hello,
First, This is an excellent library, very useful. Thanks!!!
This is really not an issue more of a question.
But I don't no how to contact you otherwise.
How do I add/create my own words, or convert a .wav file like what was done for Tom's Dinner?
Is there a tutorial on that?
I need the word "humidity" in a male voice.

Thanks
Elac

@going-digital
Copy link
Owner

Adding words is tricky. The examples (with the exception of Tom's Diner) are extracted from commercial ROMs mastered by the Texas Instruments mastering hardware, for the TMS5220 family of chips. I'm not aware of any open source encoders - just some old hacked DOS versions that I've never managed to get running. (If you find other ROMs, the speech strings should work as is. If not, try bit reversing each byte, as there is no standard way of mapping bits to bytes on those ROMs)

The encoder section of the repo contains the code I used to encode the Toms Diner example. I'm not happy with it - the pitch detection makes some bad mistakes, often off by an octave - but its the best I could come up with at the time. Get Freemat running, and run the 'romgen' file. Any 8kHz 16bit mono WAV should work the same way.

It looks like LPC-10 uses a very similar algorithm, with different coefficient encoding and bit mapping. That is publicly available, with source - but the official distribution is machine translated from FORTRAN and it shows. Not ideal, but probably enough for a DSP coder to produce something usable. In fact most LPC 10 pole 8kHz codecs could be ported to Talkie, given the time and expertise. The best source for the coefficient mapping on the TMS5220 is probably the emulator used by the MAME project, which was the inspiration for Talkie.

There is another option - the TI-99/4A cartridge 'Terminal Emulator II' includes an English -> Phoneme -> TMS5220 bitstream mapper that uses a set of rules to pronounce any word. Unfortunately its written in Graphics Programming Language, which is poorly documented and has no good reverse engineering tools. Those rules could be ported to Arduino, and would give an infinite vocabulary synthesiser in about 8Kbytes - but it is a lot of work.

Neither of those are trivial jobs, but they could be achieved. However, you might find bulk memory (eg. an SD card) and a WAV file might be more appropriate to your purposes. Adafruit's Wave Shield is a good start (although I prefer to use on-chip PWM instead of an external ADC).

@elac
Copy link
Author

elac commented Sep 17, 2013

Hello Peter,
Thanks for the informative reply.
I'm trying the Freemat method as it seems to be the most straight forward.
The problem is that romgen.m asks for a .cvs file.
Is that a continuous variable slope file?
If so how would I convert .wav to .cvs?
I found a .cvs to .wav converter but not the other way around.

Edit:
Ok read into Freemat and found out that Comma Separated Value is what the CSV file is.

Thanks for your time,
elac

@elac
Copy link
Author

elac commented Sep 21, 2013

Hello,
Could you please upload the TomsDinerStream.csv file so I could use it as a reference?
I would like to use Freemat for the sound conversion but I am a bit lost at the moment.

Thanks
elac

@going-digital
Copy link
Owner

Having a look through my old code, 'calc' is what you should be running. That generate tomsDinerStream.csv. As the csv file contains LPC coefficient parameters, having the file isn't much use unless you're trying to generate a Toms Diner bitstream.

Its clear that encoding is a problem, and the current encoder really isn't in a friendly usable state. I'll see what I can do to rectify that in the near future. For now, you might have more luck using QBOX Pro ( http://www.ninerpedia.org/index.php/Development_resources ). I couldn't get it working here, but it does contain proper compression algorithms designed by same team that designed the original speech chips, so it could well be worth the effort trying. Tell it to encode for the TMS5220. You might need to reverse the bit order in each byte of the output. If you have success with QBOX Pro, please report back so others can save time.

@ghost ghost assigned going-digital Sep 22, 2013
@elac
Copy link
Author

elac commented Sep 22, 2013

Hello Peter,
Thanks for the info!!
I tried QBOX, won't run on my Windows 7 PC, will run on my XP PC but gives errors when starting about "QuadraVox Main format not supported for output" and "QuadraVox Main format not supported for input".
Also once running and my .wav file is loaded I can't label it or play it through QBOX.
BUT, running my .wav file through your encoder I have generated this:
--> source 'C:/Workshop/arduino-1.0.5/libraries/Talkie/encoder/freemat/romgen.m'
010000110111001010000101110011...Frames:
60 V, 1 U, 0 R, 16 S
Rom size 3093 bits
-->
Now onto the next step?

@going-digital
Copy link
Owner

Great news! You're most of the way there. The long binary string is what needs to be in the word dictionary:

uint8_t spCUSTOM[] PROGMEM = {
    // 11100001 10100111 01110011 01101110 11001001 00110 ...
    0xe1,0xa7,0x73,0x6e,0xc9, ...
}

Or it might be reverse bit order where the LSB is read first, in which case:

uint8_t spCUSTOM[] PROGMEM = {
    // 11100001 10100111 01110011 01101110 11001001 00110 ...
    0x87,0xe5,0xce,0x76,0x93, ...
}

A quick test should make it obvious which is which. You can pad out the bits of the final byte with '0's or '1's - it doesn't matter.

(When I was coding Talkie, the available speech ROMs were inconsistent in bit order. Thats the reason for the 'rev' function in the Talkie code. I can't remember which order it is now. Note to self - document better!)

I have a horrible feeling that I generated the TomsDiner script by running that binary string through a series of reg-ex search and replaces until it was a C formatted hex array. It would have been much more productive to write a quick python script. Is that enough information for you to throw together a script at your end, to get your example working?

By the way, the last bit is telling you how many speech frames there are. 55 Voiced, 0 Unvoiced (there should probably be more than that - the encoder hasn't identified any 's', 'th', 'f', 'p' or 'b' sounds), 2 Repeated frames and 2 Silent frames.

@bperrybap
Copy link

As a point of information, there is also this speech code for the AVR:
http://www.societyofrobots.com/member_tutorials/node/211

It has amazingly compact text to speech using phoneme codes.
The actual speech output is not all that great, very scratchy and robotic.

--- bill

@going-digital
Copy link
Owner

Interesting. Cheers Bill! My, that package looks extremely like "Speech!" by Superior Software for the BBC Micro. I wonder if the author had access to the source code.

@norpchen
Copy link

I was able to get QboxPro to generate an LPC file, but it's a heck of a messy toolchain. Here's some of my notes, in case anyone finds it useful.

QBoxPro is a 16bit win3.1 application, so it will not run under modern OS (such as win7 x64 bit). I created a virtual XP 32bit machine and installed it there. The QBoxPro zip file that's floating around doesn't work unless you unzip it to c:\QBOX and copy the ini file to c:\windows.

More info on getting it running, including a link to the zip file, can be found on this thread: http://atariage.com/forums/topic/218272-trying-to-generate-some-ti99-speech/page-2

Once it's running you need to process your WAV files. This link walks you through that procedure: http://furrtek.free.fr/index.php?a=speakandspell&ss=9&i=2 Start on step 3 (you shouldn't need to use DOSBOX or edit the ini file) and ignore the thing on step 6 about coefficient needing to be 10.

I was able to preview (listen to) the original file, but not the compressed file in QBoxPro.

After that, you want to take the .bin file, dump it out as hex, and import it into your words.

@deladriere
Copy link

Hi Peter
I've got to this point
111111010100001010011001101101000101000100010000001111110111001100001110110100011000011101000010000001110101010001001011110000111000110000000000001111Frames:
85 V, 0 U, 3 R, 25 S
Rom size 4383 bits

I am trying desperately to make the the array but can't make it
Do you have a python script to convert the binary to the array ?

thanks a lot

@trevor-sonic
Copy link

Hi deladriere & going-digital,

With Freemat; I've achieved to create 10101010101010 (like deladrier)
1.step : calc.m
2.step : romgen.m
3.step : with a PHP code I converted this binary snake to arduino compatible hex format.

Below small part of song encoded. I tested, sounds well! ;-)

@deladriere if you want, send to me your binary, I convert for you.

@going-digital Peter, thanks for this interesting library

uint8_t spSUZAN[] PROGMEM= {0x0, 0x89, 0x2a, 0xc2, 0xc3, 0x42, 0x94, 0x5, 0xd3, 0x70, 0x4f, 0x6f, 0x77, 0x9a, 0x2c, 0xa1, 0xa3, 0xa2, 0xd8, 0x4d, 0x72, 0x95, 0x88, 0xb2, 0x12, 0x37, 0xc9, 0x95, 0xca, 0x33, 0x9b, 0xdd, 0x4, 0x97, 0xcb, 0xaa, 0x68, 0x56, 0x63, 0x3c, 0xc1, 0x22, 0x23, 0xc3, 0x31, 0x80, 0xb2, 0x23, 0x31, 0x4d, 0x35, 0xdb, 0x40, 0x80, 0x66, 0xdc, 0x9d, 0x9e, 0xa8, 0xa6, 0x8f, 0xab, 0x4e, 0xa6, 0x54, 0x55, 0xde, 0xe4, 0x38, 0x98, 0xdc, 0x44, 0x66, 0x52, 0x92, 0x6c, 0x6, 0x93, 0xeb, 0xa8, 0xc, 0x76, 0xe2, 0x4c, 0xa6, 0x23, 0xba, 0xcc, 0xb1, 0x32, 0x1c, 0xf7, 0x8, 0x37, 0x3b, 0x0, 0x0, 0xc, 0x28, 0x36, 0x22, 0x28, 0x89, 0xab, 0x45, 0x9b, 0x9a, 0xa4, 0x71, 0x53, 0x15, 0xc9, 0x8e, 0x8b, 0x66, 0x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x5a, 0x1c, 0x3b, 0x95, 0xc9, 0xae, 0x1c, 0x75, 0x1c, 0xc, 0x2e, 0xab, 0xa2, 0xcc, 0x4d, 0x30, 0x24, 0x8f, 0xf2, 0x56, 0x37, 0x41, 0x57, 0x22, 0x32, 0x5b, 0xdd, 0x46, 0xcd, 0x69, 0x4a, 0x78, 0xd4, 0xa9, 0x5d, 0xa7, 0x71, 0x15, 0xd9, 0x63, 0x4e, 0x95, 0xc6, 0x65, 0x44, 0x85, 0x27, 0x6, 0x0, 0x60, 0x40, 0x33, 0x66, 0x41, 0x30, 0xaa, 0x32, 0x86, 0x6c, 0x27, 0xd1, 0xea, 0xca, 0x6c, 0xb4, 0x92, 0x24, 0x2f, 0x23, 0x62, 0xc9, 0x4e, 0x90, 0xb4, 0xf1, 0xe8, 0x21, 0x3b, 0x46, 0xe6, 0xba, 0x22, 0x53, 0x1d, 0x81, 0xd2, 0x22, 0x77, 0x33, 0xb, 0xdb, 0x0, 0x40, 0x80, 0xa6, 0xcc, 0x11, 0x50, 0x88, 0x98, 0x53, 0x85, 0xa8, 0x8a, 0x56, 0x27, 0x41, 0xf7, 0x24, 0xda, 0x97, 0x9d, 0x24, 0xcd, 0x9, 0x8f, 0x1c, 0xb1, 0x9d, 0xd5, 0xa0, 0x9, 0x15, 0x59, 0x63, 0x8a, 0x9c, 0xe6, 0x69, 0x58, 0xa6, 0x39, 0xd, 0x92, 0xd2, 0x55, 0x59, 0xac, 0xb8, 0x48, 0x4e, 0x77, 0x45, 0x93, 0x9c, 0x22, 0x7a, 0x5d, 0x99, 0x83, 0xb6, 0x8b, 0xe4, 0x4c, 0x64, 0x35, 0x29, 0x49, 0x92, 0xb1, 0x9e, 0x55, 0xe4, 0x38, 0x49, 0x56, 0x7b, 0x66, 0x93, 0x9d, 0x20, 0x49, 0x53, 0x19, 0x29, 0x76, 0x82, 0x24, 0x5d, 0x45, 0xa6, 0xc8, 0x8e, 0x52, 0x90, 0xa4, 0x8d, 0xa8, 0x12, 0xc5, 0x41, 0x72, 0x2a, 0x22, 0x87, 0x54, 0x5, 0xc9, 0xc9, 0xca, 0x68, 0x56, 0x1c, 0x64, 0xad, 0x23, 0xb2, 0x59, 0x71, 0x94, 0xa3, 0xec, 0x54, 0x21, 0x23, 0x6a, 0x54, 0x51, 0xd0, 0xbc, 0xf0, 0xa8, 0x15, 0xc9, 0x49, 0xf7, 0x34, 0xca, 0x5b, 0xe4, 0x4, 0x43, 0xf2, 0x2a, 0x2f, 0x71, 0xe2, 0x4c, 0x2e, 0xaa, 0xa2, 0xc5, 0x8d, 0x31, 0x2d, 0xf, 0x77, 0xf, 0xc7, 0xca, 0x10, 0xd4, 0x3c, 0x4d, 0x6d, 0x3, 0x2, 0x1a, 0x17, 0x45, 0x40, 0xa6, 0x22, 0x8, 0x28, 0x54, 0x18, 0x1, 0xdd, 0xa8, 0x22, 0xa0, 0x9, 0x11, 0x4, 0x14, 0x29, 0x1e, 0xb0, 0xae, 0x4d, 0xa3, 0x25, 0x32, 0x1, 0x86, 0x32, 0x26, 0x40, 0x57, 0xca, 0x8, 0x18, 0xd6, 0xe5, 0x1};

@deladriere
Copy link

@trevor-sonic : Well done !
I want to automate the process on my Mac, can we have a look on you PHP code ?

@trevor-sonic
Copy link

trevor-sonic commented Jan 20, 2015

Hi @deladriere ,
Code is working here;
http://lab.dejaworks.com/dev/talkie-encoder/
I can send it to you but you have to install apache server to work on your computer.
First give a try on on-line version on my server if it is efficient/need improvement then I send you the code corrected ok?

@bperrybap
Copy link

This method of creating the data arrays is way to messy in my opinion.
In my view interpreted languages are interesting but should not be used
for something like this due to toolsets and speed issues.
Surely the freemat code can be converted to C and the C code to convert
the bit stream characters to a data array is very simple.
I'm going to go through the code and look at re-writing it all in C so this can be done
with a simple single executable.
It should make things much easier and whole lot faster as well.

--- bill

@trevor-sonic
Copy link

@bperrybap You're right, it would be nice to have an application which do everything in one.
If it helps I post my code PHP here.

The heart of hex creator is:

    //divide the stream in 8 bits and set in $binArr as array
    $binArr =   str_split ($binary, 8);
    foreach($binArr as $k=>$v)
    {
        //strrev revers the string like: 12345678 -> 87654321
        //bindec BIN to DEC
        //dechex DEC to HEX
        echo "0x".dechex(bindec(strrev ($v))).', ';
    }

I hope this helps.
I look forward to hear your news

@deladriere
Copy link

@bperrybap can't wait to test your solution ! I am already thinking of a batch process ;-)
@trevor-sonic thanks for this script and for the url I will test it soon

@deladriere
Copy link

what would be really cool is to use Sox to convert audio to LPC10 and then calculate all the parameters directly
(but I don't know how to do that)

@zainurihasan
Copy link

hi can any one tell me step by step how to make my own wrds from WAV,? i dont know how to get binary frome wav file,,

@FartyPants
Copy link

FartyPants commented Nov 8, 2016

I know it is old thread by I was messing with the QBOX and it does works well (under Windows XP mode but you have to disable 80×87 emulator or it will crash in WIN87EM.DLL) except there are various parameters to set and for some reason the suzane vega I converted play slower...and has nice robotic voice that ends in a ghost voice :-). This is really ancient technology, but actually works pretty well on arduino.
Just so you know.

const uint8_t vega_weirdo[] PROGMEM = { 196, 156, 46, 195, 221, 108, 3, 128, 3, 74, 139, 8, 64, 174, 154, 203, 174, 201, 67, 210, 37, 15, 167, 14, 115, 105, 183, 181, 156, 90, 44, 116, 204, 214, 114, 107, 180, 212, 209, 88, 203, 173, 193, 82, 199, 108, 45, 183, 120, 43, 27, 183, 180, 220, 234, 172, 116, 221, 214, 114, 170, 179, 180, 53, 89, 203, 169, 86, 218, 219, 108, 45, 167, 25, 233, 72, 51, 53, 220, 102, 184, 35, 53, 212, 112, 186, 161, 138, 22, 75, 195, 105, 134, 50, 90, 45, 15, 187, 25, 202, 40, 177, 212, 172, 166, 41, 179, 68, 210, 106, 154, 161, 204, 68, 203, 171, 169, 74, 42, 19, 165, 172, 58, 107, 111, 79, 22, 179, 234, 108, 172, 50, 217, 204, 168, 179, 215, 204, 18, 49, 163, 78, 86, 210, 211, 41, 183, 58, 104, 169, 240, 180, 220, 234, 32, 180, 50, 90, 82, 169, 157, 180, 234, 72, 73, 165, 214, 50, 163, 43, 76, 21, 183, 17, 9, 9, 119, 18, 220, 233, 202, 52, 85, 76, 112, 150, 139, 208, 8, 203, 193, 25, 190, 194, 43, 28, 39, 103, 166, 14, 75, 79, 44, 128, 110, 220, 21, 208, 140, 233, 40, 11, 215, 176, 85, 39, 163, 74, 210, 178, 94, 173, 140, 42, 10, 239, 122, 179, 178, 170, 168, 188, 251, 204, 206, 168, 18, 243, 169, 151, 168, 171, 138, 60, 166, 86, 236, 174, 42, 113, 159, 58, 177, 59, 170, 196, 125, 250, 197, 234, 42, 51, 243, 201, 147, 168, 163, 202, 204, 170, 158, 236, 142, 42, 11, 173, 126, 178, 58, 202, 204, 172, 235, 217, 106, 42, 35, 183, 168, 50, 197, 161, 8, 196, 178, 210, 157, 140, 52, 9, 205, 90, 146, 186, 146, 76, 99, 114, 208, 236, 74, 162, 232, 53, 39, 59, 43, 137, 162, 198, 2, 227, 140, 36, 242, 92, 49, 106, 220, 18, 163, 114, 76, 101, 85, 73, 168, 159, 210, 140, 212, 37, 97, 118, 202, 51, 218, 148, 132, 153, 41, 79, 159, 91, 18, 110, 114, 219, 35, 73, 74, 185, 174, 238, 168, 186, 33, 17, 186, 43, 60, 91, 135, 164, 50, 247, 242, 72, 29, 250, 166, 93, 205, 220, 73, 218, 135, 55, 215, 82, 71, 206, 27, 214, 204, 212, 98, 39, 175, 107, 214, 104, 113, 146, 220, 38, 56, 114, 216, 73, 242, 170, 36, 155, 82, 167, 201, 203, 146, 189, 75, 210, 36, 55, 113, 139, 42, 73, 146, 220, 36, 213, 187, 60, 118, 112, 35, 55, 203, 202, 216, 206, 9, 204, 60, 59, 35, 5, 39, 112, 243, 138, 140, 29, 156, 192, 44, 178, 210, 86, 176, 3, 215, 172, 76, 75, 193, 242, 60, 50, 163, 98, 5, 43, 240, 176, 204, 138, 16, 108, 199, 34, 189, 50, 98, 48, 157, 12, 247, 174, 136, 197, 12, 218, 220, 34, 109, 21, 51, 120, 51, 143, 176, 156, 76, 167, 35, 220, 221, 118, 50, 173, 244, 10, 15, 199, 201, 180, 202, 51, 220, 29, 39, 211, 168, 200, 74, 179, 92, 26, 45, 43, 189, 204, 113, 105, 148, 206, 12, 77, 87, 165, 214, 58, 51, 36, 18, 141, 58, 41, 13, 11, 183, 93, 42, 87, 43, 148, 60, 114, 171, 220, 104, 87, 49, 203, 165, 114, 187, 157, 197, 44, 151, 202, 237, 14, 33, 183, 92, 106, 183, 219, 84, 195, 116, 169, 221, 106, 53, 11, 75, 165, 114, 43, 205, 220, 45, 183, 202, 207, 82, 247, 144, 220, 42, 63, 211, 60, 93, 82, 171, 252, 200, 48, 11, 137, 173, 242, 173, 220, 195, 36, 183, 202, 215, 136, 72, 167, 84, 42, 95, 35, 42, 12, 116, 171, 66, 137, 140, 50, 208, 173, 138, 89, 179, 38, 64, 141, 42, 101, 137, 156, 32, 52, 170, 24, 181, 188, 149, 98, 171, 146, 151, 202, 22, 200, 163, 42, 158, 61, 218, 9, 151, 82, 42, 175, 73, 183, 146, 74, 166, 179, 39, 67, 78, 203, 141, 210, 238, 54, 167, 35, 137, 82, 179, 18, 147, 157, 36, 201, 40, 79, 168, 179, 226, 168, 189, 195, 160, 205, 138, 131, 169, 86, 165, 166, 43, 14, 38, 91, 141, 218, 140, 196, 185, 78, 116, 109, 211, 18, 145, 218, 196, 189, 115, 73, 104, 234, 52, 175, 196, 45, 97, 161, 219, 50, 90, 149, 132, 197, 10, 139, 94, 221, 18, 175, 61, 37, 162, 105, 74, 146, 12, 119, 137, 212, 46, 235, 198, 205, 221, 28, 155, 164, 235, 48, 179, 136, 109, 146, 166, 202, 195, 196, 246, 48, 71, 242, 208, 141, 58, 197, 153, 209, 66, 215, 34, 39, 179, 89, 117, 107, 161, 85, 220, 106, 205, 163, 152, 114, 241, 170, 55, 143, 17, 218, 197, 107, 214, 194, 135, 37, 23, 175, 121, 115, 95, 166, 93, 220, 102, 204, 180, 217, 82, 114, 171, 82, 183, 84, 75, 193, 173, 202, 196, 194, 45, 57, 191, 91, 115, 87, 99, 98, 146, 174, 67, 93, 67, 137, 74, 166, 9, 11, 119, 199, 38, 233, 38, 221, 45, 108, 41, 160, 57, 11, 5, 52, 239, 177, 242, 236, 84, 227, 197, 241, 201, 74, 16, 205, 215, 168, 39, 205, 86, 45, 159, 226, 158, 52, 57, 139, 57, 182, 119, 146, 104, 51, 235, 40, 217, 73, 130, 203, 236, 229, 100, 39, 9, 174, 170, 150, 147, 156, 36, 154, 204, 88, 137, 211, 146, 172, 221, 188, 85, 73, 168, 34, 243, 200, 112, 203, 161, 206, 204, 204, 179, 172, 132, 38, 9, 147, 232, 146, 18, 154, 194, 76, 45, 221, 118, 104, 42, 51, 245, 12, 219, 39, 156, 190, 67, 75, 157, 157, 60, 107, 139, 122, 179, 123, 242, 108, 188, 98, 49, 238, 201, 99, 168, 142, 37, 43, 39, 143, 37, 187, 78, 172, 156, 60, 22, 175, 26, 73, 114, 242, 148, 50, 115, 57, 201, 201, 83, 206, 204, 165, 212, 39, 143, 37, 170, 154, 19, 159, 60, 150, 232, 42, 137, 125, 242, 88, 162, 59, 57, 242, 201, 83, 140, 238, 162, 200, 39, 79, 182, 186, 155, 172, 140, 60, 186, 109, 9, 176, 83, 10, 163, 188, 67, 44, 77, 169, 130, 208, 46, 83, 39, 163, 106, 156, 221, 90, 237, 142, 170, 40, 203, 24, 134, 210, 202, 224, 171, 205, 153, 118, 43, 67, 172, 118, 19, 90, 173, 138, 161, 198, 205, 104, 141, 42, 217, 24, 79, 163, 221, 170, 232, 189, 35, 157, 114, 171, 162, 143, 177, 48, 153, 173, 138, 33, 58, 220, 41, 183, 42, 121, 47, 207, 164, 212, 202, 28, 61, 188, 93, 114, 75, 114, 178, 176, 73, 198, 206, 41, 186, 178, 43, 109, 185, 186, 137, 172, 234, 138, 227, 234, 38, 163, 170, 218, 245, 40, 155, 235, 225, 174, 166, 39, 207, 177, 83, 206, 236, 156, 60, 181, 114, 27, 113, 178, 242, 184, 221, 179, 40, 241, 202, 227, 12, 139, 161, 196, 43, 143, 61, 45, 134, 28, 175, 60, 246, 180, 24, 140, 179, 242, 88, 218, 124, 49, 246, 202, 99, 26, 179, 67, 219, 35, 143, 105, 221, 22, 173, 180, 60, 196, 116, 119, 21, 83, 10, 169, 179, 50, 34, 114, 41, 165, 202, 168, 204, 200, 169, 82, 178, 162, 34, 98, 167, 90, 203, 200, 140, 136, 221, 170, 232, 205, 53, 93, 116, 169, 130, 11, 213, 116, 83, 161, 138, 60, 220, 196, 83, 19, 192, 26, 55, 2, 4, 155, 78, 128, 184, 210, 90, 17, 79, 102, 120, 38, 105, 69, 90, 21, 30, 150, 164, 228, 37, 116, 135, 89, 226, 150, 251, 82, 78, 17, 142, 71, 238, 71, 152, 84, 42, 29, 185, 223, 97, 210, 225, 100, 228, 254, 184, 89, 186, 226, 145, 135, 107, 30, 225, 178, 87, 30, 182, 71, 148, 75, 94, 121, 216, 150, 81, 38, 121, 229, 97, 89, 103, 171, 228, 147, 199, 110, 19, 163, 146, 79, 30, 171, 117, 182, 74, 58, 69, 204, 222, 145, 34, 121, 21, 197, 74, 70, 9, 185, 86, 6, 161, 157, 165, 86, 90, 29, 132, 149, 167, 202, 57, 117, 113, 82, 209, 46, 234, 84, 57, 72, 251, 168, 152, 85, 165, 40, 29, 45, 76, 86, 21, 179, 183, 135, 50, 94, 85, 142, 218, 86, 74, 123, 212, 57, 112, 88, 58, 149, 86, 183, 98, 166, 17, 178, 8, 16, 141, 59, 3, 138, 103, 51, 64, 13, 226, 14, 104, 65, 221, 1, 35, 187, 58, 160, 167, 48, 3, 140, 20, 102, 128, 225, 195, 12, 208, 83, 184, 2, 90, 12, 23, 64, 13, 25, 12, 40, 193, 140, 0, 65, 187, 18, 32, 219, 48, 3, 228, 234, 185, 252, 26, 162, 236, 210, 233, 113, 75, 137, 180, 115, 59, 199, 45, 41, 202, 78, 45, 31, 167, 70, 15, 89, 179, 115, 220, 154, 52, 124, 213, 206, 113, 91, 180, 208, 83, 43, 199, 169, 193, 210, 79, 172, 28, 183, 152, 104, 27, 177, 115, 220, 98, 189, 125, 37, 202, 113, 139, 181, 142, 209, 40, 203, 45, 198, 38, 70, 45, 47, 183, 104, 155, 106, 177, 188, 220, 162, 125, 162, 216, 242, 112, 170, 210, 142, 34, 203, 195, 174, 90, 58, 146, 77, 15, 179, 106, 233, 28, 178, 114, 154, 98, 180, 171, 200, 202, 105, 138, 242, 201, 97, 187, 167, 41, 198, 186, 150, 237, 158, 166, 24, 235, 26, 178, 187, 154, 236, 172, 171, 68, 202, 105, 178, 243, 138, 54, 203, 171, 73, 209, 51, 219, 164, 140, 38, 134, 24, 245, 144, 211, 154, 164, 116, 76, 35, 82, 107, 146, 144, 114, 215, 58, 163, 137, 82, 203, 205, 227, 140, 38, 74, 75, 15, 181, 221, 26, 47, 45, 61, 220, 118, 105, 156, 242, 178, 8, 71, 165, 14, 182, 93, 217, 93, 151, 210, 198, 12, 175, 180, 181, 202, 16, 44, 243, 92, 206, 42, 147, 214, 142, 83, 43, 171, 202, 74, 186, 150, 165, 174, 170, 42, 174, 62, 150, 183, 170, 42, 185, 234, 68, 218, 170, 170, 228, 234, 19, 113, 171, 170, 146, 171, 95, 196, 173, 170, 74, 238, 89, 177, 182, 202, 34, 100, 122, 89, 222, 42, 139, 144, 233, 101, 107, 167, 172, 156, 167, 79, 236, 158, 178, 10, 238, 126, 177, 58, 202, 36, 101, 102, 197, 242, 200, 187, 87, 87, 23, 43, 43, 45, 74, 60, 218, 236, 156, 164, 90, 170, 94, 182, 124, 146, 106, 184, 103, 201, 234, 73, 178, 209, 105, 199, 184, 39, 73, 218, 39, 20, 155, 174, 36, 105, 31, 37, 110, 50, 146, 104, 124, 152, 173, 117, 75, 100, 136, 84, 107, 39, 45, 225, 33, 210, 35, 211, 148, 132, 199, 112, 203, 106, 211, 210, 160, 60, 56, 188, 105, 72, 10, 211, 240, 208, 52, 46, 238, 202, 60, 60, 28, 135, 190, 105, 87, 143, 176, 237, 204, 166, 220, 194, 221, 246, 49, 71, 142, 180, 141, 58, 195, 108, 214, 42, 147, 173, 52, 187, 89, 75, 43, 54, 213, 236, 230, 44, 221, 89, 116, 115, 155, 241, 142, 98, 49, 205, 233, 94, 195, 74, 68, 55, 103, 56, 115, 105, 181, 92, 156, 102, 205, 164, 93, 86, 112, 155, 86, 229, 42, 89, 38, 105, 38, 45, 221, 99, 139, 114, 250, 140, 112, 119, 172, 226, 174, 35, 221, 61, 182, 75, 186, 13, 143, 48, 199, 4, 200, 70, 93, 0, 197, 170, 11, 128, 219, 232, 98, 54, 77, 22, 227, 182, 157, 61, 163, 178, 153, 217, 38, 64, 17, 228, 4, 112, 194, 116, 20, 171, 90, 121, 89, 156, 229, 174, 96, 165, 229, 113, 70, 178, 154, 59, 167, 90, 58, 101, 183, 236, 90, 98, 249, 212, 213, 90, 235, 104, 228, 83, 87, 239, 238, 171, 177, 79, 93, 131, 187, 173, 70, 62, 117, 41, 106, 177, 106, 122, 213, 57, 152, 230, 178, 229, 85, 231, 96, 154, 229, 166, 71, 157, 156, 89, 180, 24, 110, 85, 48, 230, 145, 38, 185, 212, 150, 71, 86, 150, 164, 84, 71, 98, 153, 81, 137, 93, 221, 92, 132, 171, 218, 10, 117, 55, 105, 238, 110, 219, 0, 75, 169, 59, 160, 75, 139, 147, 84, 167, 38, 103, 182, 79, 82, 140, 166, 159, 91, 61, 73, 81, 214, 118, 102, 231, 36, 217, 88, 219, 105, 156, 147, 100, 107, 237, 171, 113, 78, 146, 157, 181, 173, 198, 61, 73, 114, 214, 182, 18, 247, 36, 201, 91, 219, 72, 146, 147, 100, 111, 109, 163, 113, 79, 146, 130, 181, 142, 198, 61, 73, 10, 54, 58, 106, 247, 36, 41, 90, 235, 170, 221, 149, 164, 194, 149, 229, 76, 91, 94, 149, 155, 164, 201, 46, 233, 200, 153, 106, 22, 59, 37, 195, 122, 68, 184, 99, 2, 36, 237, 65, 128, 164, 204, 9, 80, 172, 24, 3, 140, 143, 8, 78, 200, 109, 164, 145, 38, 185, 49, 116, 176, 166, 219, 228, 198, 216, 206, 86, 174, 147, 27, 83, 25, 123, 39, 78, 78, 12, 233, 154, 229, 164, 56, 41, 184, 107, 174, 237, 226, 164, 96, 161, 211, 150, 155, 147, 157, 165, 204, 216, 110, 78, 54, 86, 122, 97, 187, 57, 69, 232, 216, 134, 226, 226, 36, 225, 109, 99, 114, 130, 83, 164, 153, 70, 218, 78, 118, 115, 225, 170, 42, 105, 85, 217, 154, 233, 121, 156, 83, 229, 40, 86, 39, 142, 79, 153, 11, 101, 175, 88, 57, 121, 246, 30, 118, 106, 229, 100, 217, 102, 202, 153, 217, 147, 102, 93, 205, 171, 118, 78, 154, 117, 53, 157, 196, 57, 73, 114, 149, 124, 108, 103, 37, 49, 135, 235, 177, 237, 145, 196, 20, 170, 171, 182, 91, 26, 140, 134, 100, 215, 110, 153, 145, 222, 158, 221, 184, 228, 74, 122, 71, 117, 194, 84, 24, 97, 147, 85, 53, 75, 17, 152, 78, 84, 37, 28, 121, 180, 236, 209, 38, 101, 229, 69, 121, 249, 130, 228, 147, 23, 229, 157, 139, 146, 79, 158, 117, 116, 13, 74, 58, 121, 209, 94, 61, 36, 233, 228, 85, 123, 245, 146, 164, 147, 23, 237, 217, 75, 150, 78, 94, 84, 86, 45, 155, 58, 69, 147, 145, 113, 108, 242, 228, 85, 71, 228, 177, 164, 149, 23, 29, 94, 135, 148, 75, 238, 165, 69, 165, 201, 73, 133, 19, 238, 21, 145, 36, 20, 85, 154, 151, 153, 108, 151, 52, 101, 145, 238, 150, 29, 208, 181, 187, 2, 170, 54, 19, 64, 11, 106, 165, 168, 158, 85, 58, 98, 183, 42, 27, 53, 221, 114, 84, 202, 228, 85, 125, 219, 86, 41, 147, 87, 245, 45, 89, 165, 140, 38, 220, 166, 228, 164, 50, 218, 80, 173, 177, 157, 170, 168, 210, 212, 51, 113, 168, 170, 48, 55, 51, 219, 174, 234, 38, 34, 202, 108, 179, 168, 187, 114, 207, 72, 237, 242, 166, 211, 179, 178, 137, 139, 155, 137, 200, 72, 71, 195, 109, 177, 42, 74, 99, 167, 160, 251, 74, 47, 115, 20, 226, 166, 43, 211, 195, 110, 201, 66, 110, 103, 171, 68, 35, 15, 181, 2, 187, 237, 140, 60, 180, 12, 156, 114, 61, 138, 208, 50, 112, 210, 233, 200, 67, 205, 164, 41, 37, 35, 15, 53, 66, 166, 20, 143, 60, 118, 117, 219, 148, 189, 242, 152, 34, 101, 92, 201, 202, 147, 247, 148, 11, 57, 171, 200, 198, 83, 207, 173, 140, 34, 105, 15, 219, 176, 82, 138, 102, 53, 77, 69, 74, 27, 135, 53, 23, 87, 203, 173, 42, 78, 85, 62, 100, 181, 42, 106, 119, 95, 183, 149, 170, 168, 194, 173, 70, 150, 171, 186, 157, 112, 85, 59, 4, 48, 218, 133, 0, 49, 152, 142, 58, 159, 136, 72, 79, 218, 234, 178, 218, 37, 220, 77, 201, 75, 74, 67, 77, 219, 43, 79, 217, 67, 55, 36, 159, 60, 23, 75, 187, 176, 125, 242, 92, 60, 237, 194, 246, 201, 115, 140, 146, 11, 59, 39, 207, 49, 74, 54, 236, 156, 60, 167, 72, 217, 176, 115, 242, 28, 162, 100, 211, 206, 201, 115, 136, 210, 117, 219, 163, 200, 209, 34, 42, 36, 135, 162, 154, 48, 243, 176, 24, 242, 30, 219, 173, 50, 77, 154, 134, 203, 240, 172, 36, 161, 28, 41, 195, 58, 147, 166, 114, 180, 114, 237, 76, 147, 146, 102, 85, 188, 66, 206, 168, 154, 162, 136, 243, 216, 163, 234, 130, 170, 206, 109, 143, 170, 113, 170, 62, 183, 60, 170, 46, 168, 250, 44, 116, 171, 26, 163, 233, 81, 203, 163, 234, 130, 170, 214, 44, 183, 106, 72, 140, 90, 141, 92, 170, 33, 200, 188, 197, 113, 168, 166, 213, 136, 114, 87, 174, 26, 198, 220, 221, 109, 11, 160, 27, 9, 1, 52, 35, 161, 128, 225, 85, 13, 48, 173, 171, 2, 134, 55, 51, 192, 116, 166, 6, 24, 206, 212, 0, 211, 154, 25, 96, 120, 83, 7, 76, 239, 106, 128, 105, 221, 12, 176, 188, 171, 1, 102, 116, 85, 192, 8, 38, 2, 232, 198, 156, 0, 133, 107, 16, 32, 75, 115, 6, 52, 43, 62, 220, 170, 45, 162, 216, 206, 114, 179, 209, 202, 164, 56, 195, 205, 82, 178, 10, 147, 38, 47, 49, 174, 44, 183, 53, 252, 174, 52, 36, 56, 105, 243, 134, 66, 247, 99, 103, 195, 237, 130, 60, 87, 226, 12, 183, 9, 202, 26, 141, 211, 220, 38, 176, 102, 164, 78, 115, 187, 196, 236, 147, 56, 205, 29, 6, 61, 207, 226, 52, 175, 75, 204, 26, 77, 93, 188, 174, 48, 115, 220, 113, 242, 187, 37, 145, 206, 56, 41, 24, 165, 146, 85, 101, 17, 160, 105, 85, 2, 52, 173, 70, 128, 170, 196, 8, 208, 130, 43, 1, 154, 81, 101, 64, 117, 98, 197, 43, 198, 76, 166, 164, 20, 191, 40, 115, 153, 148, 92, 252, 170, 204, 121, 66, 73, 243, 171, 117, 163, 14, 203, 201, 47, 210, 67, 58, 100, 39, 191, 72, 15, 206, 180, 153, 252, 172, 211, 184, 194, 118, 242, 178, 200, 144, 8, 219, 201, 75, 42, 93, 58, 108, 37, 47, 217, 84, 153, 144, 83, 188, 108, 67, 233, 220, 118, 241, 146, 118, 151, 113, 69, 201, 207, 202, 204, 194, 229, 134, 160, 75, 83, 177, 176, 93, 202, 170, 76, 165, 197, 206, 42, 179, 50, 243, 215, 216, 39, 171, 86, 180, 158, 107, 159, 52, 43, 141, 94, 142, 116, 146, 172, 52, 122, 40, 204, 74, 138, 86, 139, 39, 171, 41, 73, 212, 34, 38, 100, 187, 180, 41, 149, 244, 80, 74, 0, 47, 35, 8, 16, 76, 4, 1, 130, 117, 119, 93, 87, 233, 22, 110, 199, 117, 93, 133, 187, 185, 99, 151, 141, 224, 230, 230, 142, 151, 157, 210, 38, 175, 55, 58, 73, 236, 23, 178, 86, 233, 36, 177, 95, 74, 73, 225, 149, 132, 55, 170, 161, 65, 87, 18, 246, 168, 132, 6, 91, 73, 88, 165, 98, 26, 108, 37, 97, 132, 139, 132, 221, 149, 132, 106, 73, 110, 118, 87, 226, 147, 37, 155, 171, 25, 137, 247, 90, 28, 230, 102, 36, 206, 104, 89, 84, 186, 145, 56, 45, 163, 89, 110, 71, 106, 172, 150, 85, 102, 109, 137, 244, 150, 30, 217, 118, 36, 198, 90, 122, 70, 187, 149, 248, 104, 158, 46, 209, 78, 18, 189, 71, 22, 197, 57, 73, 210, 81, 217, 16, 247, 36, 89, 106, 215, 128, 211, 147, 36, 105, 83, 69, 86, 78, 90, 164, 76, 55, 71, 58, 89, 211, 156, 213, 108, 229, 228, 61, 112, 86, 139, 149, 147, 54, 171, 21, 45, 86, 78, 82, 172, 117, 148, 68, 57, 73, 74, 57, 213, 44, 231, 36, 41, 231, 102, 115, 236, 147, 196, 220, 227, 165, 177, 79, 18, 107, 143, 151, 212, 62, 73, 236, 213, 81, 26, 251, 36, 113, 118, 71, 115, 236, 147, 132, 221, 173, 77, 74, 87, 18, 86, 149, 22, 171, 45, 89, 54, 225, 238, 106, 73, 0, 69, 121, 10, 160, 88, 47, 5, 84, 159, 33, 128, 106, 204, 21, 16, 172, 103, 201, 253, 76, 209, 42, 219, 45, 243, 75, 53, 199, 157, 172, 204, 215, 12, 27, 117, 178, 242, 16, 163, 162, 201, 237, 202, 147, 141, 206, 1, 183, 39, 79, 38, 39, 10, 147, 174, 60, 169, 216, 8, 106, 122, 242, 34, 180, 123, 56, 238, 202, 171, 228, 238, 230, 200, 165, 156, 134, 60, 155, 108, 135, 188, 107, 207, 204, 176, 197, 128, 34, 189, 21, 208, 148, 150, 2, 134, 22, 55, 192, 48, 234, 6, 24, 206, 212, 0, 221, 170, 41, 160, 59, 81, 1, 84, 109, 65, 128, 108, 34, 8, 16, 181, 59, 1, 146, 176, 56, 125, 119, 154, 53, 26, 229, 52, 221, 106, 245, 106, 156, 83, 23, 29, 221, 195, 118, 78, 221, 180, 69, 173, 70, 57, 85, 177, 150, 221, 18, 251, 84, 197, 89, 246, 104, 212, 83, 23, 23, 217, 35, 225, 78, 157, 157, 215, 20, 71, 61, 117, 118, 214, 147, 26, 118, 213, 201, 122, 77, 170, 233, 86, 71, 193, 89, 237, 86, 74, 237, 185, 86, 135, 218, 41, 181, 19, 86, 227, 234, 56, 213, 158, 133, 87, 133, 229, 84, 103, 161, 234, 238, 78, 90, 221, 181, 169, 164, 91, 110, 117, 213, 236, 54, 169, 184, 121, 85, 177, 219, 164, 227, 226, 53, 205, 170, 99, 138, 147, 215, 141, 136, 116, 40, 73, 254, 8, 42, 236, 41, 41, 4, 61, 153, 168, 133, 205, 16, 143, 216, 41, 98, 177, 93, 56, 124, 122, 166, 39, 33, 64, 211, 234, 4, 104, 202, 141, 0, 137, 171, 24, 111, 185, 200, 140, 116, 236, 188, 97, 43, 51, 194, 137, 243, 134, 171, 44, 115, 199, 38, 24, 174, 60, 61, 18, 167, 56, 166, 13, 225, 176, 157, 226, 88, 198, 133, 220, 113, 138, 99, 30, 99, 141, 196, 41, 137, 113, 77, 56, 18, 167, 36, 165, 53, 35, 115, 147, 146, 84, 54, 152, 61, 113, 74, 82, 94, 23, 242, 196, 41, 78, 97, 76, 37, 108, 135, 56, 250, 81, 213, 136, 149, 226, 20, 210, 85, 50, 86, 138, 147, 47, 51, 173, 80, 41, 76, 217, 197, 34, 77, 151, 32, 103, 115, 137, 150, 220, 220, 146, 197, 45, 203, 202, 170, 75, 150, 212, 13, 89, 167, 46, 89, 202, 206, 164, 156, 178, 100, 237, 88, 78, 114, 242, 156, 109, 124, 52, 238, 201, 114, 178, 246, 213, 184, 39, 205, 193, 59, 206, 226, 156, 36, 251, 152, 56, 141, 125, 146, 236, 98, 243, 200, 210, 73, 138, 181, 173, 1, 55, 39, 41, 90, 39, 27, 221, 157, 36, 137, 216, 42, 74, 122, 146, 46, 121, 102, 36, 238, 8, 186, 164, 238, 209, 58, 33, 42, 58, 171, 34, 105, 135, 36, 155, 234, 238, 180, 212, 146, 93, 69, 125, 57, 246, 73, 150, 71, 205, 145, 40, 43, 105, 140, 58, 67, 226, 174, 164, 115, 204, 42, 78, 178, 146, 33, 48, 114, 40, 201, 74, 186, 160, 168, 198, 198, 43, 25, 10, 61, 23, 106, 175, 100, 104, 180, 92, 152, 178, 146, 174, 48, 170, 161, 206, 74, 26, 163, 202, 194, 42, 43, 41, 76, 219, 139, 162, 142, 164, 114, 9, 93, 181, 82, 242, 194, 213, 165, 205, 118, 41, 43, 87, 55, 15, 219, 165, 172, 66, 131, 219, 29, 173, 162, 24, 53, 91, 179, 125, 242, 108, 212, 115, 36, 114, 203, 189, 178, 204, 50, 179, 35, 175, 156, 34, 218, 99, 151, 162, 58, 19, 191, 12, 229, 202, 174, 220, 52, 66, 142, 1, 74, 183, 72, 64, 26, 90, 103, 204, 61, 202, 206, 226, 158, 52, 119, 79, 59, 75, 122, 210, 92, 61, 237, 204, 217, 73, 114, 137, 178, 55, 183, 39, 73, 37, 202, 223, 156, 156, 36, 213, 232, 124, 177, 125, 226, 216, 163, 235, 216, 242, 137, 227, 204, 206, 102, 185, 39, 142, 163, 218, 27, 227, 158, 56, 246, 110, 41, 142, 114, 226, 216, 186, 165, 57, 246, 137, 99, 171, 146, 226, 56, 39, 142, 165, 90, 74, 162, 158, 56, 230, 108, 41, 137, 115, 226, 20, 188, 181, 37, 201, 137, 147, 183, 182, 225, 196, 39, 206, 78, 199, 150, 19, 159, 56, 89, 29, 31, 78, 56, 226, 164, 165, 173, 88, 77, 201, 164, 45, 119, 11, 55, 169, 8, 50, 194, 213, 29, 7, 160, 17, 46, 7, 4, 18, 51, 146, 198, 176, 166, 40, 217, 72, 50, 163, 201, 228, 116, 35, 46, 140, 58, 143, 189, 182, 56, 115, 234, 88, 74, 61, 146, 196, 165, 124, 204, 201, 72, 162, 214, 200, 22, 167, 37, 53, 54, 60, 202, 29, 151, 44, 5, 161, 232, 140, 157, 138, 100, 141, 213, 43, 117, 170, 91, 78, 22, 245, 196, 169, 237, 201, 68, 195, 45, 165, 110, 116, 51, 47, 119, 156, 186, 149, 68, 189, 194, 118, 200, 150, 23, 143, 50, 91, 169, 238, 156, 60, 83, 226, 180, 186, 11, 204, 30, 137, 220, 234, 46, 49, 119, 85, 114, 171, 134, 129, 220, 149, 72, 165, 26, 26, 106, 91, 76, 149, 170, 75, 200, 29, 177, 148, 170, 198, 48, 123, 44, 98, 170, 186, 192, 168, 209, 152, 169, 234, 28, 179, 83, 19, 134, 178, 82, 202, 42, 151, 25, 138, 202, 216, 167, 194, 49, 1, 188, 9, 39, 0, 211, 206, 4, 48, 74, 205, 1, 133, 105, 141, 172, 74, 241, 126, 182, 210, 242, 44, 165, 230, 80, 206, 200, 147, 180, 158, 1, 57, 35, 143, 42, 166, 10, 237, 172, 60, 201, 232, 28, 150, 59, 242, 164, 60, 243, 72, 238, 200, 179, 86, 171, 39, 185, 45, 47, 220, 220, 158, 173, 148, 178, 80, 113, 237, 136, 146, 170, 162, 148, 181, 210, 113, 170, 138, 52, 49, 51, 219, 169, 170, 204, 84, 44, 98, 143, 170, 105, 115, 113, 179, 221, 202, 164, 220, 57, 34, 118, 43, 131, 42, 211, 112, 199, 165, 8, 54, 85, 210, 147, 140, 52, 186, 48, 73, 175, 188, 18, 159, 211, 252, 68, 206, 74, 66, 74, 179, 51, 41, 35, 13, 217, 53, 222, 164, 148, 212, 71, 151, 92, 151, 228, 242, 194, 197, 61, 61, 141, 203, 155, 73, 55, 55, 199, 38, 107, 42, 172, 194, 211, 154, 180, 235, 240, 8, 139, 237, 210, 166, 34, 76, 60, 177, 75, 155, 141, 8, 119, 39, 4, 136, 90, 210, 0, 61, 105, 38, 160, 42, 202, 19, 15, 77, 25, 203, 145, 79, 220, 5, 79, 46, 91, 62, 113, 147, 210, 181, 236, 228, 196, 77, 115, 229, 146, 147, 19, 55, 197, 149, 141, 110, 78, 220, 36, 87, 52, 186, 89, 113, 18, 218, 22, 212, 170, 37, 210, 71, 73, 116, 227, 146, 112, 95, 45, 217, 141, 75, 34, 92, 166, 102, 173, 46, 73, 20, 86, 226, 222, 36, 36, 149, 170, 133, 167, 147, 16, 55, 225, 146, 225, 78, 92, 60, 180, 137, 123, 184, 22, 64, 182, 86, 9, 40, 94, 107, 213, 205, 121, 73, 155, 157, 85, 183, 224, 33, 163, 182, 87, 93, 162, 185, 143, 218, 26, 117, 142, 30, 177, 38, 121, 84, 57, 134, 251, 153, 228, 81, 165, 24, 30, 99, 146, 91, 21, 93, 186, 183, 217, 74, 85, 82, 174, 238, 105, 59, 84, 77, 153, 165, 187, 108, 151, 118, 19, 30, 30, 142, 93, 61, 76, 89, 184, 165, 54, 77, 83, 233, 17, 230, 216, 117, 205, 132, 165, 155, 156, 54, 182, 16, 97, 233, 177, 91, 150, 189, 138, 78, 196, 106, 121, 246, 46, 244, 46, 179, 100, 33, 132, 200, 186, 170, 146, 153, 80, 170, 25, 142, 82, 102, 92, 59, 123, 164, 74, 185, 49, 29, 166, 238, 36, 229, 70, 86, 186, 185, 155, 148, 27, 221, 174, 150, 78, 82, 106, 98, 138, 102, 39, 110, 73, 48, 110, 124, 110, 123, 37, 73, 88, 218, 178, 157, 149, 20, 97, 229, 203, 86, 86, 82, 164, 100, 45, 58, 89, 73, 81, 226, 189, 232, 116, 36, 145, 123, 102, 82, 146, 146, 114, 147, 83, 153, 78, 75, 202, 108, 246, 100, 57, 45, 41, 179, 57, 21, 153, 180, 164, 212, 231, 100, 102, 210, 146, 146, 208, 221, 94, 110, 83, 74, 93, 87, 103, 38, 57, 241, 16, 234, 210, 110, 229, 68, 73, 229, 232, 153, 162, 19, 71, 151, 101, 199, 73, 78, 28, 99, 166, 174, 218, 61, 113, 42, 17, 118, 106, 247, 196, 169, 153, 199, 177, 179, 19, 199, 154, 110, 71, 110, 87, 28, 74, 153, 174, 56, 109, 105, 136, 33, 210, 38, 39, 36, 201, 76, 90, 100, 156, 20, 119, 235, 145, 30, 141, 75, 220, 66, 100, 120, 198, 54, 64, 245, 17, 14, 104, 49, 220, 1, 45, 186, 57, 160, 69, 19, 7, 140, 224, 234, 128, 17, 194, 28, 208, 131, 153, 3, 134, 55, 53, 64, 15, 234, 2, 168, 214, 194, 197, 93, 103, 132, 103, 226, 16, 15, 239, 158, 105, 105, 71, 90, 141, 117, 182, 216, 62, 69, 181, 214, 181, 22, 247, 212, 197, 68, 231, 74, 212, 83, 23, 103, 147, 45, 86, 79, 93, 116, 116, 12, 71, 57, 117, 81, 209, 222, 106, 249, 212, 217, 100, 198, 176, 157, 81, 103, 237, 30, 37, 86, 74, 93, 67, 118, 185, 75, 18, 64, 14, 153, 12, 72, 58, 92, 1, 197, 103, 40, 160, 251, 112, 1, 180, 104, 110, 0, 167, 35, 78, 154, 131, 137, 157, 69, 62, 73, 137, 166, 254, 26, 249, 36, 37, 132, 249, 147, 153, 147, 100, 91, 105, 135, 102, 78, 156, 93, 165, 15, 5, 61, 113, 10, 153, 17, 18, 244, 196, 41, 122, 171, 134, 177, 19, 71, 111, 205, 86, 82, 87, 28, 140, 148, 68, 54, 89, 137, 179, 86, 82, 153, 118, 36, 206, 90, 81, 87, 155, 150, 40, 231, 197, 221, 173, 75, 202, 93, 166, 123, 39, 77, 73, 146, 234, 26, 145, 120, 197, 209, 101, 203, 152, 236, 19, 199, 88, 197, 199, 105, 78, 146, 98, 183, 172, 40, 61, 113, 74, 213, 190, 172, 236, 196, 41, 101, 197, 49, 189, 19, 167, 156, 149, 203, 204, 78, 156, 74, 86, 44, 42, 59, 113, 172, 85, 209, 44, 239, 196, 177, 84, 249, 146, 178, 19, 199, 220, 109, 77, 246, 78, 156, 98, 143, 14, 57, 61, 113, 140, 221, 82, 156, 244, 196, 201, 212, 72, 113, 146, 19, 39, 157, 99, 205, 73, 78, 18, 77, 78, 21, 197, 41, 73, 210, 226, 145, 172, 102, 37, 205, 144, 213, 129, 147, 149, 84, 46, 149, 139, 86, 86, 82, 153, 116, 14, 196, 89, 73, 99, 84, 53, 16, 103, 37, 149, 83, 117, 163, 157, 145, 52, 70, 85, 13, 241, 86, 82, 41, 87, 13, 217, 93, 73, 101, 92, 217, 24, 119, 36, 141, 83, 230, 82, 236, 150, 181, 64, 102, 97, 142, 67, 210, 141, 107, 103, 56, 114, 113, 85, 149, 89, 110, 203, 197, 77, 71, 86, 133, 233, 0, 212, 198, 109, 128, 90, 56, 70, 218, 131, 7, 166, 58, 89, 73, 118, 30, 50, 102, 249, 36, 57, 106, 216, 177, 212, 147, 228, 232, 233, 71, 82, 79, 146, 179, 102, 13, 73, 93, 73, 42, 146, 149, 40, 119, 37, 41, 107, 86, 146, 212, 149, 196, 20, 30, 133, 86, 79, 18, 83, 186, 21, 89, 89, 73, 76, 30, 158, 98, 102, 36, 193, 89, 106, 132, 212, 146, 90, 173, 225, 59, 137, 83, 166, 141, 166, 205, 53, 42, 185, 147, 210, 158, 211, 104, 228, 73, 106, 122, 177, 156, 145, 23, 33, 229, 137, 78, 91, 158, 25, 119, 20, 185, 99, 0, 56, 51, 4, 0, 127, 146, 1, 224, 77, 49, 128, 217, 62, 3, 84, 78, 29, 128, 200, 109, 18, 224, 101, 76, 0, 164, 175, 9, 128, 12, 53, 1, 80, 177, 58, 0, 42, 86, 7, 64, 249, 234, 0, 200, 88, 229, 0, 158, 58, 29, 192, 83, 135, 1, 88, 233, 48, 0, 203, 29, 10, 32, 61, 83, 0, 104, 102, 17, 0, 252, 46, 2, 128, 159, 45, 0, 248, 186, 9, 0, 127, 21, 1, 224, 175, 18, 0, 124, 221, 12, 128, 175, 135, 1, 240, 213, 48, 0, 188, 110, 1, 192, 209, 205, 0, 238, 162, 8, 144, 180, 26, 1, 130, 84, 37, 128, 151, 170, 4, 240, 42, 130, 0, 94, 187, 19, 128, 235, 48, 2, 48, 169, 74, 128, 172, 204, 8, 224, 185, 59, 1, 0, 19, 37, 0, 22, 97, 4, 112, 50, 140, 0, 78, 134, 1, 1, 140, 178, 32, 128, 176, 102, 4, 208, 198, 28, 8, 64, 85, 24, 1, 0, 51, 37, 128, 81, 102, 4, 32, 76, 157, 0, 130, 187, 3, 1, 128, 14, 35, 128, 86, 98, 4, 0, 90, 13, 8, 32, 85, 24, 1, 188, 80, 35, 0, 224, 226, 64, 0, 35, 204, 8, 224, 120, 40, 0, 1, 132, 80, 33, 0, 144, 166, 0, 4, 96, 140, 29, 0, 8, 96, 132, 27, 1, 128, 18, 5, 32, 0, 166, 105, 0, 64, 0, 160, 84, 0, 128, 0, 0, 91, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 60, 0 };

@stavanhimal
Copy link

which function is being used for print binary numbers before frame? I got an output of Frames and RomSize. But, not getting the binary series before Frames:.

@ptwz
Copy link

ptwz commented Oct 8, 2017

Hi there, just a shameless plug: To create bitstreams you can either use BlueWizard (https://github.com/patrick99e99/BlueWizard) or my command line port Python Wizard (https://github.com/ptwz/python_wizard).
They both import wave files and give you Talkie compatible bitstreams.

@Dave67
Copy link

Dave67 commented Feb 22, 2018

@ptwz:
Hi Peter.
Many thanks for writing Python Wizard and kindly making it available - it sounds just what I need to use Python to convert custom .wav files into byte streams for playback on Arduino with Talkie.

I've successfully compiled and installed Python Wizard on my laptop running Ubuntu Xenial and Spyder 2.7 and have tried to encode a wav file through the command line interface using default settings with no additional options; however I get the following error message relating to the command:
assert(max(d2) <= 1) in line 32 of Buffer.py:

"ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()"

I think the assert(max(array)) function may be deprecated in more recent releases of Python/NumPy and wonder if this is what is causing the problem; and if there is a workaround.
(I get a similar error when I try to run GUI version of PythonWizard; the GUI window opens and allows me to select my wav file but will not parse it and also repeatedly outputs "Hi!" in the output window.)

I'm very keen to get PythonWizard working and would be very grateful for your expertise and help

Full error message attached below.
Many thanks in anticipation

Dave
(UK)

pythonwizard_error_dump.txt

@ptwz
Copy link

ptwz commented Feb 25, 2018

@Dave67
Hi Dave,
actually I never tested stereo audio files, which you seem to have done for my now ;). These have two dimensions, which made the python "max" function fail. I rewrote the respective parts in the cleanup branch, see my commit ef8d7ac in pywizard.
The GUI says Hi! in order for me to see if all the threads are still alive, it's not a bug, it's debugging aid ;).

Hope I could help,
Peter

@Dave67
Copy link

Dave67 commented Feb 26, 2018

Many thanks for your help and for spotting the stereo file!

I'm currently using the default settings on python_wizard.

Do you have any tips for how to set the option parameters to values which will:
a) optimise small file size whilst maintaining intelligibility of speech; and
b) help avoid clicks and high frequency artefacts?

it's not a bug, it's debugging aid ;).
... or as Apple say: "It's not a bug, it's a feature !!" ;-)

Best wishes

Dave

const unsigned char [] PROGMEM = {0x88,0xCE,0xAA,0xB4,0xAC,0x1C,0x12,0xA6,0x59,0x89,0xE2,0x8C,0x49,0xD8,0xAA,0xC2,0xD2,0xC2,0x16,0x23,0x86,0x09,0x49,0xB5,0xD8,0x02,0x98,0x3A,0x54,0x5C,0x53,0x1B,0x1B,0x87,0x23,0xF1,0x0C,0x2E,0xEC,0xE2,0xB2,0x94,0xD5,0x28,0xB3,0xB2,0x3B,0x2E,0xC0,0x54,0x2E,0x27,0xAB,0xDA,0x62,0x34,0x6A,0x9F,0xAC,0x39,0x73,0xF3,0xAA,0xBC,0xB2,0x16,0xC4,0x24,0x3B,0x4A,0x49,0xB3,0x92,0x4C,0x4D,0x26,0x21,0x0D,0x9A,0x2B,0xB5,0x18,0x9B,0x2C,0x28,0xC9,0x92,0x94,0x2D,0xC4,0xA4,0x5D,0xCB,0xD2,0x76,0x03,0xCE,0xE9,0x48,0xC0,0x19,0xC1,0x09,0x38,0x7B,0x2C,0x01,0xFB,0x8D,0x97,0x77,0x78,0x26,0xA9,0x9A,0x35,0xDA,0x9E,0x98,0xB4,0xF2,0xF6,0xE8,0x7B,0x26,0xD4,0x8A,0x47,0x6D,0xA8,0x9E,0xD8,0xCB,0x1F,0xA7,0x21,0x29,0xD1,0x6C,0x5B,0xA4,0x9A,0xA4,0x58,0xAA,0xB4,0x11,0x1B,0x8B,0x16,0xCA,0xF0,0x94,0xA4,0xAC,0xCA,0x71,0xCC,0x5D,0x86,0xB6,0xEB,0x32,0xF5,0x70,0x92,0xFC,0x9E,0x43,0x58,0x35,0x4E,0x58,0x46,0x14,0x22,0xAB,0x5A,0xA5,0x1F,0x8A,0x58,0x7A,0x2A,0x95,0x71,0x48,0x66,0x9E,0xA9,0x94,0xA6,0xCE,0x59,0x74,0xD7,0x92,0x99,0x0A,0x11,0xED,0x19,0xCA,0xCC,0xCF,0x20,0xBC,0x3C,0x59,0x3B,0x60,0xC6,0xB4,0x04,0x5C,0x13,0x16,0x80,0xEF,0xD6,0x12,0xF0,0x65,0x71,0x9B,0xB3,0x91,0x4A,0xDB,0x58,0x63,0x29,0x46,0x2A,0x6D,0x1A,0xB5,0x25,0x1B,0xC9,0xF0,0xAE,0x15,0xD6,0x14,0x34,0x3C,0xD6,0x94,0xC9,0x4A,0x70,0x57,0x5B,0xDB,0x2A,0x2B,0x3E,0x5C,0x72,0xEC,0x08,0xB6,0xF8,0x50,0xF5,0x56,0x4D,0xD8,0x1A,0x4A,0xCC,0x52,0xF5,0x03};

@ghost
Copy link

ghost commented Jun 13, 2018

@ptwz how can we input our wav file in the python wizard

@ptwz
Copy link

ptwz commented Jun 13, 2018

When using using the command line and you want to convert the file called MYFILE.wav, use:
python_wizard -f arduino MYFILE.wav > MYFILE.h

@ghost
Copy link

ghost commented Jun 15, 2018

Ok ... Thanks

@ghost
Copy link

ghost commented Jun 15, 2018

@ptwz sorry for disturbing but the command is still not working ... could you please guide me through it .. I opened the command line and entered the given command but it did not work ... any help would be highly appreciated 😃

@JohnsonBD
Copy link

@ptwz
Hi Pete,

First of all thank you for writing the python code for the conversion of wav files into the bit stream that would be used for the Talkie TTS library. Unfortunately I met some error while running it.

Here are the things I did before running it. Installed the following:
1.) Python Version 3.7.0
2.) NumPy using the file numpy-1.15.1+mkl-cp37-cp37m-win32.whl
3.) SciPy using the file scipy-1.1.0-cp37-cp37m-win32.whl
4.) created a wav file using Octave function "record". By default the record function records at 8kHz sampling rate.

I tried using your python code by using the line below on the windos 10 command line python_wizard -f arduino testing.wav > testing.h

where testing.wav is my wav file and testing.h is the file that will contain the bitstreams (I think :) ).

I got an error message it is of the form

File "python_wizard", line 64
print vars(args)
^
SyntaxError: invalid syntax

Is there something wrong that I did or maybe it is a line in the python code that is no longer compatible with the current version?

Best Regards and Thank You :)

Johnson

@ptwz
Copy link

ptwz commented Sep 8, 2018

Hi Johnson,
you used python3.7 which was not supported as of last release. I forward ported the relevant parts, it should work now with python >= 3.5

Best regards,
Peter

@deladriere
Copy link

@heartlesspra use Audacity or SoX

@DaliaShoeb
Copy link

hello, i downloaded python 3.7 and used the command mentioned (python_wizard -f arduino MYFILE.wav > MYFILE.h) but it keeps telling me syntax error, so can you please tell me specific steps to follow?

@ptwz
Copy link

ptwz commented Mar 17, 2019

Well, please give me some more insight to help you out:

  1. Which platform/OS do you use
  2. How did you install python, as pywizard needs some libraries that are sometimes not bundled
  3. Please provide the message you get exactly.

@DaliaShoeb
Copy link

DaliaShoeb commented Mar 18, 2019

Okay thank you for your help.
1-I'm using windows 10
2-I installed python 3.7 from this https://www.python.org/downloads/
3- I used this command (python_wizard -f arduino StarWars3.wav > StarWars3.h)
and this is what i get (File "", line 1
python_wizard -f arduino StarWars3.wav > StarWars3.h
^
SyntaxError: invalid syntax)
and maybe you can tell me where to place the file i want to convert also

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests