Uses 35477K of libraries. Click here for Pure Java version (741L/5K/18K).
1 | !7 |
2 | |
3 | lib 1009633 // MaryTTS |
4 | lib 1009635 // marytts / voice-cmu |
5 | lib 1009636 // marytts / english |
6 | //lib 1009637 // marytts / client |
7 | |
8 | import javax.sound.sampled.AudioInputStream; |
9 | |
10 | import marytts.LocalMaryInterface; |
11 | import marytts.exceptions.MaryConfigurationException; |
12 | import marytts.exceptions.SynthesisException; |
13 | import marytts.util.data.audio.MaryAudioUtils; |
14 | |
15 | p { |
16 | File outputFile = prepareProgramFile("out.wav"); |
17 | S inputText = "Hello world"; |
18 | |
19 | // init mary |
20 | fixContextClassLoader(); |
21 | new LocalMaryInterface mary; |
22 | |
23 | // synthesize |
24 | AudioInputStream audio = mary.generateAudio(inputText); |
25 | |
26 | // write to output |
27 | double[] samples = MaryAudioUtils.getSamplesAsDoubleArray(audio); |
28 | MaryAudioUtils.writeWavFile(samples, f2s(outputFile), audio.getFormat()); |
29 | print("Output written to " + outputFile + " (" + l(outputFile) + ")"); |
30 | } |
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1009632 |
Snippet name: | MaryTTS Test |
Eternal ID of this version: | #1009632/18 |
Text MD5: | 2c8a8fda49e07a1f002deef63e9eb395 |
Transpilation MD5: | 9cfd878672020f91c6eba4dde64a8cb4 |
Author: | stefan |
Category: | javax / speech |
Type: | JavaX source code |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-08-12 20:11:45 |
Source code size: | 869 bytes / 30 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 527 / 675 |
Version history: | 17 change(s) |
Referenced in: | [show references] |