Use the chrome.ttsEngine API to implement a text-to-speech(TTS) engine using an extension. If your extension registers using this API, it will receive events containing an utterance to be spoken and other parameters when any extension or Chrome App uses the tts API to generate speech. Your extension can then use any available web technology to synthesize and output the speech, and send events back to the calling function to report the status.
Use the chrome.ttsEngine API to implement a text-to-speech(TTS) engine using an extension. If your extension registers using this API, it will receive events containing an utterance to be spoken and other parameters when any extension or Chrome App uses the tts API to generate speech. Your extension can then use any available web technology to synthesize and output the speech, and send events back to the calling function to report the status. * available since Chrome 34 * https://developer.chrome.com/extensions/ttsEngine
(tap-all-events chan)
Taps all valid non-deprecated events in chromex.ext.tts-engine namespace.
Taps all valid non-deprecated events in chromex.ext.tts-engine namespace.
(tap-on-pause-events channel & args)
Optional: if an engine supports the pause event, it should pause the current utterance being spoken, if any, until it receives a resume event or stop event. Note that a stop event should also clear the paused state.
Events will be put on the |channel| with signature [::on-pause []].
Note: |args| will be passed as additional parameters into Chrome event's .addListener call.
https://developer.chrome.com/extensions/ttsEngine#event-onPause.
Optional: if an engine supports the pause event, it should pause the current utterance being spoken, if any, until it receives a resume event or stop event. Note that a stop event should also clear the paused state. Events will be put on the |channel| with signature [::on-pause []]. Note: |args| will be passed as additional parameters into Chrome event's .addListener call. https://developer.chrome.com/extensions/ttsEngine#event-onPause.
(tap-on-resume-events channel & args)
Optional: if an engine supports the pause event, it should also support the resume event, to continue speaking the current utterance, if any. Note that a stop event should also clear the paused state.
Events will be put on the |channel| with signature [::on-resume []].
Note: |args| will be passed as additional parameters into Chrome event's .addListener call.
https://developer.chrome.com/extensions/ttsEngine#event-onResume.
Optional: if an engine supports the pause event, it should also support the resume event, to continue speaking the current utterance, if any. Note that a stop event should also clear the paused state. Events will be put on the |channel| with signature [::on-resume []]. Note: |args| will be passed as additional parameters into Chrome event's .addListener call. https://developer.chrome.com/extensions/ttsEngine#event-onResume.
(tap-on-speak-events channel & args)
Called when the user makes a call to tts.speak() and one of the voices from this extension's manifest is the first to match the options object.
Events will be put on the |channel| with signature [::on-speak [utterance options send-tts-event]] where:
|utterance| - The text to speak, specified as either plain text or an SSML document. If your engine does not support SSML, you should strip out all XML markup and synthesize only the underlying text content. The value of this parameter is guaranteed to be no more than 32,768 characters. If this engine does not support speaking that many characters at a time, the utterance should be split into smaller chunks and queued internally without returning an error. |options| - Options specified to the tts.speak() method.
Note: |args| will be passed as additional parameters into Chrome event's .addListener call.
https://developer.chrome.com/extensions/ttsEngine#event-onSpeak.
Called when the user makes a call to tts.speak() and one of the voices from this extension's manifest is the first to match the options object. Events will be put on the |channel| with signature [::on-speak [utterance options send-tts-event]] where: |utterance| - The text to speak, specified as either plain text or an SSML document. If your engine does not support SSML, you should strip out all XML markup and synthesize only the underlying text content. The value of this parameter is guaranteed to be no more than 32,768 characters. If this engine does not support speaking that many characters at a time, the utterance should be split into smaller chunks and queued internally without returning an error. |options| - Options specified to the tts.speak() method. Note: |args| will be passed as additional parameters into Chrome event's .addListener call. https://developer.chrome.com/extensions/ttsEngine#event-onSpeak.
(tap-on-stop-events channel & args)
Fired when a call is made to tts.stop and this extension may be in the middle of speaking. If an extension receives a call to onStop and speech is already stopped, it should do nothing (not raise an error). If speech is in the paused state, this should cancel the paused state.
Events will be put on the |channel| with signature [::on-stop []].
Note: |args| will be passed as additional parameters into Chrome event's .addListener call.
https://developer.chrome.com/extensions/ttsEngine#event-onStop.
Fired when a call is made to tts.stop and this extension may be in the middle of speaking. If an extension receives a call to onStop and speech is already stopped, it should do nothing (not raise an error). If speech is in the paused state, this should cancel the paused state. Events will be put on the |channel| with signature [::on-stop []]. Note: |args| will be passed as additional parameters into Chrome event's .addListener call. https://developer.chrome.com/extensions/ttsEngine#event-onStop.
(update-voices voices)
Called by an engine to update its list of voices. This list overrides any voices declared in this extension's manifest.
|voices| - Array of 'tts.TtsVoice' objects representing the available voices for speech synthesis.
https://developer.chrome.com/extensions/ttsEngine#method-updateVoices.
Called by an engine to update its list of voices. This list overrides any voices declared in this extension's manifest. |voices| - Array of 'tts.TtsVoice' objects representing the available voices for speech synthesis. https://developer.chrome.com/extensions/ttsEngine#method-updateVoices.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close