New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

ttsreader

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ttsreader

Text to Speech wrapper, player and helpers for the web-speech-api speech synthesis

latest
Source
npmnpm
Version
1.0.40
Version published
Maintainers
1
Created
Source

ttsreader is a Text to Speech wrapper, reader / player and helpers for the web-speech-api speech synthesis

See published npm package https://www.npmjs.com/package/ttsreader

It is the engine behind the popular ttsreader.com online text & website reader , as well as:

Import:

To use in your own html / js code use one of the following methods:

  • <script src="https://unpkg.com/ttsreader/build/bundle.min.js"></script>
  • Or - download the following built file /build/bundle.min.js and use directly in your code <script src="bundle.min.js"></script>
  • Or - for Node based projects: npm i ttsreader

How to use?

See 'test.html' for a complete example.

The tts engine itself:

let tts = wsGlobals.TtsEngine; OR import {TtsEngine} from "tts-engine"

See test.html for real example on use. test.html

Tests Documentation

Since there are so many different platfrom-browser combos, we have to carefully test on each. Documentation bout it is here: TESTS.md

Showcases

This is used on the following sites:

TODOs:

  • Utils to 'cut' large texts into smaller sections.
  • Generic Player with UI, with options to play
    • text
    • element and its contents

How to contribute & publish updates to this package?

Important practical non-obvious lessons we learned about tts:

  • You cannot send too many chars to REMOTE tts voice. It jams. Probably - the whole text is processed at once, and some mp3 is generated on the server?
    • 38,000 is too much. It basically never starts.
    • Local voices (at least on mac) worked well.
  • With Google's voices - they will use the correct voice only sometimes. It's not consistent at all! (On Mac.) // TODO: Test on Windows!
  • onboundary does not work with Google voices. So - we have to send small chunks anyhow...
  • Of course - the famous google voice terminating itself after some circa 15 secs...

Keywords

tts

FAQs

Package last updated on 16 Mar 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts