Metadata-Version: 2.4
Name: persian-ipa-to-speech-f5
Version: 0.1.0
Summary: Simple Persian IPA-to-speech inference with an F5-TTS checkpoint
Author-email: Ali Akbar Kiaei <ali.a.kiaei@gmail.com>
License-Expression: Apache-2.0
Project-URL: Homepage, https://huggingface.co/KiaBush/Persian-IPA-to-Speech-F5
Project-URL: Repository, https://github.com/KiaBush/Persian-IPA-to-Speech-F5
Project-URL: Issues, https://github.com/KiaBush/Persian-IPA-to-Speech-F5/issues
Keywords: persian,ipa,speech,tts,f5-tts
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Multimedia :: Sound/Audio :: Speech
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: NOTICE
Requires-Dist: f5-tts==1.1.22
Requires-Dist: huggingface-hub>=0.25
Provides-Extra: test
Requires-Dist: pytest>=8; extra == "test"
Requires-Dist: build>=1.2; extra == "test"
Requires-Dist: twine>=6; extra == "test"
Dynamic: license-file

# Persian-IPA-to-Speech-F5

A small Python API for the
[`KiaBush/Persian-IPA-to-Speech-F5`](https://huggingface.co/KiaBush/Persian-IPA-to-Speech-F5)
checkpoint. It downloads the model on first use, preserves raw Unicode IPA, and
hides the compatibility details of the upstream F5-TTS API.

## Install

```bash
pip install persian-ipa-to-speech-f5
```

FFmpeg must be available on the system. For GPU inference, install the PyTorch
build matching your CUDA version before installing this package.

## IPA to speech

```python
from persian_ipa_to_speech_f5 import PersianIPAToSpeechF5

tts = PersianIPAToSpeechF5(device="cuda")
tts.synthesize(
    "sælɒːm, xoːbiː?",
    reference_audio="reference.wav",
    reference_ipa="<exact IPA transcription of the reference audio>",
    output="outputs/result.wav",
)
```

The reference IPA must accurately transcribe the spoken reference audio and
follow the checkpoint's IPA convention.

## Persian text to speech

The optional front end uses
[`KiaBush/persian-text-to-ipa-byt5`](https://huggingface.co/KiaBush/persian-text-to-ipa-byt5):

```python
from persian_ipa_to_speech_f5 import PersianIPAToSpeechF5, PersianTextToIPA

ipa = PersianTextToIPA(device="cpu").convert("گل رز واقعاً زیباست.")

tts = PersianIPAToSpeechF5(device="cuda")
tts.synthesize(
    ipa,
    reference_audio="reference.wav",
    reference_ipa="<exact IPA transcription of the reference audio>",
    output="outputs/result.wav",
)
```

Names, numbers, abbreviations, and dialectal input can be context-dependent;
review generated IPA when pronunciation matters.

## Command line

```bash
persian-ipa-to-speech-f5 \
  --text "گل رز واقعاً زیباست." \
  --reference-audio reference.wav \
  --reference-ipa "<reference IPA>" \
  --output outputs/result.wav \
  --device cuda
```

Use `--ipa` instead of `--text` to bypass the text-to-IPA model.

## Licenses

The source code in this Python package is licensed under Apache-2.0. The model
checkpoint is a derivative of F5-TTS v1 Base and is separately licensed under
CC-BY-NC-4.0; its non-commercial restriction applies to the model itself.
Rights in generated audio can depend on the input and applicable law. F5-TTS
source code is MIT-licensed. Users are responsible for obtaining the rights and
consent needed for reference voices and audio.

## Authors and contributors

- [Ali Akbar Kiaei](https://huggingface.co/AliAkbarKiaei) — research, model training, engineering, and release
- [Mahnaz Bush](https://huggingface.co/MahnazBush) — data preparation, model training, evaluation, research, and documentation
