TTS with Pre-Recorded Audio: Preparing the Audio Files

I the last Blog I introduced you to my new Simple TTS Arduino Library which is available on Github. I used the Text-to-Speech (TTS) functionality of Google Translate to generate the mp3 files, which was quite tedious to do manually. Then I executed xxd to generate a .h file from an mp3 recording with: xxd -i mp3file.mp3 header-file.h The header files are then made available with the logic that can be found in AudioDictionary.h Tools Read more

TTS with Pre-Recorded Audio: Building a Talking Clock

Last year I was digging into Arduino Based TTS Solutions and came to the conclusion that the available engines will not provide any quality audio and therefore recommended to consider an approach which is based on recorded audio samples. Today I took the opportunity to create the new arduino-simple-tts project which is based on this approach. As a proof of concept I have implemented the speaking of numbers and of the output of time. All Read more

Using stdio.h file operations on Arduino ESP32 to access a SD Drive

So far I was always using the Arduino based SD API to access files on a SD drive. But there are plenty of existing libraries which expect to use stdio.h operations to work with files. So I was digging into the topic and to my surprise this is possible: You just need to mount the SD card: #include <FS.h> #include <SD_MMC.h> #include <stdio.h> void begin() { if(!SD_MMC.begin(“/sdcard”)){ Serial.println(“Card Mount Failed”); return; } } The value Read more

Maximilian DSP on the Arduino ESP32 ?

Quite some time ago I have identified Maximilian as interesting tool which can be used to implement synthezisers. Maximilian is a cross-platform and multi-target audio synthesis and signal processing library. So I was wondering if it is possible to use it on Arduino based Microcontrollers. In the meantime the adapted library is compiling after some slight changes. After that I started to extend my Arduino Audio Tools to provide an nice integration and a first Read more

Building an Arduino ESP32 Audio Bluetooth Receiver with output to SPDIF with just a few lines of code.

The last couple of days I have spent to add SDIF audio output support to my Arduino AudioTools library and I would like to thank joba-1 for testing the solution. Together with my ESP32-A2DP Bluetooth library we can build now a Bluetooth receiver that outputs the audio signals as SPDIF with just a few lines of code: The Arduino Sketch Here is the Arduino Sketch #define USE_A2DP #include “AudioConfigLocal.h” #include “AudioTools.h” BluetoothA2DPSink a2dp_sink; SPDIFStream spdif; Read more

AAC Encoding on the AudioKit

For quite some time I was wondering why my arduino-fdk-aac library was using so much memory for the encoding of AAC files. Now that I have an AudioKit working with the debugger it was easier to analyze the situation and – oh boy – I found quite some errors. So I decided to address the issues and published a new corrected release. Arduino Sketch Here is a quick Arduino Sketch which demonstrates how to use Read more

PlatformIO-Arduino: Debugging the ESP32 AudioKit with OS/X and Raspberry PI OS

I was planning to use the PlatformIO Debugger for quite some time: Here is a good overview of how to get started. I can also recommend Low-cost ESP32 In-circuit Debugging from Manuel BL. I wanted to use it both with OS/X and Linux: Most tutorials however describe Windows and therefore were not helpful to resolve my issues. It took me quite some time to have a working solution. Therefore I would like to document some Read more

Using the ESP32 LyraT Audio Board with Arduino

After using the AI Thinker AudioKit I wanted to make sure that my libraries also work with the ESP32 LyraT Board from Espressif. There were basically just 2 stumbling blocks: Deploying Code: From the AudioKit I was used that I can plug in the UART cable and upload the code from Arduino w/o pushing any buttons. This is different in LyraT. You need to connect both the UART and Power Cable and then you need Read more

Using the SAM TTS Engine with the Audiokit

I decided to use my SAM TTS Library with the AI Thinker Audio Kit. Unfortunately I found quite some bugs in my library that I needed to correct first, but now it is working as expected. Here is the Arduino Sketch #include “sam_arduino.h” #include “AudioTools.h” #include “AudioLibs/AudioKit.h” AudioKitStream kit; SAM sam(kit); const char* text = “Hallo my name is SAM”; void setup(){ Serial.begin(115200); AudioLogger::instance().begin(Serial, AudioLogger::Info); // setup i2s auto cfg = kit.defaultConfig(); cfg.bits_per_sample = sam.bitsPerSample(); Read more

Microcontrollers and Apple MIDI

My Arduino MIDI Library is using Arduino Streams as a basic design feature and therefore it supports Bluetooth, TCP/IP and UDP. I am usually programming on an old Macbook, so I was wondering if I can extend my library to support Apple MIDI as well. After some research I found that Apple MIDI communicates on 2 UDP ports: one for the session management and the other for the midi data. I wanted to avoid me Read more