https://github.com/dunosaurs/gtts
A simple deno text-to-speech library using the google translate api.
https://github.com/dunosaurs/gtts
deno text-to-speech
Last synced: about 2 months ago
JSON representation
A simple deno text-to-speech library using the google translate api.
- Host: GitHub
- URL: https://github.com/dunosaurs/gtts
- Owner: dunosaurs
- License: mit
- Created: 2022-12-20T18:36:49.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-12-21T02:19:46.000Z (over 3 years ago)
- Last Synced: 2025-03-06T11:41:54.517Z (over 1 year ago)
- Topics: deno, text-to-speech
- Language: TypeScript
- Homepage: https://deno.land/x/gtts
- Size: 4.88 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# deno-gtts
A simple text-to-speech library using the google translate api. It is designed
to be used either as a deno library or as a cli tool.
## Usage
```typescript
import { save } from "https://deno.land/x/gtts/mod.ts";
await save("./demo.wav", "This sentence is being read by a machine");
```
OR
```bash
deno install --allow-write --allow-net -n gtts https://deno.land/x/gtts/cli.ts
gtts "some text to speak"
gtts "some text to speak to a destination" --path="./test.wav"
gtts "text but in a french accent" --lang=fr
gtts "text at a destination but in a french accent" --path="./french.wav" --lang=fr
```
Very loosely inspired by
[this nightmare of a library](https://github.com/lino-levan/better-node-gtts)