Socket
Socket
Sign inDemoInstall

bol

Package Overview
Dependencies
0
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    bol

Currently just a wrapper around speechSynthesis with slightly better consistency in voices, Trying to be super consistent! Text-to-speech for Web.


Version published
Weekly downloads
10
increased by11.11%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Bol (बोल) 🗣

TTS Library for Web

Currently just a wrapper around speechSynthesis with slightly better consistency in voices, Trying to be super consistent! Text-to-speech for Web.

npm

Meant to be used on frontend.

NOT READY FOR PROD

If you still want to ruin your life, here's how you can do it:


Installation

npm install --save bol

or

<script src="https://unpkg.com/bol@^0/dist/bol.min.js"></script>

Usage

ES Module

import Bol from 'bol';

const bol = new Bol("UK English Female", {rate: .8, pitch: 1, volume: 1})

bol.speak("Whhatta useless package", "UK English Male")
  .then(elapsedTime => console.log(elapsedTime))

or

Vanilla Script Include

<body>
  <button class="talk">Fact of the Day</button>
  <script src="https://unpkg.com/bol@^0/dist/bol.min.js"></script>
  <script>
    const bol = new Bol('UK English Male', {rate: .8});

    document.querySelector('.talk').addEventListener('click', e => {
      bol.speak("HTML is a programming language!")
        .then(elapsedTime => {
          console.log(elapsedTime);
        })
    })
  </script>
</body>

Make sure you wrap bol.speak around a user's touch, swipe, click handlers to make it work.


Voices

  • "UK English Male"
  • "UK English Female"
  • "US English Male"
  • "US English Female"

Me!

🌻

FAQs

Last updated on 17 Mar 2020

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc