This commit is contained in:
2026-02-12 21:00:02 -08:00
parent cb1f2b0efd
commit 40714a3a68
1141 changed files with 1010880 additions and 2 deletions

View File

@@ -0,0 +1,7 @@
# Using SAM Speach to Text
I am providing a simple sketch which generates sound data with the TTS text to speach engine.
You need to install https://github.com/pschatzmann/TTS
In this demo we provide the result as WAV stream which can be listened to in a Web Browser

View File

@@ -0,0 +1,34 @@
/**
* @file streams-tts-webserver_wav.ino
*
* @author Phil Schatzmann
* @copyright GPLv3
*
*/
#include "AudioTools.h"
#include "AudioTools/Communication/AudioHttp.h"
#include "TTS.h"
AudioWAVServer server("ssid","password");
// Callback which provides the audio data
void outputData(Print *out){
Serial.print("providing data...");
TTS tts = TTS(*out);
tts.sayText("Hallo, my name is Alice");
}
void setup(){
Serial.begin(115200);
AudioToolsLogger.begin(Serial, AudioToolsLogLevel::Info);
// start data sink
TTSInfo info = TTS::getInfo();
server.begin(outputData, info.sample_rate, info.channels, info.bits_per_sample);
}
// Arduino loop
void loop() {
// Handle new connections
server.copy();
}