Title: Spoken Word
Author: Weston Ruter
Published: <strong>21 de gener de 2018</strong>
Last modified: 21 de gener de 2018

---

Cerca extensions

![](https://ps.w.org/spoken-word/assets/banner-772x250.png?rev=1806472)

Aquesta extensió **no s’ha provat en les darreres 3 versions majors del WordPress**.
Segurament no està mantinguda o suportada, i pot tenir problemes de compatibilitat
quan s’usa en versions recents del WordPress.

![](https://ps.w.org/spoken-word/assets/icon.svg?rev=1806472)

# Spoken Word

 Per [Weston Ruter](https://profiles.wordpress.org/westonruter/)

[Baixa](https://downloads.wordpress.org/plugin/spoken-word.1.0.1.zip)

 * [Detalls](https://ca.wordpress.org/plugins/spoken-word/#description)
 * [Ressenyes](https://ca.wordpress.org/plugins/spoken-word/#reviews)
 * [Desenvolupament](https://ca.wordpress.org/plugins/spoken-word/#developers)

 [Suport](https://wordpress.org/support/plugin/spoken-word/)

## Descripció

Add text-to-speech (TTS) to content, with playback controls, read-along highlighting,
multi-lingual support, and settings for rate, pitch, and voice.

 * Uses local text-to-speech engine in user’s browser. Directly interfaces with 
   the `speechSynthesis` browser API. Zero external requests or dependencies.
 * Words are selected/highlighted as they are being spoken to allow you to read 
   along.
 * Skips speaking elements that should not be read, including footnote superscripts(
   the `sup` element).
 * Pauses of different length added are between headings versus paragraphs.
 * Controls remain in view during playback, with each the current text being spoken
   persistently being scrolled into view. (Requires browser support for `position:
   sticky`.)
 * Back/forward controls allow you to skip to the next paragraph; when not speaking,
   the next paragraph to read will be selected entirely.
 * Select text to read from that point; click on text during speech to immediately
   change position.
 * Multi-lingual support, allowing embedded text with `[lang]` attribute to be spoken
   by the appropriate voice (assuming the user has it installed).
 * Settings for changing the default voice (for each language), along with settings
   for the rate of speech and its pitch. (Not supported by all engines.) Changes
   can be made while speaking.
 * Hit escape to pause during playback.
 * Voice preferences are persistently stored in `localStorage`, with changes synced
   across windows (of a given site).
 * Ability to use JS in standalone manner (such as in bookmarklet).
 * Known to work in the latest desktop versions of Chrome, Firefox, and Safari. (
   Tested on OSX.) It does not work reliably in mobile/touch browsers on Android
   or iOS, apparently due both to the (still experimental) `speechSynthesis` API
   not being implemented well enough on those systems and/or programmatic range 
   selection does not work the same way as on desktop. For these reasons, the functionality
   is disabled by default on mobile operating systems.

[Try it out](https://westonruter.github.io/spoken-word/test/example.html) on standalone
example with some test content.

#### Theme Config

The settings for Spoken Word are presented in an HTML5 `dialog` element. For browsers
that do not yet support this feature, the plugin bundles the [dialog-polyfill](https://github.com/GoogleChrome/dialog-polyfill).
The polyfill is only included if it is detected the browser does not support `dialog`
natively. The inclusion of the polyfill can be disabled by adding the following 
to your theme or plugin:

    ```
    add_filter( 'spoken_word_include_dialog_polyfill', '__return_false' );
    ```

For themes that have a sticky header (such as the nav menu in Twenty Seventeen) 
you may need to add some additional CSS to ensure that the sticky-positioned playback
controls do not get hidden behind the sticky header. For example in Twenty Seventeen,
you can add the following to the Custom CSS in the Customizer:

    ```
    @media screen and (min-width: 782px) {
        body:not(.admin-bar) .spoken-word--active {
            top: calc( 0.5em + 70px );
        }
        body.admin-bar .spoken-word--active {
            top: calc( 0.5em + 32px + 70px );
        }
    }
    ```

#### Internals

A bookmarklet can be used to load the Spoken Word functionality into any site, even
non-WordPress sites where the plugin is not installed. The key is to use the appropriate`
contentSelector`:

    ```
    ( () => {
        const link = document.createElement( 'link' );
        link.rel = 'stylesheet';
        link.href = 'https://unpkg.com/spoken-word/css/style.css';
        document.head.appendChild( link );

        const script = document.createElement( 'script' );
        script.src = 'https://unpkg.com/spoken-word/dist/spoken-word.js';
        script.addEventListener( 'load', () => {
            spokenWord.initialize( {
                contentSelector: [ /* 👈 Amend as desired. */
                    '.hentry',
                    '.entry-content',
                    '.h-entry',
                    '.e-content',
                    '[itemprop="articleBody"]',
                ].join( ', ' )
            } );
        } );
        document.head.appendChild( script );
    } )();
    ```

The `spokenWord.initialize()` function takes an object as its argument which can
have the following properties:

    ```
     * @param {string}  contentSelector         - CSS Selector to find the elements for speaking.
     * @param {Element} rootElement             - Root element within which to look for content.
     * @param {Object}  chunkifyOptions         - Options passed into chunkify.
     * @param {boolean} useDashicons            - Whether to use Dashicons.
     * @param {Object}  defaultUtteranceOptions - Default utterance options when none are supplied from localStorage.
    ```

The dialog and the controls are rendered using [Preact](https://preactjs.com/). 
For a list of all the modules used by this plugin, see the [package.json](https://github.com/westonruter/spoken-word/blob/master/package.json).

This plugin is [developed on GitHub](https://github.com/westonruter/spoken-word)
where the source can be viewed. Please [report issues](https://github.com/westonruter/spoken-word/issues)
there. Pull requests welcome. The `spoken-word` package is also [published on npm](https://www.npmjs.com/package/spoken-word).

## Captures

[⌊Words are highlighted (selected) as they are spoken.⌉⌊Words are highlighted (selected)
as they are spoken.⌉[

Words are highlighted (selected) as they are spoken.

[⌊Change the rate, pitch, and voices used in speech.⌉⌊Change the rate, pitch, and
voices used in speech.⌉[

Change the rate, pitch, and voices used in speech.

[⌊Skip ahead to the desired paragraph with controls or via selecting with cursor.⌉⌊
Skip ahead to the desired paragraph with controls or via selecting with cursor.⌉[

Skip ahead to the desired paragraph with controls or via selecting with cursor.

## Ressenyes

![](https://secure.gravatar.com/avatar/e334a865bffefbcd07e309b3f05b45401ded89fc66f2c7c3a332bac27f4c2f0a?
s=60&d=retro&r=g)

### 󠀁[Thank you!](https://wordpress.org/support/topic/thank-you-2170/)󠁿

 [askdavidchen](https://profiles.wordpress.org/askdavidchen/) 8 de novembre de 2019
1 resposta

Thank you, this plug very great. everything is OK. But currently version only support
English engine and only running in PC. android no effect.

![](https://secure.gravatar.com/avatar/04f97f59be886436220ad567342ade8bbf83eb944f894a31a9821c5a31249f0e?
s=60&d=retro&r=g)

### 󠀁[Works as it should](https://wordpress.org/support/topic/works-as-it-should-63/)󠁿

 [Wnd](https://profiles.wordpress.org/wnd/) 2 de maig de 2019

Install, activate, and done! Will give it a 5 star rating if it’s possible to customize
some options.

![](https://secure.gravatar.com/avatar/c4c10be2c40ac78bad70a61368e8f08f5117adfc32f9068952819e78845c52c5?
s=60&d=retro&r=g)

### 󠀁[Very nice plugin](https://wordpress.org/support/topic/very-nice-plugin-607/)󠁿

 [Beate Ziebell](https://profiles.wordpress.org/beatea/) 25 de febrer de 2019

Thank you for the plugin. Since my Website works with the eleven40 Pro on Genesis
theme, the plugin first did not show up. My solution was to just add a div in the
blog/page post like: <div class=»entry-content» itemprop=»articleBody»>, since the
post itself did only have a div with the itemprop=»text».

![](https://secure.gravatar.com/avatar/309786dcdab4976110dca7688aed54cc415f18e9dca0685f2b7a310188c146ef?
s=60&d=retro&r=g)

### 󠀁[It just worked.](https://wordpress.org/support/topic/it-just-worked-6/)󠁿

 [Mick Holton](https://profiles.wordpress.org/mick554/) 6 de desembre de 2018

I installed it, activated it then listened to the results. Very simple and very 
impressed.

![](https://secure.gravatar.com/avatar/dc65ee07086aa8c7722e2248c82fe1b083fd6dc3f8f6c138eee465b0a9e4b967?
s=60&d=retro&r=g)

### 󠀁[Prima en handig](https://wordpress.org/support/topic/prima-en-handig/)󠁿

 [tonhendriks](https://profiles.wordpress.org/tonhendriks/) 29 de setembre de 2018

Makkelijk te gebruiken, plaatst zich automatisch bovenaan de pagina, wie het voorgelezen
wil hebben kan dat doen. Veeg een tekst aan en dan wordt vanaf de start van de selectie
voorgelezen.

![](https://secure.gravatar.com/avatar/df6171f761be775c17541741d563765e6b7e5a203e78ed97dbb8a93b3ad675f7?
s=60&d=retro&r=g)

### 󠀁[Do you have, please, a tutoria to add Spanish and Portuguese Languages?](https://wordpress.org/support/topic/do-you-have-please-a-tutoria-to-add-spanish-and-portuguese-languages/)󠁿

 [tehealing](https://profiles.wordpress.org/tehealing/) 22 de febrer de 2018

Do you have, please, a tutoria to add Spanish and Portuguese Languages?

 [ Llegiu totes les 7 ressenyes ](https://wordpress.org/support/plugin/spoken-word/reviews/)

## Col·laboradors i desenvolupadors

«Spoken Word» és programari de codi obert. La següent gent ha col·laborat en aquesta
extensió.

Col·laboradors

 *   [ Weston Ruter ](https://profiles.wordpress.org/westonruter/)

[Traduïu «Spoken Word» a la vostra llengua.](https://translate.wordpress.org/projects/wp-plugins/spoken-word)

### Interessats en el desenvolupament?

[Navegueu pel codi](https://plugins.trac.wordpress.org/browser/spoken-word/), baixeu-
vos el [repositori SVN](https://plugins.svn.wordpress.org/spoken-word/), o subscriviu-
vos al [registre de desenvolupament](https://plugins.trac.wordpress.org/log/spoken-word/)
per [fisl de subscripció RSS](https://plugins.trac.wordpress.org/log/spoken-word/?limit=100&mode=stop_on_copy&format=rss).

## Registre de canvis

#### 1.0.1 (2018-01-21)

Disable functionality in Android and iOS devices by default.

#### 1.0.0 (2018-01-20)

Initial release.

## Meta

 *  Versió **1.0.1**
 *  Darrera actualització **fa 9 anys**
 *  Instal·lacions actives **100+**
 *  Versió del WordPress ** 4.7 o posterior **
 *  Provada fins a **4.9.31**
 *  Versió del PHP ** 5.4 o posterior **
 *  Idioma
 * [English (US)](https://wordpress.org/plugins/spoken-word/)
 * Etiquetes
 * [audio](https://ca.wordpress.org/plugins/tags/audio/)[speech synthesis](https://ca.wordpress.org/plugins/tags/speech-synthesis/)
   [text to speech](https://ca.wordpress.org/plugins/tags/text-to-speech/)[tts](https://ca.wordpress.org/plugins/tags/tts/)
   [voice](https://ca.wordpress.org/plugins/tags/voice/)
 *  [Vista avançada](https://ca.wordpress.org/plugins/spoken-word/advanced/)

## Valoracions

 4.7 sobre 5 estrelles.

 *  [  5 valoracions de 5 estrelles     ](https://wordpress.org/support/plugin/spoken-word/reviews/?filter=5)
 *  [  2 valoracions de 4 estrelles     ](https://wordpress.org/support/plugin/spoken-word/reviews/?filter=4)
 *  [  0 valoracions de 3 estrelles     ](https://wordpress.org/support/plugin/spoken-word/reviews/?filter=3)
 *  [  0 valoracions de 2 estrelles     ](https://wordpress.org/support/plugin/spoken-word/reviews/?filter=2)
 *  [  0 valoracions de 1 estrelles     ](https://wordpress.org/support/plugin/spoken-word/reviews/?filter=1)

[La vostra ressenya](https://wordpress.org/support/plugin/spoken-word/reviews/#new-post)

[Visualitza totes les ressenyes](https://wordpress.org/support/plugin/spoken-word/reviews/)

## Col·laboradors

 *   [ Weston Ruter ](https://profiles.wordpress.org/westonruter/)

## Suport

Teniu quelcom a dir? Necessiteu ajuda?

 [Visualitza els fòrums de suport](https://wordpress.org/support/plugin/spoken-word/)