Package com.sun.speech.freetts

Examples of com.sun.speech.freetts.ValidationException


        String mbrolaBase = Utilities.getProperty("mbrola.base", null);
        File mbrolaBinary = new File(mbrolaVoice.getMbrolaBinary());
        File mbrolaVoiceDB = new File(mbrolaVoice.getDatabase());

        if (mbrolaBase == null || mbrolaBase.length() == 0) {
            throw new ValidationException
                ("System property \"mbrola.base\" is undefined. " +
                 "You might need to set the MBROLA_DIR environment variable.");
        }
        if (!mbrolaBinary.exists()) {
            throw new ValidationException
                ("No MBROLA binary at: " + mbrolaVoice.getMbrolaBinary());
        }
        if (!mbrolaVoiceDB.exists()) {
            throw new ValidationException
                ("No voice database for " + mbrolaVoice.getName() +
                 " at: " + mbrolaVoice.getDatabase());
        }
    }
View Full Code Here


                invalidCount++;
                validationMessage += (ve.getMessage() + "\n");
            }
        }
        if (invalidCount == voices.length) {
            throw new ValidationException
                (validationMessage + getModeName() + " has no valid voices.");
        }
    }
View Full Code Here

TOP

Related Classes of com.sun.speech.freetts.ValidationException

Copyright © 2018 www.massapicom. 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.