Go Down

Topic: Is it possible to make Arduino talk without shield (Read 19 times) previous topic - next topic

D3C3PT1C0N

Hi!
I was wondering if it is possible to make Arduino Duemilanove talk (using small speaker) without SpeakJet/VoiceBox shield? I mean just using software + speaker...

Something like this
[media]http://www.youtube.com/watch?v=Eo3hEKAOxeg[/media]


cr0sh

Yes:

http://code.google.com/p/tinkerit/wiki/Cantarino

Quality isn't great, but it does work!

:)
I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

cr0sh

One other thing, since I noticed you in another thread talking about having a bunch of hardware connected to your Arduino:

Most likely, when using this software synthesizer, you will find that you can't do anything else while it is running; in other words, it likely takes up a lot of CPU cycles, while also consuming a big chunk of memory.

In other words, it turns an ATMega into something like the SpeakJet (which, IIRC, is simply another software synthesizer running on a custom programmed PIC).

:)
I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

D3C3PT1C0N

Wow, thanks a lot cr0sh and Jiggles! Gonna try it out.

Ro-Bot-X

#4
Jun 25, 2010, 03:22 am Last Edit: Jun 25, 2010, 03:24 am by Ro-Bot-X Reason: 1
I managed to translate Webbot's speech synthesis code and made a simple TTS (text to speech) library. But You can't connect just a speaker to a PWM pin, you need to add a RC filter and an amplifier. I used the schematic below:



Also, the code is big and the speech is retro robot like. You can't do anything else during the speech time, but you can do whatever you like before and after the speech is done.

Here is the lib: TTS.zip After download, create a TTS folder under Arduino-0018\libraries and place all files there. Then, from Arduino you can open the example provided.

D3C3PT1C0N

#5
Jun 25, 2010, 06:50 am Last Edit: Jun 25, 2010, 11:51 am by Fredx Reason: 1
Ro-Bot-X do you happen to have a bigger schematic? Also what components do I exactly need? - as I am a total noob, I need everything to be clearly understandable (got it)

I was trying to test this code by uploading it to my Arduino board. Unfortunately I always got the same error. What is the problem?



I was thinking about doing a talking clock or talking temperature meter (thermometer) or autonomous robot

cr0sh

Ro-Bot-X: Interesting - what's the memory footprint after the translation?
I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.


Ro-Bot-X

Quote
I was trying to test this code by uploading it to my Arduino board. Unfortunately I always got the same error. What is the problem?


The problem is you can't follow directions. I told you in my previous message to make a folder named TTS in the libraries folder under Arduino-0018. Copy all the files there. Perhaps it's not obvious to everyone that there is a sub-folder called examples that has to be copied in the same TTS folder...

Make sure the TTStest.pde is located in the examples\TTStest folder when you run it. You can't have the TTS.h and english.h tabs in your code and also import TTS.h from the library...

@cr0sh: When I compile the example, I get the following code size on a mega328:
Code: [Select]
Binary sketch size: 10684 bytes (of a 30720 byte maximum)

cr0sh

Well - not exactly tiny, but it still leave 20K or so available, so it isn't too shabby, either, for what it does, I suppose...

:)
I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

D3C3PT1C0N

#10
Jun 26, 2010, 04:57 pm Last Edit: Jun 26, 2010, 05:37 pm by Fredx Reason: 1
Ro-Bot-X.... shame on me  :-[
I was too hurry that I didn't read all your post.

For now, I got it working. I connected Arduino to my computer speakers and everything works fine. Interesting is that when using VoiceBox Shield... you have to have SpeakJet Chip + TTS256 Text to Speech Chip... but you have both in one....

D3C3PT1C0N

I have one more question - is it somehow possible to use the chip from children toy mobile phone? That usually say something like "I LOVE YOU... etc"

pluggy

Possibly, if you have a datasheet for the chip in question.
http://pluggy.is-a-geek.com/index.html

D3C3PT1C0N

#13
Jun 27, 2010, 02:21 pm Last Edit: Jun 27, 2010, 02:29 pm by Fredx Reason: 1
Hi again,
I am trying to make the Arduino to say the current temperature.
I have connected temperature sensor LM35 to analog pin 0.

There is something wrong with the red part.

Quote

/*
 The Text To Speech library uses Timer1 to generate the PWM
 output on digital pin 10. The output signal needs to be fed
 to an RC filter then through an amplifier to the speaker.
*/

#include <TTS.h>

// Media pins
#define ledPin 13       // digital pin 13                          
const int pin = 0; // analog pin 0

int tempc = 0;
int tempb = 0;

// Variables
char text [50];
boolean state=0;

TTS text2speech;  // speech output is digital pin 10

void setup() {}

void loop()
{  

// Takes 8 samples and sums up
 for(int i = 0; i < 8; i++)
{
tempc += analogRead(pin);
}

// Makes some calculations
tempc = (5.0 * tempc * 100.0) / (8.0 * 1024.0);
int tempb = tempc + 0.5;

state = !state;
Test_Speech();
}

void Test_Speech()
{
text2speech.setPitch(6); //lower values = higher voice pitch
strcpy(text, tempb);
text2speech.say(text);

delay(500);
}



int tempb = tempc + 0.5; gives the temperature numbers, like 23 degrees.
-----
strcpy(text, tempb);
text2speech.say(text); should say the value.

This works fine:
strcpy(text, "Hello there 1 2 3 4 5");
text2speech.say(text);

But i want it to say the int tempb value
I think there is a problem with text and integer..

Steve S

The strcpy is bad. You are trying to copy an int to a string. There are int to string conversion functions to use instead.

Go Up