Transpiled version (2716L) is out of date.
1 | sS vosk_postprocess(S voskOutput, O... _) {
|
2 | optPar bool verbose; |
3 | new LS out; |
4 | for (S s : tlft(voskOutput)) pcall {
|
5 | if (startsWith(s, "{")) {
|
6 | if (verbose) print("JSON line? " + s);
|
7 | S text = cast jsonDecodeMap(s).get('text);
|
8 | if (nempty(text)) out.add(text); |
9 | } |
10 | } |
11 | ret lines_rtrim(out); |
12 | } |
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
| Snippet ID: | #1026987 |
| Snippet name: | vosk_postprocess |
| Eternal ID of this version: | #1026987/4 |
| Text MD5: | dd87dc7380670ec445d14536ab9f23ff |
| Author: | stefan |
| Category: | javax / speech recognition |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2020-02-07 00:15:22 |
| Source code size: | 331 bytes / 12 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 588 / 723 |
| Version history: | 3 change(s) |
| Referenced in: | [show references] |