ttspeech
v1.3.1
Published
text to speech for browser
Downloads
2
Readme
ttspeech
A Promise
tts api, it depend on browser api window.speechSynthesis
;
Install
you can install package in your dependencies
yarn add ttspeech
# or
pnpm add ttspeech
Usage
1. Simple usage
import { speck } from "ttspeech";
speck("hello world!");
// you can hear "hello world!"
2. Promise usage
import { speck } from "ttspeech";
(async () => {
await speck("hello world!");
window.alert("speech end~");
})();
Demo
git clone https://github.com/AFine970/ttspeech.git
pnpm install
cd /packages/example && pnpm dev