Go Down

Topic: Talkie library + a little GLCD help (Read 6632 times) previous topic - next topic

Arduinoisme

Dec 24, 2013, 03:59 pm Last Edit: Dec 24, 2013, 04:01 pm by Arduinoisme Reason: 1
I was working on my talking clock project, and I am thinking of using the Talkie library for the 'talking' because  I have heard some AWESOME sounds from it.

The only problem is, I don't understand it.

Code: [Select]
#include "talkie.h"
#include <Wire.h>                       // For some strange reasons, Wire.h must be included here
#include <DS1307new.h>


Talkie voice;

uint8_t spTHE[]       PROGMEM = {
  0x08,0xE8,0x3E,0x55,0x01,0xC3,0x86,0x27,0xAF,0x72,0x0D,0x4D,0x97,0xD5,0xBC,0x64,0x3C,0xF2,0x5C,0x51,0xF1,0x93,0x36,0x8F,0x4F,0x59,0x2A,0x42,0x7A,0x32,0xC3,0x64,0xFF,0x3F};
uint8_t spTIME[]      PROGMEM = {
  0x0E,0x28,0xAC,0x2D,0x01,0x5D,0xB6,0x0D,0x33,0xF3,0x54,0xB3,0x60,0xBA,0x8C,0x54,0x5C,0xCD,0x2D,0xD4,0x32,0x73,0x0F,0x8E,0x34,0x33,0xCB,0x4A,0x25,0xD4,0x25,0x83,0x2C,0x2B,0xD5,0x50,0x97,0x08,0x32,0xEC,0xD4,0xDC,0x4C,0x33,0xC8,0x70,0x73,0x0F,0x33,0xCD,0x20,0xC3,0xCB,0x43,0xDD,0x3C,0xCD,0x8C,0x20,0x77,0x89,0xF4,0x94,0xB2,0xE2,0xE2,0x35,0x22,0x5D,0xD6,0x4A,0x8A,0x96,0xCC,0x36,0x25,0x2D,0xC9,0x9A,0x7B,0xC2,0x18,0x87,0x24,0x4B,0x1C,0xC9,0x50,0x19,0x92,0x2C,0x71,0x34,0x4B,0x45,0x8A,0x8B,0xC4,0x96,0xB6,0x5A,0x29,0x2A,0x92,0x5A,0xCA,0x53,0x96,0x20,0x05,0x09,0xF5,0x92,0x5D,0xBC,0xE8,0x58,0x4A,0xDD,0xAE,0x73,0xBD,0x65,0x4B,0x8D,0x78,0xCA,0x2B,0x4E,0xD8,0xD9,0xED,0x22,0x20,0x06,0x75,0x00,0x00,0x80,0xFF,0x07};
uint8_t spIS[]        PROGMEM = {
  0x21,0x18,0x96,0x38,0xB7,0x14,0x8D,0x60,0x3A,0xA6,0xE8,0x51,0xB4,0xDC,0x2E,0x48,0x7B,0x5A,0xF1,0x70,0x1B,0xA3,0xEC,0x09,0xC6,0xCB,0xEB,0x92,0x3D,0xA7,0x69,0x1F,0xAF,0x71,0x89,0x9C,0xA2,0xB3,0xFC,0xCA,0x35,0x72,0x9A,0xD1,0xF0,0xAB,0x12,0xB3,0x2B,0xC6,0xCD,0x4F,0xCC,0x32,0x26,0x19,0x07,0xDF,0x0B,0x8F,0xB8,0xA4,0xED,0x7C,0xCF,0x23,0x62,0x8B,0x8E,0xF1,0x23,0x0A,0x8B,0x6E,0xCB,0xCE,0xEF,0x54,0x44,0x3C,0xDC,0x08,0x60,0x0B,0x37,0x01,0x1C,0x53,0x26,0x80,0x15,0x4E,0x14,0xB0,0x54,0x2B,0x02,0xA4,0x69,0xFF,0x7F};
uint8_t spA_M_[]      PROGMEM = {
  0xCD,0xEF,0x86,0xAB,0x57,0x6D,0x0F,0xAF,0x71,0xAD,0x49,0x55,0x3C,0xFC,0x2E,0xC5,0xB7,0x5C,0xF1,0xF2,0x87,0x66,0xDD,0x4E,0xC5,0xC3,0xEF,0x92,0xE2,0x3A,0x65,0xB7,0xA0,0x09,0xAA,0x1B,0x97,0x54,0x82,0x2E,0x28,0x77,0x5C,0x52,0x09,0x1A,0xA3,0xB8,0x76,0x49,0x25,0x68,0x8C,0x73,0xDB,0x24,0x95,0xA0,0x32,0xA9,0x6B,0xA7,0xD9,0x82,0x26,0xA9,0x76,0x42,0xD6,0x08,0xBA,0xE1,0xE8,0x0E,0x5A,0x2B,0xEA,0x9E,0x3D,0x27,0x18,0xAD,0xA8,0x07,0xF1,0x98,0x90,0x35,0xA2,0x96,0x44,0xA3,0x5D,0x66,0x8B,0x6B,0x12,0xCD,0x32,0x85,0x25,0xC9,0x81,0x2D,0xC3,0x64,0x85,0x34,0x58,0x89,0x94,0x52,0x1C,0x52,0x2F,0x35,0xDA,0xC7,0x51,0x48,0x23,0x97,0xCC,0x2C,0x97,0x2E,0xF3,0x5C,0xF3,0xA2,0x14,0xBA,0x2C,0x48,0xCE,0xCA,0x76,0xE8,0x32,0x2F,0x34,0xB2,0xDB,0x85,0xC9,0x83,0x90,0xA8,0x2C,0x57,0x26,0x8F,0x9C,0xBD,0xA2,0x53,0xD9,0xC2,0x54,0x59,0x28,0x99,0x4B,0x2C,0x5D,0xFF,0x3F};




An endless list of 0 times a random number. How does that even make sense?

Anyone have any explanation? Please provide a clear explanation as I really want to use this library and I don't want or even need any external ICs.

PS. Please help me to use a GLCD (JHD12864E) to an Arduino leonardo and program it with the glcd v3 library. It doesn't seem to be working, even with example code. I have checked the circuit a million times with the datasheet and panel - b connections (JHD12864E is a panel B type) but it still doesn't work.


Any help with either of these topics would be very much appreciated. My project is a very good one, so I will also publish it on the forum if I succeed.

P.S.S The above code is not self written (obviously.)

PaulRB

#1
Dec 24, 2013, 05:08 pm Last Edit: Dec 24, 2013, 05:12 pm by PaulRB Reason: 1
Hi Arduinoisme and welcome.

This is the best advice I can give you:

  • Always post your complete sketch. What you posted above tells us nothing.

  • Always post a schematic (a diagram of your circuit) or a clear detailed picture of the circuit.

  • Don't ask 2 separate questions in the same thread. Everything will become confused, including you. Start a new thread for the GLCD question. There is a special section of the forum for this kind of display/

  • Don't just say things like "it doesn't seem to be working", no-one can help you at all with so little to go on. Describe exactly what you have tried and exactly what you see. For example, does the back light come on on the display? Do you see random dots or shapes?


I hope this helps. Asking for help is a skill in itself, which everyone has to learn!

Paul

PS. Well done for using "code tags" in your first post. Most people get that wrong first time, because they don't read the forum rules before posting.

Arduinoisme

#2
Dec 24, 2013, 05:30 pm Last Edit: Dec 24, 2013, 05:48 pm by Arduinoisme Reason: 1
Sorry if I was a little disrespectful. But  I have not designed a circuit yet, I am just asking for help on the random 0s and multipliers.
I just don't understand how to use them. Are they frequiences? If so, how do I control them?

With the GLCD, the problem is controlling it. The backlight turns on, but I see random pixels on the display. I am using the example code from the library, the HelloWorld Example, which goes like this:

Code: [Select]
/*
 GLCD Library - Hello World

This sketch prints "Hello World!" to the LCD
and shows the time in seconds since reset.

 The circuit:
 See the inlcuded documentation in glcd/doc directory for how to wire
 up the glcd module. glcd/doc/GLCDref.htm can be viewed in your browser
 by clicking on the file.

*/

// include the library header
#include <glcd.h>

// include the Fonts
#include <fonts/allFonts.h>

void setup() {
 // Initialize the GLCD
 GLCD.Init();

// Select the font for the default text area
 GLCD.SelectFont(System5x7);

 GLCD.print("hello, world!");
}

void loop() {
 // set the cursor to column 0, line 1
 // (note: line 1 is the second row, since counting begins with 0):
 GLCD.CursorTo(0, 1);

 // print the number of seconds since reset:
 GLCD.print(millis()/1000);
}


Also, the code I printed in the earlier post was from someone else (I specifically mentioned that at the end of the post) from:
http://elek101.blogspot.in/2012/12/arduino-talking-clock.html

Here is my considered circuit (which happens to be in the link) -

elac

I have made a talking clock/thermometer with the Talkie library, it works well.
I went off of this code .
The library is quite simple, I suggest working off of the Vocab_US_Clock example, it's pretty straight forward.
Include the words you want to use, and call them in your sketch using:
Code: [Select]
voice.say(the word you want here);
As for the 0x values.
The words are stored in hexadecimal format, nothing for you to play around with or the words won't work.
It's all about the skills

el_supremo

0x doesn't mean zero times the number that follows. It means that the number which follows is represented as a hexadecimal number instead of decimal. e.g. 0x10 represents decimal 16.

Pete
Don't send me technical questions via Private Message.

Arduinoisme

What I am asking is, if  I want to use this library afterwards in some other project and want some other words, how do I control the hexadecimals? Is there a table or anything? Or is there some maths involved?

elac

You don't "control" the hexadecimals. For your own words you need to record them on your PC, then use the encoder included with the talkie library, then manually convert to hexadecimals and use that.
It is NOT an easy process.
The better way of using your own words is to get a dedicated speech module like these: Ginsing , Speakjet voice sheild or an eMic2.
It's all about the skills

tack

You could also try SimpleSDAudio library, where you can record your sounds, convert using supplied batch files and Sox, then play straight from an SD Card with a speaker/amp connected to Arduino pin(s). 8 Bit Moni would work for voice for a clock.

All you'd neee is an SD card reader and a speaker + any required amp.

jremington

#8
Dec 26, 2013, 12:31 am Last Edit: Dec 26, 2013, 01:33 am by jremington Reason: 1

What I am asking is, if  I want to use this library afterwards in some other project and want some other words, how do I control the hexadecimals? Is there a table or anything? Or is there some maths involved?

The Talkie library is a software emulator for the voice synthesis chip in the original Texas Instruments Speak n Spell toy that was developed in the 1970s. http://en.wikipedia.org/wiki/Speak_%26_Spell_%28toy%29 The hex codes are dumps from the read-only memories in various versions of the toy. The theory is pretty complex and there was a real art to developing ROM codes that create reasonable speech. It is not at all simple to add new words, but there are lots of words available from various different ROM dumps.

If you are interested in learning more of the fascinating history of the speech chip and subsequent efforts to understand and reproduce how it works, there are some references in the GitHub depository to the MAME project (various people working on emulating vintage video game and speech chips).  https://github.com/going-digital/Talkie

For additional information on creating word and phrase libraries (including making your project swear "like a sailor") check out the encoder directory in the Talkie library and also these sites:
http://hackaday.com/2012/12/03/teaching-the-speak-spell-four-and-more-letter-words/
http://furrtek.free.fr/index.php?a=speakandspell&ss=1&i=2

Go Up