File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed
examples/examples-tts/streams-talkie-audiokit Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change
1
+ /* *
2
+ * @file streams-talkie-audiokit.ino
3
+ * We use the TalkiePCM TTS library to generate the audio
4
+ * You need to install https://github.com/pschatzmann/TalkiePCM
5
+ * @author Phil Schatzmann
6
+ * @copyright GPLv3
7
+ */
8
+
9
+ #include " AudioTools.h"
10
+ #include " AudioTools/AudioLibs/AudioBoardStream.h" // https://github.com/pschatzmann/arduino-audio-driver
11
+ #include " TalkiePCM.h" // https://github.com/pschatzmann/TalkiePCM
12
+ #include " Vocab_US_Large.h"
13
+
14
+ const AudioInfo info (8000 , 2 , 16 );
15
+ AudioBoardStream out (AudioKitEs8388V1); // Audio sink
16
+ // CsvOutput<int16_t> out(Serial);
17
+ TalkiePCM voice (out, info.channels);
18
+
19
+ void setup () {
20
+ Serial.begin (115200 );
21
+ AudioLogger::instance ().begin (Serial, AudioLogger::Info);
22
+ // setup AudioKit
23
+ auto cfg = out.defaultConfig ();
24
+ cfg.copyFrom (info);
25
+ out.begin (cfg);
26
+
27
+ Serial.println (" Talking..." );
28
+ }
29
+
30
+ void loop () {
31
+ voice.say (sp2_DANGER);
32
+ voice.say (sp2_DANGER);
33
+ voice.say (sp2_RED);
34
+ voice.say (sp2_ALERT);
35
+ voice.say (sp2_MOTOR);
36
+ voice.say (sp2_IS);
37
+ voice.say (sp2_ON);
38
+ voice.say (sp2_FIRE);
39
+ voice.silence (1000 );
40
+ }
You can’t perform that action at this time.
0 commit comments