Quantcast
Channel: Library Questions - Processing 2.x and 3.x Forum
Viewing all articles
Browse latest Browse all 2896

Text-to-Speech - how to get additonal voice libraries to work

$
0
0

Hi, Please could anyone give me advice on how to get text-to-speech working using the ttslib wrapper and MBOLA voice files in Processing???

I've implemented FreeTTS which provides text-to-speech functionality in Processing, but can only get it working with its in-built "kevin16" voice. I've been trying to add alternative voices from the MBOLA library (which FreeTTS is designed to interface with) and have tried placing the voice files I want to various directories, but have not been able to get them picked up from any of them.

The following test code using FreeTTS works:

import com.sun.speech.freetts.Voice;

import com.sun.speech.freetts.VoiceManager;

    String voiceName = "kevin16"; // the only usable general purpose voice

    VoiceManager voiceManager = VoiceManager.getInstance();

    Voice voice = voiceManager.getVoice(voiceName);

    voice.allocate();
    voice.speak("Oh man this is a crappy voice");
    voice.deallocate();

("kevin16" really is a lousy voice!!)

I've also tried using the ttslib wrapper, but can't get that or MBOLA voices (I'm trying to use the voice 'en1') to be picked up, using the following test code:

import guru.ttslib.*;

TTS tts;

void setup() { System.setProperty("mbrola.base", "\freetts-1.2");

tts = new TTS("mbrola_en1"); }

void draw() { }

void mousePressed() { tts.speak("Hi! I am a speaking Processing sketch"); }

I'd really appreciate suggestions of what I can do to get the ttslib wrapper and the MBOLA voices working (or suggestions for alternative text-to-speech set-ups that work in Processing).

Thanks a lot, Richard


Viewing all articles
Browse latest Browse all 2896

Trending Articles