prosody2text-code / pyproject.toml
Daporte's picture
Upload pyproject.toml with huggingface_hub
b13e4db verified
Raw History Blame Contribute Delete
2.48 kB
[project]
name = "prosody_explorer"
version = "0.1.0"
description = "Prosody features to mel to text -- the Prosody2text pipeline"
requires-python = ">=3.10"
dependencies = [
# The feature extractor. amfm-decompy is pinned exactly: f0_interp builds
# a pYAAPT.PitchObj without __init__ and reads class constants off it, so
# a release that moves those to instance attributes breaks gap
# interpolation at runtime rather than at import.
"amfm-decompy==1.0.12.2",
# Praat's intensity analysis. Wheels exist for Linux, macOS and Windows.
"praat-parselmouth>=0.4.7",
"numpy>=1.26",
"scipy>=1.11",
# The conformer is the trained torch module, loaded from safetensors.
"torch>=2.8",
"safetensors>=0.4",
# transformers is pinned to the 5.x line the reference was measured
# against: the beam capture monkeypatches GenerationMixin.generate, so a
# major version is a real compatibility boundary.
"transformers>=5.20,<6",
"tokenizers>=0.23,<0.24",
"huggingface-hub>=0.25",
# Reading an audio file by path. Ships its own libsndfile, so unlike
# torchcodec it needs no system codec.
"soundfile>=0.12",
]
[project.optional-dependencies]
# Only for evaluate_dataset.py. Kept out of the base install because
# `datasets` pulls a large tree the pipeline itself never touches.
#
# soundfile rather than torchcodec, deliberately: datasets 5.x decodes audio
# through torchcodec, which dlopens system FFmpeg libraries and so fails
# with "libavutil.so not found" on a machine that has only wheels. The
# script asks datasets for undecoded bytes and reads them with soundfile,
# which ships its own libsndfile.
eval = [
"datasets>=3.0",
"jiwer>=4.0.0",
"soundfile>=0.12",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
# The modeling files sit at the repo root, which is the Hub's own convention
# for a custom architecture. Mapping them into a package here lets the same
# files be imported normally by anything that installs this -- so the Space
# can `from prosody_explorer.features import ...` at module level rather
# than reaching into the revision-hashed path trust_remote_code creates.
[tool.hatch.build.targets.wheel]
only-include = [
"features.py", "f0_interp.py", "_yaapt_patch.py",
"speech.py", "conformer.py", "conformer_model.py",
"whisper_decoder.py", "configuration_prosody.py", "modeling_prosody.py",
]
sources = { "" = "prosody_explorer" }