snapshot
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
# Using SAM Speach to Text
|
||||
|
||||
I am providing a simple sketch which generates sound data with the SAM text to speach engine.
|
||||
You need to install https://github.com/pschatzmann/arduino-SAM
|
||||
|
||||
The output goes to a ‘AI Thinker Audio Kit’.
|
||||
|
||||
<img src="https://pschatzmann.github.io/Resources/img/audio-toolkit.png" alt="Audio Kit" />
|
||||
|
||||
### Dependencies
|
||||
|
||||
You need to install the following libraries:
|
||||
|
||||
- [Arduino Audio Tools](https://github.com/pschatzmann/arduino-audio-tools)
|
||||
- [Audio Driver](https://github.com/pschatzmann/arduino-audio-driver)
|
||||
- [SAM](https://github.com/pschatzmann/arduino-SAM)
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
/**
|
||||
@file streams-sam-audiokit.ino
|
||||
|
||||
@author Phil Schatzmann
|
||||
@copyright GPLv3
|
||||
|
||||
*/
|
||||
|
||||
#include "AudioTools.h"
|
||||
#include "AudioTools/AudioLibs/AudioBoardStream.h"
|
||||
#include "sam_arduino.h"
|
||||
|
||||
AudioBoardStream kit(AudioKitEs8388V1);
|
||||
SAM sam(kit);
|
||||
|
||||
const char* text = "Hallo my name is SAM";
|
||||
void setup(){
|
||||
Serial.begin(115200);
|
||||
|
||||
// setup audiokit i2s
|
||||
auto cfg = kit.defaultConfig();
|
||||
cfg.bits_per_sample = sam.bitsPerSample();
|
||||
cfg.channels = sam.channels();
|
||||
cfg.sample_rate = sam.sampleRate();
|
||||
cfg.sd_active = false;
|
||||
kit.begin(cfg);
|
||||
|
||||
sam.say(text);
|
||||
}
|
||||
|
||||
void loop() {
|
||||
// feed watchdog
|
||||
delay(100);
|
||||
}
|
||||
Reference in New Issue
Block a user