Using a speech engine to highlight words: Difference between revisions
Using a speech engine to highlight words (view source)
Revision as of 12:19, 15 February 2024
, 3 months ago→{{header|Wren}}: Minor tidy
Thundergnat (talk | contribs) m (syntax highlighting fixup automation) |
m (→{{header|Wren}}: Minor tidy) |
||
(One intermediate revision by one other user not shown) | |||
Line 443:
{{libheader|Wren-str}}
The ability to call external processes such as ''espeak'' is expected to be added to Wren-cli in the next release. In the meantime, we embed the following Wren script in a minimal C host (no error checking) to complete this task.
<syntaxhighlight lang="
import "./str" for Str
Line 472:
<br>
We now embed this in the following C program, compile and run it.
<syntaxhighlight lang="c">
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Line 552 ⟶ 554:
WrenVM* vm = wrenNewVM(&config);
const char* module = "main";
const char* fileName = "
char *script = readFile(fileName);
wrenInterpret(vm, module, script);
Line 559 ⟶ 561:
return 0;
}</syntaxhighlight>
{{omit from|EasyLang}}
|