class Jsapi10SynthesizedOutput implements SynthesizedOutput, SpeakableListener,
        StreamableSynthesizedOutput {

    @Override
    public void queueSpeakable(final SpeakableText speakable, final String id,
            final DocumentServer server) throws NoresourceError, BadFetchError {
        if (synthesizer == null) {
            throw new NoresourceError("no synthesizer: cannot speak");
        }
        sessionId = id;
        documentServer = server;
        synchronized (queuedSpeakables) {
            queuedSpeakables.offer(speakable);

            // Do not process the speakable if there is some ongoing processing
            if (queuedSpeakables.size() > 1) {
                return;
            }
        }

        // Otherwise process the added speakable asynchronous.
        final Runnable runnable = new Runnable() {
            /**
             * {@inheritDoc}
             */
            @Override
            public void run() {
                try {
                    processNextSpeakable();
                } catch (NoresourceError e) {
                    notifyError(e);
                } catch (BadFetchError e) {
                    notifyError(e);
                }
            }
        };
        final Thread thread = new Thread(runnable);
        thread.start();
    }

    public  Jsapi10SynthesizedOutput(final SynthesizerModeDesc defaultDescriptor);

}