File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change
1
+ #pragma once
2
+
3
+ #include " SimpleTTSBase.h"
4
+
5
+ namespace simple_tts {
6
+
7
+ #include " en/all.h"
8
+
9
+ /* *
10
+ * @brief A dictionary which is based on audio files that can be accessed via
11
+ * URLs
12
+ * @author Phil Schatzmann
13
+ * @copyright GPLv3
14
+ */
15
+ class AudioDictionaryURL : public AudioDictionaryBase {
16
+ public:
17
+ AudioDictionaryURL (URLStream &urlStream, const char *url) {
18
+ p_url = &urlStream;
19
+ url_cstr = url;
20
+ }
21
+
22
+ AudioStream *get (const char *word) {
23
+ url_str = url_cstr;
24
+ url_str.add (" /" );
25
+ url_str.add (word);
26
+ LOGI (" Using url: %s" , url_str.c_str ());
27
+ p_url->begin (url_str.c_str ());
28
+ return p_url;
29
+ }
30
+
31
+ protected:
32
+ const char *url_cstr;
33
+ StrExt url_str;
34
+ URLStream *p_url;
35
+ };
36
+
37
+ } // namespace simple_tts
You can’t perform that action at this time.
0 commit comments