Previously, I had described here: how to do compress sound using a venerable Windows 3.1 tool: Qbox Pro. The process what quite long to set up and does not always produce good results.
Today I discovered BlueWizard from this post.
BlueWizard runs on Mac and allows to tweak the process in real time to optimize the output! The author has been kind enough to make some small tweaking just for the Arduino and Talko!
Simply open your file (which has to be recorded at 8 kHz with 16-bit depth ), click on the 2 tick boxes:
– “include hex prefix (0x)” to allow direct pasting into the Arduino IDE
(if you are using it for Emy’s SD card do not tick this box)
- and “include explicit stop frame” to avoid the library producing gibberish noise a the end of the sound
then copy the resulting the data from the “Byte Stream” windows.
Open the Arduino IDE and paste the data stream into your code before uploading it to Talko.
Let’s make a sound and process it:
say -v"alex" "We are charging our battery. And now we are full of energy. We are the robots." -r 100 -o roboter.wave
converting to 8 kHz with 16-bit depth using SoX
sox roboter.wave -r 8k -b16 roboter.wav
and the compressed version made with Talko :
the Arduino code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
// Talkie Adafruit library // Copyright 2011 Peter Knight // This code is released under GPLv2 license. #include "talkie.h" Talkie voice; const uint8_t spROBOTS[] ={0xa6,0xd6,0x4a,0x67,0xd8,0xed,0xa8,0x9a,0x35,0x37,0xd5,0x8a,0x1c,0x72,0xbf,0x84,0xcd,0x2a,0x4a,0xca,0x42,0x50,0x77,0xed,0x6a,0x25,0xcb,0x1a,0xb3,0xa3,0xa3,0xa4,0x34,0x4b,0xb2,0xe9,0x0c,0x9b,0xd2,0xc4,0xd9,0xa7,0xca,0x6c,0x49,0x8a,0x26,0x9d,0xaa,0x28,0x2d,0xc9,0x96,0xad,0xbc,0xaa,0xb6,0x24,0x47,0xb5,0xd0,0x1c,0xd3,0x92,0x9c,0xcd,0x43,0x7c,0x68,0x4b,0x72,0xd6,0x2c,0xf6,0xa2,0x25,0xcd,0x9d,0xb3,0x4d,0xc6,0xa4,0xb4,0x4c,0x8a,0x32,0x19,0x9d,0x92,0xb2,0xc8,0xd2,0x79,0x92,0x89,0xeb,0x14,0x36,0xd3,0x26,0x04,0xd8,0x79,0x2c,0x01,0xbb,0x5e,0xb6,0x68,0x8e,0xed,0x2e,0x8b,0xdd,0xea,0x51,0xd3,0xd3,0x35,0x4e,0xcb,0x73,0x74,0xf3,0xd4,0x38,0xa3,0x4c,0xd9,0xdd,0xc3,0xed,0x96,0x2a,0x76,0xb5,0x36,0x5d,0x9c,0xaa,0x38,0x4c,0xc7,0x75,0x52,0xaa,0xc3,0x14,0x5b,0xb3,0x51,0xa1,0x0e,0xdd,0x64,0x92,0x4f,0x86,0x3a,0x54,0x89,0x31,0x99,0x98,0xea,0x58,0x38,0x27,0x64,0x42,0xa8,0x73,0x81,0x49,0x8b,0x91,0xa6,0x4e,0x19,0x36,0x22,0x4a,0x88,0x3a,0x25,0x98,0x0c,0x2b,0x69,0x9a,0xa4,0x49,0xbd,0xb2,0x56,0x69,0x46,0x55,0x66,0xd5,0xb6,0xa5,0x19,0x95,0xd8,0x2c,0xda,0xb4,0xa6,0x5a,0x52,0x8f,0xac,0x53,0x9a,0x62,0xd1,0xab,0x2a,0x72,0x68,0xb3,0xc1,0xd8,0xcc,0xd0,0xae,0x8b,0x8a,0xe2,0xd2,0x4c,0xb9,0x4e,0x1b,0xed,0x56,0xb7,0x62,0x3a,0x63,0xa4,0xdd,0xd3,0x4a,0xe8,0x8a,0xc1,0x95,0x52,0x45,0xa9,0x2d,0x16,0x47,0xcb,0x94,0xb4,0xa6,0x65,0x2a,0x8b,0x92,0xdb,0x9a,0x5a,0x25,0xd2,0x2a,0x6c,0xab,0x6b,0x93,0x32,0x6f,0xab,0xa3,0xce,0xd5,0x32,0x2d,0xeb,0xb4,0x3a,0x55,0xcb,0x32,0x7f,0x54,0xea,0xd8,0xac,0x5a,0xed,0x76,0xaa,0x63,0xb7,0x18,0x93,0xcb,0xa1,0x8e,0x43,0x7d,0x54,0xae,0x84,0x3a,0x0e,0x8e,0x15,0x99,0x93,0xea,0x58,0x38,0x43,0xbd,0x32,0xab,0x6d,0xe2,0x0c,0xd7,0x21,0xa4,0x8a,0x5a,0xc2,0xc3,0x62,0x95,0xac,0x24,0x71,0xf7,0xa8,0x55,0x8a,0xe4,0xb9,0xdd,0xcb,0x48,0x2b,0x72,0xb0,0x68,0xcb,0x30,0x23,0xcf,0x49,0xa3,0x3c,0x43,0xb7,0x34,0x17,0xad,0xb4,0x32,0xd3,0xd2,0xd2,0xa4,0xdd,0xdb,0x6c,0x4b,0x73,0x93,0xb6,0x28,0xa9,0x25,0xcd,0x4d,0xda,0x23,0xa5,0x96,0x3c,0x16,0x1b,0x8b,0xb0,0x9a,0xca,0x50,0xbc,0x2c,0xdd,0x6a,0xa8,0x93,0xd7,0x96,0xb2,0xb0,0xae,0x2d,0x51,0x92,0xd3,0x2b,0x87,0x3e,0x17,0x0e,0x6d,0x19,0xeb,0x86,0x34,0xb1,0x35,0xb4,0xaa,0x19,0xe2,0x80,0xd1,0xf4,0xaa,0x66,0x88,0x1d,0x46,0x23,0xa3,0xba,0x21,0x35,0x1c,0x89,0x8e,0x1a,0x86,0x92,0xa1,0x3c,0xb2,0x6c,0x18,0xb3,0x61,0xad,0xb1,0xd8,0x61,0x2c,0x86,0xa4,0x26,0xa2,0x84,0xa9,0x28,0xd2,0x9a,0x8c,0x1d,0xa6,0x66,0x88,0x63,0x2a,0x4e,0x98,0xba,0x61,0xf2,0x99,0xd0,0xee,0x1f,0x0a,0xc5,0x2b,0xad,0x88,0x7f,0x6a,0x50,0x6f,0xb5,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xee,0xad,0x49,0x32,0x2b,0xa3,0xb6,0xa2,0x46,0x75,0xcf,0x2c,0xdd,0x8a,0xe2,0x34,0x33,0xd2,0x4c,0x2b,0x8a,0x93,0xb2,0x0e,0x29,0xad,0x2c,0x5e,0xd2,0xab,0x24,0x97,0x32,0x3b,0x49,0xef,0xa4,0x6c,0x4a,0x69,0x74,0xad,0x8c,0x89,0xa9,0x84,0xd1,0xd3,0x66,0x47,0xa6,0x92,0x5a,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,0x61,0x61,0x96,0x34,0xc5,0xc9,0x54,0x44,0xa8,0xe3,0x54,0xf8,0x56,0xaa,0xee,0x4d,0x52,0xe9,0xcb,0x18,0x5b,0x2c,0x4a,0x65,0x08,0x93,0x2c,0xf6,0x28,0x94,0xbe,0x8e,0x52,0xe4,0xa4,0x50,0xfa,0xb0,0x41,0x16,0x97,0x5c,0x69,0xd2,0x39,0x5b,0x4e,0x09,0x65,0xf0,0x93,0x42,0x35,0x25,0x95,0x21,0xb4,0x99,0x76,0xb9,0x52,0x46,0x57,0x16,0xb2,0x61,0x5b,0x99,0x5c,0x9a,0x59,0x47,0x29,0x65,0x92,0x63,0x62,0x55,0xb6,0x54,0x99,0x8d,0xa9,0xc7,0x98,0x54,0x47,0x55,0xe6,0x16,0x93,0x5d,0x9b,0x65,0xa8,0xa9,0x57,0x71,0x6d,0xd2,0xec,0x69,0x56,0xba,0x35,0xc5,0xa9,0x85,0xe4,0xe8,0xd1,0x14,0x6f,0x9e,0x56,0xa3,0x46,0x53,0xbd,0x79,0x6a,0x97,0x2e,0x75,0x4e,0x12,0x19,0x2d,0x26,0xd4,0x29,0x70,0xf2,0x98,0xe5,0x50,0x25,0xcb,0xc5,0x6b,0xa1,0x53,0x9d,0x03,0xb5,0x96,0x06,0x0d,0x75,0x4e,0xd8,0x56,0x56,0xd4,0x35,0xb9,0x60,0x45,0xe8,0x50,0xd7,0xe6,0x0a,0x99,0xa5,0x47,0x5c,0x57,0x2a,0x78,0x94,0xce,0x12,0x43,0x0a,0x50,0x5e,0x51,0x29,0x8c,0xa3,0xa6,0x10,0x6a,0xb2,0x04,0xcc,0xd1,0x5e,0x86,0x99,0x94,0x59,0xbd,0x53,0x1a,0xab,0x61,0xf1,0xea,0x44,0x69,0xcc,0x86,0x2c,0x36,0x23,0xa7,0x31,0x5b,0xd6,0xb8,0x88,0x55,0xc6,0xe6,0x58,0x64,0x72,0x4e,0x19,0xbb,0x67,0x91,0xca,0xc5,0x65,0x1c,0x81,0x45,0x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cc,0x6d,0xa8,0xfc,0xa4,0x8c,0xb0,0xd4,0xa5,0x0c,0x39,0x5d,0xc2,0x6a,0xb5,0x3c,0xa4,0x76,0x35,0x9f,0x53,0xb2,0x10,0x26,0x54,0xfd,0x61,0xc9,0x82,0xdb,0x54,0xd5,0x87,0x29,0xf7,0x71,0x43,0xc4,0x6f,0x86,0xc2,0x87,0x75,0x72,0x9f,0xa8,0x1a,0x95,0xdb,0xc4,0x7c,0x32,0x19,0x69,0x2a,0x13,0xf5,0x38,0xa9,0x0b,0xa1,0xd2,0x45,0xa7,0xa4,0x3e,0x94,0x56,0x77,0x1f,0x13,0xc6,0xd0,0x4b,0xc3,0xb3,0x4c,0x1a,0x63,0x1d,0x09,0x8f,0x32,0x65,0x4a,0xa9,0x23,0x38,0xcb,0xa6,0x39,0xa5,0xf6,0x10,0xaf,0x92,0xe6,0xd4,0x32,0x4c,0xdb,0x4a,0x59,0x52,0xce,0x48,0xe9,0xb0,0x69,0xc9,0xd9,0xcb,0x74,0xa4,0xb9,0x25,0x45,0x2d,0xf3,0x14,0xa3,0xd6,0x62,0xc3,0x5d,0xdd,0x34,0x59,0xba,0x74,0xcf,0x08,0x4b,0x08,0x58,0xa9,0xc3,0x30,0xc3,0x65,0x84,0x7b,0x1c,0x0,0x0,0x0,0xf0,0xff,0xff}; void setup() { } void loop() { voice.say(spROBOTS); } |