Skip to main content

This is a re-implementation of F5-TTS aimed at reducing dependencies, increasing speed, reducing model size and improving usability.

Installation

Fairytaler assumes you have a working CUDA environment to install into.

pip install fairytaler

How to Use

You do not need to pre-download anything, necessary data will be downloaded at runtime. Weights will be fetched from HuggingFace.

Command Line

Use the fairytaler binary from the command line like so:

fairytaler examples/reference.wav examples/reference.txt "Hello, this is some test audio!"

Many options are available, for complete documentation run fairytaler --help.

Python

from fairytaler import F5TTSPipeline

pipeline = F5TTSPipeline.from_pretrained(
  "benjamin-paine/fairytaler",
  variant="fp16", # Omit for float32
  device="auto"
)
output_wav_file = pipeline(
  text="Hello, this is some test audio!",
  reference_audio="examples/reference.wav",
  reference_text="examples/reference.txt",
  output_save=True
)
print(f"Output saved to {output_wav_file}")

The full execution signature is:

def __call__(
    self,
    text: Union[str, List[str]],
    reference_audio: AudioType,
    reference_text: str,
    reference_sample_rate: Optional[int]=None,
    seed: SeedType=None,
    speed: float=1.0,
    sway_sampling_coef: float=-1.0,
    target_rms: float=0.1,
    cross_fade_duration: float=0.15,
    punctuation_pause_duration: float=0.10,
    num_steps: int=32,
    cfg_strength: float=2.0,
    fix_duration: Optional[float]=None,
    use_tqdm: bool=False,
    output_format: AUDIO_OUTPUT_FORMAT_LITERAL="wav",
    output_save: bool=False,
) -> AudioResultType

Format values are wav, ogg, flac, mp3, float and int. Passing output_save=True will save to file, not passing it will return the data directly.

Citation

@misc{chen2024f5ttsfairytalerfakesfluent,
      title={F5-TTS: A Fairytaler that Fakes Fluent and Faithful Speech with Flow Matching}, 
      author={Yushen Chen and Zhikang Niu and Ziyang Ma and Keqi Deng and Chunhui Wang and Jian Zhao and Kai Yu and Xie Chen},
      year={2024},
      eprint={2410.06885},
      archivePrefix={arXiv},
      primaryClass={eess.AS},
      url={https://arxiv.org/abs/2410.06885}, 
}

Metadata

Release files for fairytaler 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fairytaler 0.1.1
File Size Uploaded Provenance Actions
fairytaler-0.1.1.tar.gz 39.8 kB Without provenance Details for fairytaler-0.1.1.tar.gz

Release files / fairytaler-0.1.1.tar.gz

Download URL fairytaler-0.1.1.tar.gz
Size 39.8 kB
Tags Source
SHA-256 checksum
How to use checksums
48bfead1770f6b6f3de2b6fe6dff516f5d7d163461faecc4f3ec8fe4c6d2f142
BLAKE2b-256 checksum
How to use checksums
a3f44d28f61a5ad24f136193ca9a94dcd94e451a4d70e9affc93164f594deb03
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.11

Security for fairytaler 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page