Metadata-Version: 2.4
Name: ovos_tts_plugin_server
Version: 0.0.6a3
Summary: ovos tts server plugin for mycroft
Author-email: JarbasAi <jarbasai@mailfence.com>
License-Expression: Apache-2.0
Project-URL: Homepage, https://github.com/OpenVoiceOS/ovos-tts-server-plugin
Keywords: mycroft,OpenVoiceOS,OVOS,plugin,tts
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Topic :: Text Processing :: Linguistic
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: ovos-plugin-manager<3.0.0,>=2.1.0
Requires-Dist: requests
Provides-Extra: test
Requires-Dist: ovos-classifiers~=0.0.0a40; extra == "test"
Requires-Dist: pytest; extra == "test"
Requires-Dist: pytest-cov; extra == "test"
Requires-Dist: black; extra == "test"
Requires-Dist: bandit; extra == "test"
Requires-Dist: flake8; extra == "test"
Requires-Dist: isort; extra == "test"
Requires-Dist: ruff; extra == "test"
Requires-Dist: mypy; extra == "test"
Requires-Dist: types-requests; extra == "test"
Requires-Dist: safety; extra == "test"
Provides-Extra: e2e
Requires-Dist: pytest; extra == "e2e"
Requires-Dist: pytest-cov; extra == "e2e"
Dynamic: license-file

## Description

This plugin connects OpenVoiceOS to an [OpenVoiceOS TTS Server](https://github.com/OpenVoiceOS/ovos-tts-server) instance. It sends text to the server and returns the synthesized audio to OVOS.

## Install

```bash
pip install ovos-tts-plugin-server
```

## Configuration

```json
  "tts": {
    "module": "ovos-tts-plugin-server",
    "ovos-tts-plugin-server": {
        "host": "https://tts.smartgic.io/piper",
        "v2": true,
        "verify_ssl": true,
        "tts_timeout": 5
     }
 } 
```

- `host`: the URL of the TTS server. The plugin appends `/synthesize` to this URL.
- `v2`: use the v2 API, if the server offers it.
- `verify_ssl`: verify the server's SSL certificate. Set this to `false` for a self-signed certificate, but see the [security warning](#security-warning) before you do.
- `tts_timeout`: timeout, in seconds, for a request to the server. The default is 5 seconds.

### v2 API (ovos-tts-server 0.0.3a10 and later)

If the TTS server plugin supports v2, set `v2` to `true` to use the newer API. The `host` value stays the same either way. For example, it stays `https://tts.smartgic.io/piper` regardless of the `v2` setting.

### Security warning

You can set `verify_ssl` to `false` to disable SSL verification, but this is not recommended. Use it only for testing. For production, use a private CA or a certificate from [Let's Encrypt](https://letsencrypt.org/) instead.

## Self-hosting (recommended)

Run your own server. Your text stays on your own hardware, you do not depend on
somebody else's uptime, and you pick the voices.

```bash
pip install ovos-tts-server phoonnx
ovos-tts-server --engine ovos-tts-plugin-phoonnx
```

[phoonnx](https://github.com/TigreGotico/phoonnx) is the recommended engine: it
runs ONNX voices on CPU across 1000+ languages, downloads a voice the first time
it is used, and can pick a default voice per language, so one server covers all
of them. A prebuilt image is available too — see phoonnx's
[docker docs](https://github.com/TigreGotico/phoonnx/blob/dev/docs/docker.md).

Then point this plugin at it:

```json
  "tts": {
    "module": "ovos-tts-plugin-server",
    "ovos-tts-plugin-server": {
      "host": "https://your-server.example",
      "v2": true
    }
  }
```

## Public servers

With no `host` configured, the plugin falls back to public servers.

> **These are a community courtesy, not a service.** They exist so you can try
> OVOS without setting anything up first. They are provided on a best-effort
> basis with **no guarantees** of uptime, latency, voice availability, privacy,
> or continued existence, and they can change or disappear without notice. They
> are meant for demos, evaluation and onboarding — **not for production, and
> not for anything you would not want a third party to receive**.
>
> For anything beyond trying it out, [self-host](#self-hosting-recommended).

## Related projects

- [OpenVoiceOS/ovos-tts-server](https://github.com/OpenVoiceOS/ovos-tts-server) — the TTS server this plugin talks to.
- [OpenVoiceOS/ovos-plugin-manager](https://github.com/OpenVoiceOS/ovos-plugin-manager) — loads and configures this plugin inside OVOS.

## License

Apache-2.0
