ReviewOS

also looking at this

meemalabs/laravel-text-to-speech

feat: add 60db text-to-speech driver

#46
Open uditgoenka wants to merge feat/60db-tts into main
5 files +403 -9
README.mdmodified+22-1
Changes to README.md
@@ -12,7 +12,7 @@
1212
1313This is a Text-To-Speech package for Laravel. Its primary intention is to use a shared API to easily convert text to speech.
1414
15Currently, the only supported driver is Amazon Polly. We are exploring the option to soon support Google WaveNet. Feel free to start a discussion on any possible driver.
15Supported drivers are Amazon Polly and 60db. We are exploring the option to soon support Google WaveNet. Feel free to start a discussion on any possible driver.
1616
1717## 💡 Usage
1818
@@ -59,6 +59,27 @@ $output = TextToSpeech::speechMarks(['sentence', 'word', 'viseme', 'ssml'])
5959 ->convert('This is a test'); // This will return an array.
6060```
6161
62### 60db text-to-speech
63
64Set `TTS_DRIVER=sixtydb`, `SIXTYDB_API_KEY`, and `SIXTYDB_VOICE_ID` to an available
65workspace voice ID. Optionally set `SIXTYDB_MODEL_ID`. Publish the package config
66again or add `services.sixtydb` from `config/config.php` to your existing config.
67
68```php
69TextToSpeech::engine('sixtydb')->saveTo('speech.wav')->convert('Hello world', [
70 'speed' => 1.0,
71]);
72```
73
74The driver uses the existing source, disk and filename APIs and saves mono
75PCM16 WAV at 24 kHz. Use `.wav` output paths. `voice`, `speed` (0.5–2.0), and
76`model` can be overridden per conversion; `language('en-US')` sends `en` as the
7760db target language. Input must be plain UTF-8 text, 1–5000 characters; SSML and
78other output formats are rejected. JSON, NDJSON and binary audio responses are
79supported, with bounded response reads and HTTP errors raised before storage.
80The driver requires a 60db API key and uploads text to the
81[60db synthesis API](https://docs.60db.ai/api-reference/tts/text-to-speech).
82
6283## 🐙 Installation
6384
6485You can install the package via composer: