JSPM

@timesinternet/times-text-to-speech

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q25259F
  • License ISC

Convert text to speech

Package Exports

  • @timesinternet/times-text-to-speech

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@timesinternet/times-text-to-speech) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

swiper

A React component to convert text to audio

Installation

Browser

npm install --save times-text-to-speech

Browser

import Swipe from 'times-swiper';
import from './node_modules/text-to-speech/text-to-speech.js';
import TTS from 'text-to-speech';



export class MyComponent extends Component {
  play(){
    TTS.play("Hello world text","english");
  }

  stop(){
    TTS.stop();
  }
  render(){
    return(
      <div>
        <button onClick={this.play.bind(this)}>Play</button>
        <button onClick={this.stop.bind(this)}>Stop</button>
      </div>   
    )
  }
}

export default MyComponent;

Available functions

  • play: play text in hindi or english (language options are 'hindi','english')
  • stop: stop audio

Who's using text-to-speech?

License

This project is licensed under the terms of the