Talkie speech library

Status
Not open for further replies.

Robhilken

Member
Hi,

I am interested in using the Talkie speech library on my Teensy / Audio board and wondered if that's possible?

They state that it only works on 168 or 328 based Arduinos at 16MHz only, but I assume that's because less powerful chips would struggle.

https://github.com/going-digital/Talkie

Has anyone got it running on a Teensy? I'm a beginner so I would probably struggle with major changes if they were needed.

Thanks,

Rob
 
I must be doing something dumb because after downloading the library i tried to just compile the getting started sketch and I got royally yelled at:

Code:
C:\Program Files\Arduino\arduino-builder -dump-prefs -logger=machine -hardware "C:\Program Files\Arduino\hardware" -hardware "C:\Documents and Settings\Kris\Local Settings\Application Data\Arduino15\packages" -hardware "C:\Documents and Settings\Kris\My Documents\Arduino\hardware" -tools "C:\Program Files\Arduino\tools-builder" -tools "C:\Program Files\Arduino\hardware\tools\avr" -tools "C:\Documents and Settings\Kris\Local Settings\Application Data\Arduino15\packages" -built-in-libraries "C:\Program Files\Arduino\libraries" -libraries "C:\Documents and Settings\Kris\My Documents\Arduino\libraries" -fqbn=teensy:avr:teensy31:usb=serial,speed=72opt,keys=en-us -ide-version=10607 -build-path "C:\DOCUME~1\Kris\LOCALS~1\Temp\build9c49892fe50ec7c99a4e757df5c1e550.tmp" -warnings=all -prefs=build.warn_data_percentage=75 -verbose "C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\examples\_1_Getting_Started\_1_Getting_Started.ino"
C:\Program Files\Arduino\arduino-builder -compile -logger=machine -hardware "C:\Program Files\Arduino\hardware" -hardware "C:\Documents and Settings\Kris\Local Settings\Application Data\Arduino15\packages" -hardware "C:\Documents and Settings\Kris\My Documents\Arduino\hardware" -tools "C:\Program Files\Arduino\tools-builder" -tools "C:\Program Files\Arduino\hardware\tools\avr" -tools "C:\Documents and Settings\Kris\Local Settings\Application Data\Arduino15\packages" -built-in-libraries "C:\Program Files\Arduino\libraries" -libraries "C:\Documents and Settings\Kris\My Documents\Arduino\libraries" -fqbn=teensy:avr:teensy31:usb=serial,speed=72opt,keys=en-us -ide-version=10607 -build-path "C:\DOCUME~1\Kris\LOCALS~1\Temp\build9c49892fe50ec7c99a4e757df5c1e550.tmp" -warnings=all -prefs=build.warn_data_percentage=75 -verbose "C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\examples\_1_Getting_Started\_1_Getting_Started.ino"
"C:\Program Files\Arduino\hardware\tools\avr/../arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w  -g -Wall -ffunction-sections -fdata-sections -nostdlib -fno-exceptions -felide-constructors -std=gnu++0x -fno-rtti -mthumb -mcpu=cortex-m4 -fsingle-precision-constant -D__MK20DX256__ -DTEENSYDUINO=127 -DARDUINO=10607 -DF_CPU=72000000 -DARDUINO_ARCH_AVR -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\Program Files\Arduino\hardware\teensy\avr\cores\teensy3" "C:\DOCUME~1\Kris\LOCALS~1\Temp\build9c49892fe50ec7c99a4e757df5c1e550.tmp\sketch\_1_Getting_Started.ino.cpp" -o "nul"
"C:\Program Files\Arduino\hardware\tools\avr/../arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w  -g -Wall -ffunction-sections -fdata-sections -nostdlib -fno-exceptions -felide-constructors -std=gnu++0x -fno-rtti -mthumb -mcpu=cortex-m4 -fsingle-precision-constant -D__MK20DX256__ -DTEENSYDUINO=127 -DARDUINO=10607 -DF_CPU=72000000 -DARDUINO_ARCH_AVR -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\Program Files\Arduino\hardware\teensy\avr\cores\teensy3" "-IC:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie" "C:\DOCUME~1\Kris\LOCALS~1\Temp\build9c49892fe50ec7c99a4e757df5c1e550.tmp\sketch\_1_Getting_Started.ino.cpp" -o "nul"
"C:\Program Files\Arduino\hardware\tools\avr/../arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w  -g -Wall -ffunction-sections -fdata-sections -nostdlib -fno-exceptions -felide-constructors -std=gnu++0x -fno-rtti -mthumb -mcpu=cortex-m4 -fsingle-precision-constant -D__MK20DX256__ -DTEENSYDUINO=127 -DARDUINO=10607 -DF_CPU=72000000 -DARDUINO_ARCH_AVR -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\Program Files\Arduino\hardware\teensy\avr\cores\teensy3" "-IC:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie" "C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp" -o "nul"
"C:\Program Files\Arduino\hardware\tools\avr/../arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w  -g -Wall -ffunction-sections -fdata-sections -nostdlib -fno-exceptions -felide-constructors -std=gnu++0x -fno-rtti -mthumb -mcpu=cortex-m4 -fsingle-precision-constant -D__MK20DX256__ -DTEENSYDUINO=127 -DARDUINO=10607 -DF_CPU=72000000 -DARDUINO_ARCH_AVR -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\Program Files\Arduino\hardware\teensy\avr\cores\teensy3" "-IC:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie" "C:\DOCUME~1\Kris\LOCALS~1\Temp\build9c49892fe50ec7c99a4e757df5c1e550.tmp\sketch\_1_Getting_Started.ino.cpp" -o "nul"
"C:\Program Files\Arduino\hardware\tools\avr/../arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w  -g -Wall -ffunction-sections -fdata-sections -nostdlib -fno-exceptions -felide-constructors -std=gnu++0x -fno-rtti -mthumb -mcpu=cortex-m4 -fsingle-precision-constant -D__MK20DX256__ -DTEENSYDUINO=127 -DARDUINO=10607 -DF_CPU=72000000 -DARDUINO_ARCH_AVR -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\Program Files\Arduino\hardware\teensy\avr\cores\teensy3" "-IC:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie" "C:\DOCUME~1\Kris\LOCALS~1\Temp\build9c49892fe50ec7c99a4e757df5c1e550.tmp\sketch\_1_Getting_Started.ino.cpp" -o "C:\DOCUME~1\Kris\LOCALS~1\Temp\build9c49892fe50ec7c99a4e757df5c1e550.tmp\preproc\ctags_target_for_gcc_minus_e.cpp"
"C:\Program Files\Arduino\tools-builder\ctags\5.8-arduino5/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\DOCUME~1\Kris\LOCALS~1\Temp\build9c49892fe50ec7c99a4e757df5c1e550.tmp\preproc\ctags_target_for_gcc_minus_e.cpp"
"C:\Program Files\Arduino\hardware\tools\avr/../arm/bin/arm-none-eabi-g++" -c -O -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -fno-exceptions -felide-constructors -std=gnu++0x -fno-rtti -mthumb -mcpu=cortex-m4 -fsingle-precision-constant -D__MK20DX256__ -DTEENSYDUINO=127 -DARDUINO=10607 -DF_CPU=72000000 -DARDUINO_ARCH_AVR -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\Program Files\Arduino\hardware\teensy\avr\cores\teensy3" "-IC:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie" "C:\DOCUME~1\Kris\LOCALS~1\Temp\build9c49892fe50ec7c99a4e757df5c1e550.tmp\sketch\_1_Getting_Started.ino.cpp" -o "C:\DOCUME~1\Kris\LOCALS~1\Temp\build9c49892fe50ec7c99a4e757df5c1e550.tmp\sketch\_1_Getting_Started.ino.cpp.o"
"C:\Program Files\Arduino\hardware\tools\avr/../arm/bin/arm-none-eabi-g++" -c -O -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -fno-exceptions -felide-constructors -std=gnu++0x -fno-rtti -mthumb -mcpu=cortex-m4 -fsingle-precision-constant -D__MK20DX256__ -DTEENSYDUINO=127 -DARDUINO=10607 -DF_CPU=72000000 -DARDUINO_ARCH_AVR -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\Program Files\Arduino\hardware\teensy\avr\cores\teensy3" "-IC:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie" "C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp" -o "C:\DOCUME~1\Kris\LOCALS~1\Temp\build9c49892fe50ec7c99a4e757df5c1e550.tmp\libraries\Talkie\talkie.cpp.o"
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:22:251: warning: narrowing conversion of '33472' from 'int' to 'int16_t {aka short int}' inside { } [-Wnarrowing]
int16_t tmsK1[0x20]     = {0x82C0,0x8380,0x83C0,0x8440,0x84C0,0x8540,0x8600,0x8780,0x8880,0x8980,0x8AC0,0x8C00,0x8D40,0x8F00,0x90C0,0x92C0,0x9900,0xA140,0xAB80,0xB840,0xC740,0xD8C0,0xEBC0,0x0000,0x1440,0x2740,0x38C0,0x47C0,0x5480,0x5EC0,0x6700,0x6D40};
^
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:22:251: warning: narrowing conversion of '33664' from 'int' to 'int16_t {aka short int}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:22:251: warning: narrowing conversion of '33728' from 'int' to 'int16_t {aka short int}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:22:251: warning: narrowing conversion of '33856' from 'int' to 'int16_t {aka short int}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:22:251: warning: narrowing conversion of '33984' from 'int' to 'int16_t {aka short int}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:22:251: warning: narrowing conversion of '34112' from 'int' to 'int16_t {aka short int}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:22:251: warning: narrowing conversion of '34304' from 'int' to 'int16_t {aka short int}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:22:251: warning: narrowing conversion of '34688' from 'int' to 'int16_t {aka short int}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:22:251: warning: narrowing conversion of '34944' from 'int' to 'int16_t {aka short int}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:22:251: warning: narrowing conversion of '35200' from 'int' to 'int16_t {aka short int}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:22:251: warning: narrowing conversion of '35520' from 'int' to 'int16_t {aka short int}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:22:251: warning: narrowing conversion of '35840' from 'int' to 'int16_t {aka short int}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:22:251: warning: narrowing conversion of '36160' from 'int' to 'int16_t {aka short int}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:22:251: warning: narrowing conversion of '36608' from 'int' to 'int16_t {aka short int}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:22:251: warning: narrowing conversion of '37056' from 'int' to 'int16_t {aka short int}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:22:251: warning: narrowing conversion of '37568' from 'int' to 'int16_t {aka short int}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:22:251: warning: narrowing conversion of '39168' from 'int' to 'int16_t {aka short int}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:22:251: warning: narrowing conversion of '41280' from 'int' to 'int16_t {aka short int}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:22:251: warning: narrowing conversion of '43904' from 'int' to 'int16_t {aka short int}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:22:251: warning: narrowing conversion of '47168' from 'int' to 'int16_t {aka short int}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:22:251: warning: narrowing conversion of '51008' from 'int' to 'int16_t {aka short int}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:22:251: warning: narrowing conversion of '55488' from 'int' to 'int16_t {aka short int}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:22:251: warning: narrowing conversion of '60352' from 'int' to 'int16_t {aka short int}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:23:251: warning: narrowing conversion of '44544' from 'int' to 'int16_t {aka short int}' inside { } [-Wnarrowing]
int16_t tmsK2[0x20]     = {0xAE00,0xB480,0xBB80,0xC340,0xCB80,0xD440,0xDDC0,0xE780,0xF180,0xFBC0,0x0600,0x1040,0x1A40,0x2400,0x2D40,0x3600,0x3E40,0x45C0,0x4CC0,0x5300,0x5880,0x5DC0,0x6240,0x6640,0x69C0,0x6CC0,0x6F80,0x71C0,0x73C0,0x7580,0x7700,0x7E80};
^
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:23:251: warning: narrowing conversion of '46208' from 'int' to 'int16_t {aka short int}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:23:251: warning: narrowing conversion of '48000' from 'int' to 'int16_t {aka short int}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:23:251: warning: narrowing conversion of '49984' from 'int' to 'int16_t {aka short int}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:23:251: warning: narrowing conversion of '52096' from 'int' to 'int16_t {aka short int}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:23:251: warning: narrowing conversion of '54336' from 'int' to 'int16_t {aka short int}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:23:251: warning: narrowing conversion of '56768' from 'int' to 'int16_t {aka short int}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:23:251: warning: narrowing conversion of '59264' from 'int' to 'int16_t {aka short int}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:23:251: warning: narrowing conversion of '61824' from 'int' to 'int16_t {aka short int}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:23:251: warning: narrowing conversion of '64448' from 'int' to 'int16_t {aka short int}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:24:107: warning: narrowing conversion of '146' from 'int' to 'int8_t {aka signed char}' inside { } [-Wnarrowing]
int8_t tmsK3[0x10]      = {0x92,0x9F,0xAD,0xBA,0xC8,0xD5,0xE3,0xF0,0xFE,0x0B,0x19,0x26,0x34,0x41,0x4F,0x5C};
^
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:24:107: warning: narrowing conversion of '159' from 'int' to 'int8_t {aka signed char}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:24:107: warning: narrowing conversion of '173' from 'int' to 'int8_t {aka signed char}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:24:107: warning: narrowing conversion of '186' from 'int' to 'int8_t {aka signed char}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:24:107: warning: narrowing conversion of '200' from 'int' to 'int8_t {aka signed char}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:24:107: warning: narrowing conversion of '213' from 'int' to 'int8_t {aka signed char}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:24:107: warning: narrowing conversion of '227' from 'int' to 'int8_t {aka signed char}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:24:107: warning: narrowing conversion of '240' from 'int' to 'int8_t {aka signed char}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:24:107: warning: narrowing conversion of '254' from 'int' to 'int8_t {aka signed char}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:25:107: warning: narrowing conversion of '174' from 'int' to 'int8_t {aka signed char}' inside { } [-Wnarrowing]
int8_t tmsK4[0x10]      = {0xAE,0xBC,0xCA,0xD8,0xE6,0xF4,0x01,0x0F,0x1D,0x2B,0x39,0x47,0x55,0x63,0x71,0x7E};
^
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:25:107: warning: narrowing conversion of '188' from 'int' to 'int8_t {aka signed char}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:25:107: warning: narrowing conversion of '202' from 'int' to 'int8_t {aka signed char}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:25:107: warning: narrowing conversion of '216' from 'int' to 'int8_t {aka signed char}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:25:107: warning: narrowing conversion of '230' from 'int' to 'int8_t {aka signed char}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:25:107: warning: narrowing conversion of '244' from 'int' to 'int8_t {aka signed char}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:26:107: warning: narrowing conversion of '174' from 'int' to 'int8_t {aka signed char}' inside { } [-Wnarrowing]
int8_t tmsK5[0x10]      = {0xAE,0xBA,0xC5,0xD1,0xDD,0xE8,0xF4,0xFF,0x0B,0x17,0x22,0x2E,0x39,0x45,0x51,0x5C};
^
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:26:107: warning: narrowing conversion of '186' from 'int' to 'int8_t {aka signed char}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:26:107: warning: narrowing conversion of '197' from 'int' to 'int8_t {aka signed char}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:26:107: warning: narrowing conversion of '209' from 'int' to 'int8_t {aka signed char}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:26:107: warning: narrowing conversion of '221' from 'int' to 'int8_t {aka signed char}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:26:107: warning: narrowing conversion of '232' from 'int' to 'int8_t {aka signed char}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:26:107: warning: narrowing conversion of '244' from 'int' to 'int8_t {aka signed char}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:26:107: warning: narrowing conversion of '255' from 'int' to 'int8_t {aka signed char}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:27:107: warning: narrowing conversion of '192' from 'int' to 'int8_t {aka signed char}' inside { } [-Wnarrowing]
int8_t tmsK6[0x10]      = {0xC0,0xCB,0xD6,0xE1,0xEC,0xF7,0x03,0x0E,0x19,0x24,0x2F,0x3A,0x45,0x50,0x5B,0x66};
^
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:27:107: warning: narrowing conversion of '203' from 'int' to 'int8_t {aka signed char}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:27:107: warning: narrowing conversion of '214' from 'int' to 'int8_t {aka signed char}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:27:107: warning: narrowing conversion of '225' from 'int' to 'int8_t {aka signed char}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:27:107: warning: narrowing conversion of '236' from 'int' to 'int8_t {aka signed char}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:27:107: warning: narrowing conversion of '247' from 'int' to 'int8_t {aka signed char}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:28:107: warning: narrowing conversion of '179' from 'int' to 'int8_t {aka signed char}' inside { } [-Wnarrowing]
int8_t tmsK7[0x10]      = {0xB3,0xBF,0xCB,0xD7,0xE3,0xEF,0xFB,0x07,0x13,0x1F,0x2B,0x37,0x43,0x4F,0x5A,0x66};
^
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:28:107: warning: narrowing conversion of '191' from 'int' to 'int8_t {aka signed char}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:28:107: warning: narrowing conversion of '203' from 'int' to 'int8_t {aka signed char}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:28:107: warning: narrowing conversion of '215' from 'int' to 'int8_t {aka signed char}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:28:107: warning: narrowing conversion of '227' from 'int' to 'int8_t {aka signed char}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:28:107: warning: narrowing conversion of '239' from 'int' to 'int8_t {aka signed char}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:28:107: warning: narrowing conversion of '251' from 'int' to 'int8_t {aka signed char}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:29:67: warning: narrowing conversion of '192' from 'int' to 'int8_t {aka signed char}' inside { } [-Wnarrowing]
int8_t tmsK8[0x08]      = {0xC0,0xD8,0xF0,0x07,0x1F,0x37,0x4F,0x66};
^
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:29:67: warning: narrowing conversion of '216' from 'int' to 'int8_t {aka signed char}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:29:67: warning: narrowing conversion of '240' from 'int' to 'int8_t {aka signed char}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:30:67: warning: narrowing conversion of '192' from 'int' to 'int8_t {aka signed char}' inside { } [-Wnarrowing]
int8_t tmsK9[0x08]      = {0xC0,0xD4,0xE8,0xFC,0x10,0x25,0x39,0x4D};
^
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:30:67: warning: narrowing conversion of '212' from 'int' to 'int8_t {aka signed char}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:30:67: warning: narrowing conversion of '232' from 'int' to 'int8_t {aka signed char}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:30:67: warning: narrowing conversion of '252' from 'int' to 'int8_t {aka signed char}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:31:67: warning: narrowing conversion of '205' from 'int' to 'int8_t {aka signed char}' inside { } [-Wnarrowing]
int8_t tmsK10[0x08]     = {0xCD,0xDF,0xF1,0x04,0x16,0x20,0x3B,0x4D};
^
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:31:67: warning: narrowing conversion of '223' from 'int' to 'int8_t {aka signed char}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:31:67: warning: narrowing conversion of '241' from 'int' to 'int8_t {aka signed char}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp: In member function 'void Talkie::say(uint8_t*)':
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:80:3: error: 'TCCR2A' was not declared in this scope
TCCR2A = _BV(COM2B1) | _BV(WGM21) | _BV(WGM20);
^
In file included from C:\Program Files\Arduino\hardware\teensy\avr\cores\teensy3/wiring.h:33:0,
from C:\Program Files\Arduino\hardware\teensy\avr\cores\teensy3/WProgram.h:15,
from C:\Program Files\Arduino\hardware\teensy\avr\cores\teensy3/Arduino.h:1,
from C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:6:
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:80:16: error: 'COM2B1' was not declared in this scope
TCCR2A = _BV(COM2B1) | _BV(WGM21) | _BV(WGM20);
^
C:\Program Files\Arduino\hardware\teensy\avr\cores\teensy3/core_pins.h:45:22: note: in definition of macro '_BV'
#define _BV(n)  (1<<(n))
^
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:80:30: error: 'WGM21' was not declared in this scope
TCCR2A = _BV(COM2B1) | _BV(WGM21) | _BV(WGM20);
^
C:\Program Files\Arduino\hardware\teensy\avr\cores\teensy3/core_pins.h:45:22: note: in definition of macro '_BV'
#define _BV(n)  (1<<(n))
^
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:80:43: error: 'WGM20' was not declared in this scope
TCCR2A = _BV(COM2B1) | _BV(WGM21) | _BV(WGM20);
^
C:\Program Files\Arduino\hardware\teensy\avr\cores\teensy3/core_pins.h:45:22: note: in definition of macro '_BV'
#define _BV(n)  (1<<(n))
^
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:81:3: error: 'TCCR2B' was not declared in this scope
TCCR2B = _BV(CS20);
^
In file included from C:\Program Files\Arduino\hardware\teensy\avr\cores\teensy3/wiring.h:33:0,
from C:\Program Files\Arduino\hardware\teensy\avr\cores\teensy3/WProgram.h:15,
from C:\Program Files\Arduino\hardware\teensy\avr\cores\teensy3/Arduino.h:1,
from C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:6:
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:81:16: error: 'CS20' was not declared in this scope
TCCR2B = _BV(CS20);
^
C:\Program Files\Arduino\hardware\teensy\avr\cores\teensy3/core_pins.h:45:22: note: in definition of macro '_BV'
#define _BV(n)  (1<<(n))
^
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:82:3: error: 'TIMSK2' was not declared in this scope
TIMSK2 = 0;
^
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:88:3: error: 'TCCR1A' was not declared in this scope
TCCR1A = 0;
^
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:89:3: error: 'TCCR1B' was not declared in this scope
TCCR1B = _BV(WGM12) | _BV(CS10);
^
In file included from C:\Program Files\Arduino\hardware\teensy\avr\cores\teensy3/wiring.h:33:0,
from C:\Program Files\Arduino\hardware\teensy\avr\cores\teensy3/WProgram.h:15,
from C:\Program Files\Arduino\hardware\teensy\avr\cores\teensy3/Arduino.h:1,
from C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:6:
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:89:16: error: 'WGM12' was not declared in this scope
TCCR1B = _BV(WGM12) | _BV(CS10);
^
C:\Program Files\Arduino\hardware\teensy\avr\cores\teensy3/core_pins.h:45:22: note: in definition of macro '_BV'
#define _BV(n)  (1<<(n))
^
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:89:29: error: 'CS10' was not declared in this scope
TCCR1B = _BV(WGM12) | _BV(CS10);
^
C:\Program Files\Arduino\hardware\teensy\avr\cores\teensy3/core_pins.h:45:22: note: in definition of macro '_BV'
#define _BV(n)  (1<<(n))
^
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:90:3: error: 'TCNT1' was not declared in this scope
TCNT1 = 0;
^
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:91:3: error: 'OCR1A' was not declared in this scope
OCR1A = F_CPU / FS;
^
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:92:3: error: 'TIMSK1' was not declared in this scope
TIMSK1 = _BV(OCIE1A);
^
In file included from C:\Program Files\Arduino\hardware\teensy\avr\cores\teensy3/wiring.h:33:0,
from C:\Program Files\Arduino\hardware\teensy\avr\cores\teensy3/WProgram.h:15,
from C:\Program Files\Arduino\hardware\teensy\avr\cores\teensy3/Arduino.h:1,
from C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:6:
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:92:16: error: 'OCIE1A' was not declared in this scope
TIMSK1 = _BV(OCIE1A);
^
C:\Program Files\Arduino\hardware\teensy\avr\cores\teensy3/core_pins.h:45:22: note: in definition of macro '_BV'
#define _BV(n)  (1<<(n))
^
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp: At global scope:
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:147:233: warning: narrowing conversion of '212' from 'int' to 'int8_t {aka signed char}' inside { } [-Wnarrowing]
int8_t chirp[CHIRP_SIZE] = {0x00,0x2a,0xd4,0x32,0xb2,0x12,0x25,0x14,0x02,0xe1,0xc5,0x02,0x5f,0x5a,0x05,0x0f,0x26,0xfc,0xa5,0xa5,0xd6,0xdd,0xdc,0xfc,0x25,0x2b,0x22,0x21,0x0f,0xff,0xf8,0xee,0xed,0xef,0xf7,0xf6,0xfa,0x00,0x03,0x02,0x01};
^
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:147:233: warning: narrowing conversion of '178' from 'int' to 'int8_t {aka signed char}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:147:233: warning: narrowing conversion of '225' from 'int' to 'int8_t {aka signed char}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:147:233: warning: narrowing conversion of '197' from 'int' to 'int8_t {aka signed char}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:147:233: warning: narrowing conversion of '252' from 'int' to 'int8_t {aka signed char}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:147:233: warning: narrowing conversion of '165' from 'int' to 'int8_t {aka signed char}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:147:233: warning: narrowing conversion of '165' from 'int' to 'int8_t {aka signed char}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:147:233: warning: narrowing conversion of '214' from 'int' to 'int8_t {aka signed char}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:147:233: warning: narrowing conversion of '221' from 'int' to 'int8_t {aka signed char}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:147:233: warning: narrowing conversion of '220' from 'int' to 'int8_t {aka signed char}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:147:233: warning: narrowing conversion of '252' from 'int' to 'int8_t {aka signed char}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:147:233: warning: narrowing conversion of '255' from 'int' to 'int8_t {aka signed char}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:147:233: warning: narrowing conversion of '248' from 'int' to 'int8_t {aka signed char}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:147:233: warning: narrowing conversion of '238' from 'int' to 'int8_t {aka signed char}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:147:233: warning: narrowing conversion of '237' from 'int' to 'int8_t {aka signed char}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:147:233: warning: narrowing conversion of '239' from 'int' to 'int8_t {aka signed char}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:147:233: warning: narrowing conversion of '247' from 'int' to 'int8_t {aka signed char}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:147:233: warning: narrowing conversion of '246' from 'int' to 'int8_t {aka signed char}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:147:233: warning: narrowing conversion of '250' from 'int' to 'int8_t {aka signed char}' inside { } [-Wnarrowing]
C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie\talkie.cpp:149:4: error: expected constructor, destructor, or type conversion before '(' token
ISR(TIMER1_COMPA_vect) {
^
Using library Talkie in folder: C:\Documents and Settings\Kris\My Documents\Arduino\libraries\Talkie (legacy)
exit status 1
Error compiling.

Any idea what I am missing?
 
man that is a massive dump. I think the computer doesn't like you any more. its saying ... every line of code you have given me tastes like spinach
 
Nevermind, I seem to have the non-Teensy version. Fixed...

Cool! The speech quality is really quite good. I need to get a decent amplifier though...
 
Last edited:
I need to get a decent amplifier though...

Use the Prop Shield beta!

But you might need to add analogReference(INTERNAL) to reduce the level to a sane setting. Don't forget to use pinMode and digitalWrite to drive pin 5 high, to turn the amp on.
 
I'll take a look at the schematic to figure out what I am supposed to connect the speaker to, but a hint would be appreciated!

I hooked up + and - to the stereo input of the jack and GND to GND but all I hear is a loud buzzing. I verified pin 5 is 3V3.

How does the amp work?
 
Last edited:
I tried this with a 3 Ohm little flat speaker, an 8 Ohm 4 inch woofer-like speaker and the headphones with which I was able to hear the talkie code output (weakly) before from DAC + GND. But all I hear from the prop shield (whether i connect + and - to the speakers or +, - and GND to the jack) is buzzing...

What am I doing wrong?
 
First, only connect the speaker to AMP+ and AMP-. Do *not* connect the speaker to GND or anything else, only those 2 pins!

Make sure both DAC and AGND are connected between your Teensy and the Prop Shield.
 
I got Talkie working on same (with audio lib works too) 0.5W 8ohm speaker on Prop +/- with example / Demo_toms_diner adding these copied lines from post #129 to setup:

Code:
  pinMode(5, OUTPUT);
  digitalWrite(5, 1);//Enable Amplified.

No shortage of loudness on tiny speaker - not over driven or too loud - except for a sleeping spouse . . . .

Same worked for example / _1_Getting_Started. Only note is some lack of pure silence after this example leaves setup and goes to empty loop()? Minor cracks of some sort if you don't follow with :
Code:
   digitalWrite(5, 0);//dis-able Amplified.

This did drop volume: analogReference(INTERNAL);
 
Last edited:
This is all very interesting. I'm not really sure what your beta prop shield does, but without it, will I need something to compliment my audio board? I was planning on just plugging in amplified speakers at the moment.

I'm not at my studio at the moment so haven't had a chance to test it out yet.
 
Amplified speakers normally used on a PC should work fine.

The Prop Shield is an upcoming new product, currently in beta testing, which has a 2 watt audio amp (and other stuff). They'll be available for everyone in a week or two.
 
I'm pretty excited about the talkie library ... I compiled it last night, all good. I have tried DDS using the teensy DAC ... it needs a dc blocking cap ... is that right? And it will be 3.3v peak to peak? In audio world, there are high z and low z signals .... I'm guessing the impedance is in the 1000kohm range or more. I put the DDS into a cheap pre amp / USB ADC line in no worries ... I'm very excited about putting this through my studio setup.

And ... @PaulStofreggen thanks for including me in the beta propshield. All good on the amp front apart from being 398 Watts less than I would prefer ...:rolleyes:
 
<edit> Talkie is cool - but being blocked while watching the speaker got boring!

I just made a non blocking version of Talkie! Using : Timer1.attachInterrupt(sayMore);

Here's a teaser of my loop until I can fork a GitHub - it announces each new second and completes over 376000 passes through the loop() while waiting to announce the next digit change. If I add a delay(10) sure enough it only completes 100 (or 99) passes through the loop() while waiting and the sound plays fine. And with delay(1001) it announces each second - until it probably skips one in the next 999 seconds. And if you run it too fast - it just jumps to what you asked for last.

Code:
void loop() {
  uint8_t currKM = (millis() / 1000) % 10;
  if ( lastKM != currKM ) {
    Serial.print("busyloops  ");
    Serial.println(busyloops);
    busyloops = 0;
    Serial.print("currKM  ");
    Serial.println(currKM);
    lastEnergy = voice.sayReady(spSpeak[currKM]);
    lastKM = currKM;
  }
  busyloops++;
}
 
Last edited:
Here is my Fork: https://github.com/Defragster/Talkie

Here's my commit text to summarize:
Added calls to get non blocking talkie

Exposes two funcs sayReady() and sayGo()
Rather than say() and wait.
User sketch starts a Timer1.initialize(25000);
does sayReady on the speech
then timer calls sayGo until done

It has two working examples of usage configured for the Prop shield:
PropCountSec :: Announces as each 'second' passes while letting you do whatever you want to do in loop()
PropNoDelayDanger :: Demonstrates word by word the DANGER DANGER RED ... as you do whatever you want to do in loop()

Paul: If you see value you can port it for PJRC, or I could clean it up if you see issues in the interface. It could be done 'internally' perhaps like I did the ILI9341_Touch and be cleaner for the end user and user would not start a timer to do the sayGo() callback?

<edit>: Posted a third Example Song started in setup() - proceeds to loop() freely while it plays:
Interrupt driven non-blocking TALKIE library playing the 2 minute song: PropTomsDinerInt
 
Last edited:
Paul: If you see value you can port it for PJRC, or I could clean it up if you see issues in the interface. It could be done 'internally' perhaps like I did the ILI9341_Touch and be cleaner for the end user and user would not start a timer to do the sayGo() callback?

Yes, a cleaner API would be really nice, hopefully just the nonblocking say() function, and a function to query if it's still talking versus silent.
 
Yes, a cleaner API would be really nice, hopefully just the nonblocking say() function, and a function to query if it's still talking versus silent.

Now that I've seen it work - I think I can get to that in the next 24hr

A Teensy only fork?
Should work to just rewrite say() to always do timer setup and use it and require it.

Let me know if you haven't scanned the code enough to see these things as good.
Putting a Timer1 in the library code the best way - used because there was a hardcoded delay(25) - and for my speaker it sounded unchanged and ran well:
Code:
  Timer1.initialize(25000);
  Timer1.attachInterrupt(sayMore);

Only Risk:: I don't know how critical that 25ms time is and what happens if it isn't met? Hopefully it just re-synths some 'syllables'? While I have the timer INT in my sketch I'll test it delaying the sayGo() call.
 
I'd prefer to keep compatibility with regular Arduino. But if 8 bit AVR can't run some stuff, adding ARM only functions would be ok.

Is using another timer really necessary? There's no rush.... this library has been around for years, and until last weekend it hadn't even been updated to compile on modern versions of Arduino. I think taking a few extra days to make a cleaner API isn't a big deal.

Also, soon we'll have the Prop Shield fully released, and then I'll be able to give this and other stuff more attention. At the moment I'm cleaning up the magnetic calibration utility... and hoping you and other beta testers can help. Expect some rough edges, since it's my first ever attempt at opengl programming!
 
I saw some #ifdef's already and wasn't sure. Only question was the ability of anything non_teensy to be fast enough. No special code is needed - just cycles. This doesn't add any work - just how it cascades.

Rewrote it internally to use existing IntervalTimer(125) - it seems to run at 125usec and the delay was 25ms - so I just added a 200::1 direct call to an isr routine to move the data flow along as before. This means the timerInterrupt() code may not exit before a subsequent interval happens?

It plays and runs well enough as I hear it on my lame speaker - there may be [125usec to 25ms] issues I can't hear on the start/end/transition. You might see blips on a scope. Having the old and new side by side on synchronized traces would be pretty.

In PJRC/Arduino style is it better to have a variable to test when active:: if ( !voice.saying ) or a function:: if ( !voice.saying() ) - and what would you call that? When "voice.say()" results in "voice.said"?
 
Current version updated: https://github.com/Defragster/Talkie

Problem is any old code calling voice.say() immediately returns - so nothing counting on blocking works - like 2_Voltmeter. Seems like a new interface other than say() is called for, I dropped the old interface for the new.

Added voice.active variable that is true while say() is "active", else false.

New version of Talkie.cpp and Talkie.h - three updated samples with 2 appended to prior name.
Old code/samples in the tree under Timer1_x.

<edit> three provided samples work as expected. the 2_Voltmeter works with the initial code. For some reason I am stymied getting the 2_Voltmeter code to work with the new library.

<edit>: I think I will change the .active variable to a function that does a yield(). When I added tight loops "while ( voice.active );" it hung the Teensy and that is why the volts wouldn't work.

Done and working with
Code:
while ( voice.active() ) ;

Redoing the voltmeter code is ugly. I did samples with array of speech elements - I almost want to make a queue call to have the lib fill a circ buffer that it pulls from when current sound ends.
 
Last edited:
Paul: This is working in the non-blocking code. Per my examples - no impact on user code - except when the next voice.say() needs to wait for prior to complete. I have not tried this on any wimpy AVR modules for function.

<EDIT>: restored prior voice.say() behavior so ACORN and VOLTMETER (other?) examples run again. Updated sample examples to use new voice.sayQ() and voice.active() behavior. Odd I picked three samples that could work with either behavior, but they have been extended to show loop() is active during setQ(). Only single active item queued, pushing a second terminates any active sound.

Problem I see is re-writing the code for voice.say() to go from blocking to non-blocking breaks common prior usage, the voltmeter is a great example. Even re-writing the voltmeter to queue the parts on the numbers is tough as the code is recursive as it parses the number. The way I did the examples alludes to the solution (with an array), but requires each sketch to create a private queue array and process it.

> Not changing the voice.say() to non-blocking would allow Voltmeter and similar to work as is
> Putting the non-blocking call and return under a new method would allow good usage: voice.sayQ() {feel free to suggest a 'good' name}
> New method voice.active() can be used to tell when the queued event is complete

By design the sayQ( 'addr' ) would take the data string address and return - giving a non-blocking version of voice.say().
> It could be extended to buffer some '16' such addresses and on ending one, check the queue and proceed to the next.
> This would trivialize the usage just like Serial.print() where the library allows multiple writes.

> voice.active() could return the number of pending strings in the queue rather than bool, but still 0 when not active
> sayQ( 'addr' ) could return the number of open queue spaces if the passed item is fits (0-15), and minus_1 when the queue is full and the passed item didn't fit.
> Since ZERO is not a valid address a call voice.sayQ( 0 ) could be used to check open queue space, and not try to queue anything.
> Having a way to dump the queued items might be nice, if there were a nice value that makes sense for that - on the order of '-1'.

Example:: In the use case of Voltmeter and "sayNumber(4212)"- the voice.say() would be easily edited to voice.sayQ() and all the parts would fit: i.e -4212mV:: [minus,4,thousand,2,hundred,and,twelve,Milli,Volts]. Then the only other change would doing "whatever", but not putting out a new reading until : "if ( !voice.active() ) ", unless the queue space were seen as ready to hold another 'batch'.

If this makes sense and you like this plan say so and it should be done in a couple days. Having restored the prior behavior, the change would be to add depth behavior to setQ()
 
Last edited:
Talkie is now my favourite thing ever .... I haven't been able to get into the studio the last few days, but I made a quickie recording of the acorn voice on my laptop using an old interface I have on hand for such purposes ( ... see groovy teensy lc picture ...)

WP_20160316_003.jpg

... the acorn voice has a rythmic quality and beautiful enunciation.... pretty good sound quality too... I used some gating and a bit of eq, and couldn't resist vocoding!!! love it! such fun ... I tried to upload a soundfile, but I guess that is against forum rules.

Anyway ... I have a few ideas about the prop shield .... its obviously custom made for a gestural controller for midi ... BUT I was wondering if it could be used for a breath controller....would barometric pressure work for breath?? also, I wonder if it could be used to follow magnetic pickups on a guitar.... I would assume that it might be able to pick up changes in intensity in the form of proportionally tracking activity / intensity as the strings vibrate in the magnetic field

For a breath controller using barometric pressure, I suppose you would need a sealed system.

Interesting .... if true
 
Last edited:
Status
Not open for further replies.
Back
Top