Package org.sodbeans.phonemic.tts

Examples of org.sodbeans.phonemic.tts.TextToSpeech


    public void actionPerformed(ActionEvent e) {

        // Get the compiler, text-to-speech engine, and Windows controls
        org.sodbeans.compiler.api.Compiler compiler =
                Lookup.getDefault().lookup(org.sodbeans.compiler.api.Compiler.class);
        TextToSpeech speech = TextToSpeechFactory.getDefaultTextToSpeech();

        if (!TODUtils.isTODEnabled()) {
            // If the debugger is inactive, and you aren't running a program,
            // then there is nothing to do
            if (!compiler.isExecuting() && !compiler.isDebuggerActive())
               return;

            // Stop the debugger
            compiler.stopDebugger(false);
            speech.stop();
            String message = "Stop debugging";
            if (TextToSpeechOptions.isScreenReading()) {
                speech.speak(message, SpeechPriority.HIGHEST);
            }
        } else {
            // Stop the TOD Session.
            TODSessionFactory.getDefault().getActionHandler().stop();
            speech.stop();
            String message = "Debugging session ended";
            if (TextToSpeechOptions.isScreenReading()) {
                speech.speak(message, SpeechPriority.HIGHEST);
            }
        }
    }
View Full Code Here


    @Override
    public void actionPerformed(ActionEvent e) {
        // Get the compiler, text-to-speech engine, and Windows controls
        org.sodbeans.compiler.api.Compiler compiler =
                Lookup.getDefault().lookup(org.sodbeans.compiler.api.Compiler.class);
        TextToSpeech speech = TextToSpeechFactory.getDefaultTextToSpeech();

        // If debugger is active, stop it
        if (compiler.isDebuggerActive()) {
            compiler.stopDebugger(true);
        //    windowService.localVariableWindowStop();
        }

        // Get the project the user is referencing
        Project proj = getAppropriateProject(isMainMenuRequest(e));
        MainFileProvider provider = getMainFile(proj);
        if(!isProjectSetupCorrectly(provider)) {
            return;
        }
        FileObject docs = provider.getDocumentsDirectory();
        compiler.setDocumenationFolder(FileUtil.toFile(docs));
        if(compiler.document()) {
                    //speak some kind of message saying that documentation was generated
            if (TextToSpeechOptions.isScreenReading())
                speech.speak("Documentation was built successfully", SpeechPriority.HIGH);
        }
        else {
            if (TextToSpeechOptions.isScreenReading())
                speech.speak("Error while building documentation", SpeechPriority.HIGH);
        }
    }
View Full Code Here

TOP

Related Classes of org.sodbeans.phonemic.tts.TextToSpeech

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.