I would like to play a wav file (spoken words) from my Arduino. I do not want to add a sound shield. Is there a way to play a sound through an output pin? The quality does not have to be great.
I helped someone with a similar question. The results are in my github repo at https://github.com/linhartr22/count. This example uses the PWM library and includes a reference to the article I used to learn how to convert audio files to MP3 with proper settings for the PWM libary. It plays audio through an 8 ohm speaker or a piezo buzzer connected directly to the Arduino.
The PCMAudio example shows how to play audio data via PWM. Note that you will need to access the MCU at a low level in order to do this; the Arduino libraries don't provide enough control over the hardware.
Yes, you can - see http://www.instructables.com/id/Simple-Wav-Player-Using-Arduino/
Space is quite limited, unless you use an SD card.
Yes, I did a project yesterday to play recorded voice. You don't need a speaker module.
Just connect the speaker via a resistor to one of Arduino PWM output. Then Connect a micro-sd card module. Format your micro-sd card with FAT32 Option.
Use Sample wave converter to convert your sound files and select the options as 16,000Hz Mono 8Bit. You are all done. Use tmrpcm library. It's all easy.
old post but still a good question...
Here is a tutorial for playing 8 bit 33khz audio using the Adafruit M0 Express. You can play ~60 seconds of audio from the 2MB onboard flash through the 10bit Analog out pin. https://github.com/hydronics2/SamdAudio
two other audio board solutions that offer near 16bit quality...
teensy3.2, teensy3.5, teensy3.6 (you can play out using the Analog pin without the audio shield but the audio shield has a nice 1/8" jack
@Hoytman i think this arduino library can help you a lot https://sensorium.github.io/Mozzi/