Filtering Out Metadata Before Decoding MP3

MP3 files can contain metadata that stores information about the title, the author etc. If you send an MP3 stream with metadata to a decoder, the logic is usually resilient enough to skip this automatically. However there can be some cases where the codec can’t cope and is crashing. One way to deal with this, is to remove the metadata from the file. But a more flexible solution is to just filter out the metadata Read more…

TinyUSB Audio: Testing the Microphone Quality using a Stream

In my last blogs, I described how I managed to extend TinyUSB to provide an simple USB Audio device in Arduino. So far I have been using some randon numbers to generate noise. This is not very helpful to check if we lost some samples. A SawTooth wave is much more convinient. We can use the AudioTools to generate this. Here is the example sketch, that also shows how we can define an Arduino Stream Read more…

A new Architechture for Talkie: TalkiePCM

There are quite a few popular TTS libraries for Arduino but most of them suffer from the same problem: The TTS function is not properly separated from the output function. Architechture In a properly architected solution we would have a A TTS function which produces platfrom independent PCM data An output function or library to process the PCM data. In Arduino we have the abstact Print class which is used by everything to which you Read more…

TinyUSB: Audio on an Seeeduino Xiao in Arduino

In the last blog, I described how I managed to provide an USB Audio device for a Speaker and a Microphone and the bumpy journey to it. I also wanted the Headset sceanario to work where both the input and output of audio is supported. I was searchig very long why my first implementation did not work until I realized, that actually it did when Serial (CDC) was deactivated! The symptoms were like this: Activating Read more…

TinyUSB: Audio on an RP2040 in Arduino

When I first had a look at implementing an Audio USB device for the RP2040 with TinyUSB, I could make things work, but taking up the task to make this work in Arduino was too big. Then Adafruit released their TinyUSB for Arduino that was quite nicely integrated into the RP2040 Arduino core of Earle Phil Hower. I was hoping that Adafruit would provide some audio implementation with examples. Since this did not happen, I Read more…

Arduino AudioTools V1.0.0

I finally managed to release the 1.0 version of my Arduino AudioTools library. It contains all the functionality that I have initially planned for and compared to the 0.9.9 release consists of a major restructuring of the source code directory. I was conducting a poll, to confirm if I should go ahead with this change and a majority of users agreed to have this implemented. Here is the new directory structure: All the core functionality Read more…

Testing I2S on a STM32H7

In my last blogs, I introduced you to the powerfull STM32H743VIT6 microcontroller and demonstrated the analog and PWM audio output using the Arduino Audio Tools library. I finally managed to extend the stm32-i2s library and so it the time now that I can demonstrate that we can also use I2s as well: I am using the demo sketch from the AudioTools w/o any changes: #include “AudioTools.h” AudioInfo info(44100, 2, 16); SineWaveGenerator<int16_t> sineWave(32000); GeneratedSoundStream<int16_t> sound(sineWave); I2SStream Read more…

Testing the Audio PWM output on a STM32H7

In my last blog, I described the analog audio output using the Arduino Audio Tools library: The STM32H743VIT6 microcontroller is quite powerful but we only have max 2 DAC pins available! This restriction falls when we use PWM: We use a PWM frequency above the hearing range (30khz) and modulate the PWM Duty Cycle with the audio signal. Compared to the demo pwm sine example, I increased the sample rate to 44100 and the channels Read more…

Analog Audio Output on an STM32H7

In my last post, I have introduced you to the powerful STM32H743VIT6 microcontroller. Now it is time to test some audio output. I don’t have any special implementation for the output of analog audio for the STM32H7, but I decided to try to use my generic implementation that is part of by my AudioTools library which is based on the Arduino analogWrite() in combination with a timer. I adapted the standard example to use stereo Read more…

The Power of STM32H7 Microcontrollers

There are different cheap but powerful Chinese development boards with different STM32H7 chips from DevEBox and WeAct. STM32H750VBT6 – 128K flash STM32H743VIT6 – 2048K flash I recommend to use the STM32H743VIT6 with the 2MB of flash memory. Please note that this is still only half of what you get with an ESP32 but you get an SD drive and 8MB SPI/QSPI Flash! The STM32H7XX processors are based on the 32-bit Arm Cortex®-M7 core, running at Read more…