Skip to main content

pymbrola

GitHub Actions Workflow Status PyPI - Version PyPI - Python Version GitHub License PyPI - Status Docker Image Size (tag) GitHub Release Codecov pre-commit.ci status

A Python interface for the MBROLA speech synthesizer, enabling programmatic creation of MBROLA-compatible phoneme files and automated audio synthesis. This module validates phoneme, duration, and pitch sequences, generates .pho files, and can call the MBROLA executable to synthesize speech audio from text-like inputs.

References: Dutoit, T., Pagel, V., Pierret, N., Bataille, F., & Van der Vrecken, O. (1996, October). The MBROLA project: Towards a set of high quality speech synthesizers free of use for non commercial purposes. In Proceeding of Fourth International Conference on Spoken Language Processing. ICSLP'96 (Vol. 3, pp. 1393-1396). IEEE. https://doi.org/10.1109/ICSLP.1996.607874

Installation

You can install Pymbrola from the PyPi repository using pip or uv:

pip install pymbrola # pip installation
uv add pymbrola      # uv installation

In either case, you will need Python>=3.12. To synthesise audios via MBROLA, you will need to download it and compile it. The Pymbrola package has functions for this. This will download MBROLa from numediat/MBROLA to you home folder ~/.mbrola and compile it.

from pymbrola import install

install.install_mbrola()

Finally, you will need to download some MBROLA voices from numediart/MBROLA-voices. These voices will be automatically downloaded and found by Pymbrola at ~/.mbrola/Voices:

from pymbrola import install

install.install_voice("it4")  # install it4 voice
install.install_voice(["it4", "fr4"])  # install several voices
install.install_voice()  # install all voices (~534M)

Usage

from pymbrola import mbrola

# Create an MBROLA object
kaffE1 = MBROLA(
    phon=["k", "a", "f", "f", "E1"],
    durations=100,  # or [100, 120, 100, 110]
    pitch=[100, [200, 50, 200], 100, 100, 200],
)

# Display phoneme sequence
print(kaffE1)

# Export PHO file
kaffE1.export_pho("kaffE1.pho")

# Synthesize and save audio (WAV file)
kaffE1.make_sound("kaffE1.wav", voice="it4")

The mbrola module uses the MBROLA command line tool under the hood. Ensure MBROLA is installed and available in your system path, or WSL if on Windows.

License

pymbrola is distributed under the terms of the MIT license.

Supported by

Funded by the European Union. Views and opinions expressed are however those of the author(s) only and do not necessarily reflect those of the European Union or the European Research Council Executive Agency (ERCEA). Neither the European Union nor the granting authority can be held responsible for them. This work is supported by the ERC StG 101115991 (GALA) awarded to Chiara Santolin

https://erc.europa.eu/homepage

Metadata

Release files for mbrola 0.7.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 mbrola 0.7.1
File Size Uploaded Provenance Actions
mbrola-0.7.1.tar.gz 14.6 kB Without provenance Details for mbrola-0.7.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mbrola 0.7.1
File Interpreter ABI Platform Actions
mbrola-0.7.1-py3-none-any.whl Python 3 none any Details for mbrola-0.7.1-py3-none-any.whl

Total release size: 27.1 kB

Release files / mbrola-0.7.1.tar.gz

Download URL mbrola-0.7.1.tar.gz
Size 14.6 kB
Tags Source
SHA-256 checksum
How to use checksums
cb99cff8a785227d250d896349ce5ad571d263aeba0c4899e180d1277205c1a1
BLAKE2b-256 checksum
How to use checksums
23bc5828accb5215dfa901b9a5cb4eaf93b6d64731f7300795cc68637381e713
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / mbrola-0.7.1-py3-none-any.whl

Download URL mbrola-0.7.1-py3-none-any.whl
Size 12.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
07d6e7b55cf3ee426bdd33e63cf6a6fe10269905fa4e22f3ad13ee4fbce946a6
BLAKE2b-256 checksum
How to use checksums
425a85690b34090c0a55739c2c80c3be904e4f066d7ebffb31baf7f32248b973
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for mbrola 0.7.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.7.1 This release

2 release files 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