https://github.com/otherjoel/wavenet-api
🌊🔊 Racket interface for Google’s Wavenet Cloud text-to-speech API
https://github.com/otherjoel/wavenet-api
Last synced: 25 days ago
JSON representation
🌊🔊 Racket interface for Google’s Wavenet Cloud text-to-speech API
- Host: GitHub
- URL: https://github.com/otherjoel/wavenet-api
- Owner: otherjoel
- License: other
- Created: 2021-02-05T03:20:04.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2023-01-01T19:41:40.000Z (almost 3 years ago)
- Last Synced: 2024-05-10T00:20:24.895Z (over 1 year ago)
- Language: Racket
- Size: 12.7 KB
- Stars: 4
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Wavenet API
A Racket interface for the [Google Cloud text-to-speech API][tts].
[Complete documentation is available][docs].
[tts]: https://cloud.google.com/text-to-speech
[docs]: https://joeldueck.com/what-about/wavenet-api
Here’s a quick example program:
```racket
#lang racket
(require wavenet
racket/gui/base)
(api-key (file->string "api.rktd"))
(define british-dude
#hasheq((languageCodes . ("en-GB"))
(name . "en-GB-Wavenet-B")
(naturalSampleRateHertz . 24000)
(ssmlGender . "MALE")))
(define (say text)
(synthesize text british-dude #:output-file "temp.mp3")
(play-sound "temp.mp3" #t))
```
## Installation
To make use of this package, you need a Google Cloud API key.
To install from within DrRacket, click *File* → *Install Package*, type `wavenet` into the
box and click *Install*.
To install from the command line, run `raco pkg install wavenet`.