Go Down

Topic: How to play sounds Lilypad? What do I need for it? (Read 2044 times) previous topic - next topic

gregtom6

Hy all!

I have a project, I need to use the Lilypad to play some sounds when a sensor recognise something. For example if the expression is true, the Lilypad should play a message what can be heard. (it would be speaking) There would be at least 25 messages like this.

I don't know what should I buy for this. The message should be recognisable and somewhere should be stored these messages.

What can you advice?

johnwasser

MP3 Trigger: https://www.sparkfun.com/products/11029?
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Far-seeker

#2
Aug 13, 2012, 11:21 pm Last Edit: Aug 13, 2012, 11:30 pm by Far-seeker Reason: 1
There are a couple basic methods to do this, both would involve addtional electronics controlled by the Lilypad...

First (as johnwasser stated), you could have pre-recorded messages stored on and played by a dedicated audio shield/electronics module.  The Lilypad would be programed to select the proper message based on the sensors, and then instruct the audio module to play the proper message.  

Second, there are ICs that generate speech based on serial commands sent to them (like SpeakJet).  As above the Lilypad determines the correct message.  Then it sends the commands for the desired speech to be generated.

You will of course need some sort of speaker regardless of which way you choose to do it.

gregtom6

It seems to be good for this.
Can I choose which mp3 should be played in the Arduino code? It can play maximum of 256 tracks or more?

There isn't any cheaper solution?

Far-seeker


Can I choose which mp3 should be played in the Arduino code?

Yes, that's the main point of having it made as an Arduino sheild is to have it controlled by a programmed Arduino.  Check out the documentation on the webpage for examples.


There isn't any cheaper solution?

Adafruit has a cheaper audio shield, however it plays WAV files not MP3s.  Most sound recording software I know of can record WAV files, and although the sound quality won't be as good as an MP3 it will be fine for recognizable speech.

gregtom6

So I need:
A)
1)  An audio shield ( like MP3 Trigger from Sparkfun or this Wave from Adafruit)
2)  An SD card with the files
3)  Some speakers
If I understand this correctly.

B)
1) An IC (like SpeakerJet)
And what should I need for this B option to get it working?

Far-seeker


B)
1) An IC (like SpeakerJet)
And what should I need for this B option to get it working?


There are some shields already designed around the SpeakJet (sorry my mistake on the name in the original reply) or similar ICs.  Sparkfun sells one, but there are others as well.

johnwasser

Note that because the Lillypad does not use the same pin layout as a traditional Arduino there is no advantage to getting an Arduino Shield.
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Far-seeker


Note that because the Lillypad does not use the same pin layout as a traditional Arduino there is no advantage to getting an Arduino Shield.


True, but I'm not sure how comfortable gregtom6 would be wiring up a perboard to make a custom circuit based off one of these designs.  Furthermore even though the form factor isn't an advantage, shields usually have exisiting Arduino examples and/or libraries available...

gregtom6

#9
Aug 14, 2012, 12:46 pm Last Edit: Aug 14, 2012, 07:40 pm by gregtom6 Reason: 1
For-Seeker: but what do I need with the ICs? What kind of shield do I need to get this work for me?

Or the best question would be: what things should I watch when I search for a good shield to get that kind of IC work for me?


http://www.forums.adafruit.com/viewtopic.php?f=31&t=11551
Well, it seems to me the Wave shield works with the lilypad. If it's true, the only question is it would be the better choice or not.

Far-seeker


For-Seeker: but what do I need with the ICs? What kind of shield do I need to get this work for me?

OK sorry for muddling things, if you have a module or shield that's build around a voice synthesizer you don't need the IC (because it's already included).  I specifically mentioned that type of IC to let you know they exisit and indicate that they are a different way to do what you want.  Also, as johnwasser and I were discussing if you get a pre-made audio or voice synthesizer circuit it doesn't need to be a shield, it would just be easier to find material to help you write a program to use it.


Or the best question would be: what things should I watch when I search for a good shield to get that kind of IC work for me?


For any project you should consider the function, and possibily form, you want for your eventual device.

In this particular case, if there are audio or video files available that demonstrate how well an electronics module either plays recordings or generates speech you should check them out.  Also spend a little time searching both the Arduino forums and any affiliated with the organization you are purchasing from, to see any examples of what other people have done with that product as well as if there are any common or particularly vexing problems with it.  Ultimately you want to find something that will do what you want it to, not take more time and effort to integrate in your design than you are willing to spend, and not just be effective but cost-effective as well.  All these things can be very subjective, so while the boards I discussed and linked to would work in your project you will always be the one to determine what's "best".

Back to the "form" considerations... Since you are using the Lilypad I'll presume you want this to be a portable device, likely incorporated into a garment of some kind.  As johnwasser pointed out, with the Lilypad the shield form factor has no innate advantage over a similar circuit on a different shaped PCB.  If you can find a design not in a shield that is functionally the same or similar and has decent documentation and/or available Arduino libraries and/or examples, it wouldn't be a problem to use it instead of anything mentioned so far.  In fact, if it is smaller it might be better for your particular application (again presumming it's intended to be portable/wearable).

Hopefully this reply clarifies things for you.

the-rebel-agent

This one will work and only cost 6 dollars.
http://arduino.cc/forum/index.php/topic,117009.0.html

gregtom6

1. How can I use this for Lilypad? I would like an exact answer. Is it sure that I can use that?
2. Where can I order that?

the-rebel-agent

already read everything you need in the other post.

Go Up