@striker1826/use-tts
TypeScript icon, indicating that this package has built-in type declarations

1.0.8 • Public • Published

@striker1826/use-tts

@striker1826/use-tts is a simple TypeScript function that converts text to speech. This function uses the browser's speechSynthesis API to convert text to speech.

Installation

To install this package, use npm:

npm install @striker1826/use-tts

Usage

You can import the package and call the getSpeech function to convert text to speech.

import { getSpeech } from '@striker1826/use-tts';

getSpeech('Hello!');

Function Description

getSpeech(text: string): void

Converts the given text to speech.

Parameters

text: string - The text to be converted to speech.

Browser Compatibility

This function only works in a browser environment. It does not work in a Node.js environment because there is no window object and speechSynthesis API.

Contribution

Contributions are welcome! If you find any bugs or have feature requests, please submit an issue.

License

This project is distributed under the MIT License. For more details, refer to the LICENSE file.

Package Sidebar

Install

npm i @striker1826/use-tts

Weekly Downloads

1

Version

1.0.8

License

MIT

Unpacked Size

6.29 kB

Total Files

6

Last publish

Collaborators

  • minseob