Skip to main content

An Open Source text-to-speech system built by inverting Whisper (fork of WhisperSpeech)

Project description

WhisperSpeech2

An Open Source text-to-speech system built by inverting Whisper. This is a fork of WhisperSpeech optimized for inference.

Installation

pip install whisperspeech2

Note: You must also have PyTorch installed. Visit pytorch.org for installation instructions.

Quick Start

from whisperspeech2.pipeline import Pipeline

# Initialize the pipeline
pipe = Pipeline(s2a_ref='collabora/whisperspeech:s2a-q4-tiny-en+pl.model')

# Generate audio and save to file
pipe.generate_to_file('output.wav', "Hello, world!")

# Or get the audio tensor directly
audio = pipe.generate("Hello, world!")

Available Models

Model Reference
Tiny collabora/whisperspeech:s2a-q4-tiny-en+pl.model
Base collabora/whisperspeech:s2a-q4-base-en+pl.model
Small collabora/whisperspeech:s2a-q4-small-en+pl.model

Speaker Embedding (Optional)

To use custom speaker embeddings, install the optional dependency:

pip install whisperspeech2[speaker]

Then pass an audio file path to clone a voice:

pipe.generate_to_file('output.wav', "Hello!", speaker='reference.wav')

Examples

See the examples/ directory for more usage examples including GUI applications and streaming playback.

License

MIT License


### 3. `LICENSE`

MIT License

Copyright (c) 2025 Blair Chintella

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

whisperspeech2-0.9.0.tar.gz (20.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

whisperspeech2-0.9.0-py3-none-any.whl (26.6 kB view details)

Uploaded Python 3

File details

Details for the file whisperspeech2-0.9.0.tar.gz.

File metadata

  • Download URL: whisperspeech2-0.9.0.tar.gz
  • Upload date:
  • Size: 20.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.19

File hashes

Hashes for whisperspeech2-0.9.0.tar.gz
Algorithm Hash digest
SHA256 3665f891095515f737b3106534a0d395a9d20d7e76ca23f7710d6f6cc8b67459
MD5 ce2c855f1a1a364b67fd3a5bac1f86c1
BLAKE2b-256 bdbc0ac35ef9be18b320b9493beb89ad799bc03a5dec4a9e7f2994c378853af5

See more details on using hashes here.

File details

Details for the file whisperspeech2-0.9.0-py3-none-any.whl.

File metadata

  • Download URL: whisperspeech2-0.9.0-py3-none-any.whl
  • Upload date:
  • Size: 26.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.19

File hashes

Hashes for whisperspeech2-0.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 39311d3beb014670d207d11b46a89a8dff0fa01890f004a9b1233e89792e8849
MD5 5bb120840d6d00740eafc663f3436535
BLAKE2b-256 d0f871af98353576729d30451e08dd91ec376baf1cf98735a612299c52d5dafc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page