snapshot
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
# Using FLITE Speach to Text
|
||||
|
||||
I am providing a simple sketch which generates sound data with the Flite text to speach engine.
|
||||
You need to install https://github.com/pschatzmann/arduino-flite
|
||||
|
||||
In this demo we provide the result as WAV stream which can be listened to in a Web Browser
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
/**
|
||||
* @file streams-flite-webserver_wav.ino
|
||||
*
|
||||
* @author Phil Schatzmann
|
||||
* @copyright GPLv3
|
||||
*
|
||||
*/
|
||||
|
||||
#include "flite_arduino.h"
|
||||
#include "AudioTools.h"
|
||||
#include "AudioTools/Communication/AudioHttp.h"
|
||||
|
||||
AudioWAVServer server("ssid","password");
|
||||
|
||||
// Callback which provides the audio data
|
||||
void outputData(Print *out){
|
||||
Serial.print("providing data...");
|
||||
Flite flite(*out);
|
||||
|
||||
// Setup Audio Info
|
||||
FliteOutputBase *o = flite.getOutput();
|
||||
|
||||
flite.say("Hallo, my name is Alice");
|
||||
Serial.printf("info %d, %d, %d", o->sampleRate(), o->channels(), o->bitsPerSample());
|
||||
}
|
||||
|
||||
void setup(){
|
||||
Serial.begin(115200);
|
||||
server.begin(outputData, 8000,1,16);
|
||||
}
|
||||
|
||||
|
||||
// Arduino loop
|
||||
void loop() {
|
||||
// Handle new connections
|
||||
server.copy();
|
||||
}
|
||||
Reference in New Issue
Block a user