Libraryless. Click here for Pure Java version (4039L/28K).
1 | static File flite_makeWAV(S voice, S text) { |
2 | if (!isOnPATH("flite")) fail("flite not installed"); |
3 | File wavFile = javaxCachesDir("flite.wav"); |
4 | S cmd = "flite"; |
5 | if (nempty(voice)) { |
6 | File f = flite_findVoice(voice); |
7 | cmd += " -voice " + (f != null ? platformQuote(f) : voice); |
8 | } |
9 | cmd += " -t " + platformQuote(text) + " -o " + platformQuoteOpt(wavFile); |
10 | backtick(cmd); |
11 | ret wavFile; |
12 | } |
Began life as a copy of #1020529
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: | #1027012 |
Snippet name: | flite_makeWAV - use FLite speech engine (if installed) |
Eternal ID of this version: | #1027012/2 |
Text MD5: | 3bb101f16b8562756e48f39a9566f546 |
Transpilation MD5: | 2c06b2a29b84f8b3eb46783bf97947bc |
Author: | stefan |
Category: | javax / speech |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-02-07 00:28:28 |
Source code size: | 413 bytes / 12 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 379 / 469 |
Version history: | 1 change(s) |
Referenced in: | [show references] |