Examples of Voice


Examples of marytts.modules.synthesis.Voice

      return;
    }
    if(text==null) {
      return;
    }
    Voice voice=null;
    if (StringUtils.isBlank(voiceName)) {
            logger.debug("Mary TTS: {} (Voice not set. Using default voice {}).", new String[] { text, defaultVoice.toString() });
            voice = defaultVoice;
    } else {
            voice = Voice.getVoice(voiceName);
            logger.debug("Mary TTS: {} (Voice: {})", new String[] { text, voiceName });
    }
   
    if (voice != null) {
      // Workaround: we have to set the Locale first, because only in the LocalMaryInterface.setLocale() method the required private method
      // LocalMaryInterface.setAudioFileFormatForVoice() method is called. After that we can set the voice, otherwise an NPE occurs
      marytts.setLocale(voice.getLocale());
      marytts.setVoice(voice.getName());
      try {
        AudioInputStream audio = marytts.generateAudio(text);
        AudioPlayer player = new AudioPlayer(audio);
        player.start();
        player.join();
View Full Code Here

Examples of org.axsl.speech.Voice

            final FoValue keyword = this.convertValueToFoValue(value());
            if (keyword == FoValue.INHERIT) {
                return getValueNoInstance(context, fobj);
            }

            final Voice voice = fobj.getVoice(context);
            switch (keyword) {
            case X_LOW: {
                return voice.pitchExtraLow();
            }
            case LOW: {
                return voice.pitchLow();
            }
            case MEDIUM: {
                return voice.pitchMedium();
            }
            case HIGH: {
                return voice.pitchHigh();
            }
            case X_HIGH: {
                return voice.pitchExtraHigh();
            }
            default: {
                throw this.unexpectedRetrieval();
            }
            }
View Full Code Here

Examples of org.axsl.speech.Voice

            final FObj fobj) {
        final FObj parent = fobj.effectiveParent(context);
        if (parent != null) {
            return parent.traitPitch(context);
        }
        final Voice voice = fobj.getVoice(context);
        return voice.pitchMedium();
    }
View Full Code Here

Examples of org.axsl.speech.Voice

         * generally used right now. Second, it is (for now anyway) relatively
         * inexpensive to compute. */
        final SpeechServer speechServer = this.getSpeechServer();
        final String[] familyList = this.getPropertyList().getVoiceFamily(this,
                context);
        Voice selectedVoice = null;
        try {
            selectedVoice = speechServer.selectVoiceXsl(familyList);
        } catch (final SpeechException e) {
            this.getLogger().error("Error creating Voice.\n"
                    + this.getContextMessage());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.