This commit is contained in:
2026-02-12 21:00:02 -08:00
parent 77f8236347
commit 8bdbf227ca
1141 changed files with 1010880 additions and 2 deletions

View File

@@ -0,0 +1,14 @@
# Simple TTS
I am providing a simple sketch which generates sound data with my Simple TTS text to speach engine that
uses a configurable library of prerecorded words.
You need to install https://github.com/pschatzmann/arduino-simple-tts
In this demo we provide the result as I2SStream but you can easly replace with any other output stream.
More examples can be found at https://github.com/pschatzmann/arduino-simple-tts/tree/main/examples
## External DAC
for defails see the [Wiki](https://github.com/pschatzmann/arduino-audio-tools/wiki/External-DAC)

View File

@@ -0,0 +1,41 @@
/**
* @file streams-tts-i2s.ino
* You need to install https://github.com/pschatzmann/arduino-simple-tts
* @author Phil Schatzmann
* @copyright GPLv3
*
*/
#include "SimpleTTS.h"
#include "AudioTools/AudioCodecs/CodecMP3Helix.h"
//#include "AudioTools/AudioLibs/AudioBoardStream.h"
NumberToText ntt;
I2SStream out; // Replace with desired class e.g. AudioBoardStream, AnalogAudioStream etc.
MP3DecoderHelix mp3;
AudioDictionary dictionary(ExampleAudioDictionaryValues);
TextToSpeech tts(ntt, out, mp3, dictionary);
int64_t number = 1;
void setup(){
Serial.begin(115200);
AudioToolsLogger.begin(Serial, AudioToolsLogLevel::Warning);
// setup out
auto cfg = out.defaultConfig();
cfg.sample_rate = 24000;
cfg.channels = 1;
out.begin(cfg);
}
void loop() {
// speach output
Serial.println("providing data...");
ntt.say(number);
number +=1;
delay(1000);
}