Uses 35477K of libraries. Click here for Pure Java version (741L/5K/18K).
!7 lib 1009633 // MaryTTS lib 1009635 // marytts / voice-cmu lib 1009636 // marytts / english //lib 1009637 // marytts / client import javax.sound.sampled.AudioInputStream; import marytts.LocalMaryInterface; import marytts.exceptions.MaryConfigurationException; import marytts.exceptions.SynthesisException; import marytts.util.data.audio.MaryAudioUtils; p { File outputFile = prepareProgramFile("out.wav"); S inputText = "Hello world"; // init mary fixContextClassLoader(); new LocalMaryInterface mary; // synthesize AudioInputStream audio = mary.generateAudio(inputText); // write to output double[] samples = MaryAudioUtils.getSamplesAsDoubleArray(audio); MaryAudioUtils.writeWavFile(samples, f2s(outputFile), audio.getFormat()); print("Output written to " + outputFile + " (" + l(outputFile) + ")"); }
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: | 528 / 675 |
Version history: | 17 change(s) |
Referenced in: | #1009639 - maryTTS_init #1009641 - maryTTS_german - TODO: better voice selection |