Sentence mixing library
Project description
Sentence mixing
This library is used to analyze and smartly reorder phonemes of an audio sequence to form any desired sentence. The goal of this library is to generate Sentence Mixing Youtube poops (example).
Entry file is sentence_mixer.py
.
Here are examples of applications based on the library:
MFA
SM library is using Montreal Forced Aligner, a powerful tool used to timestamp words and phonemes in a subtitled audio file.
Installing MFA
- Download release executable version 1.1.0 Beta 2
- Extract it as
Montreal-Forced-Aligner
JSON config file
To use the library, you have to provide a json configuration file. Here are all the fields to add into it:
dict_path
: Path to dictionnary file. This dictionnary associates every words of a language to associated phonemesalign_exe
: MFA executable filetrained_model
: pre-trained model MFA will use. Should be a ZIP filelang
: three languages are supported for the moment:fr
,en
andde
dict_consonant_vowel_path
: Path to dictionary declaring the consonant and vowel phonemesfolder
: Folder where the Youtube subtitles will be stored
This config file should be passed through the function prepare_sm_config_file
Recommended config.json
Example for French language:
dict_path
: choosefr/fr.dict
dictionary in SM-Dictionaries repoalign_exe
:Montreal-Forced-Aligner/bin/mfa_align
trained_model
: choose french prosodylab model among MFA pretrained modellang
:fr
dict_consonant_vowel_path
: choosefr/fr_consonant_vowel.dict
consonant vowel dict in SM-Dictionaries repo
Add an unsupported language
Please refer to this section of SM-Dictionaries.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
File details
Details for the file sentence_mixing-2.0.4-py2.py3-none-any.whl
.
File metadata
- Download URL: sentence_mixing-2.0.4-py2.py3-none-any.whl
- Upload date:
- Size: 36.8 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d78e4e3adbdbb0ce90ba1e1f3a9bbae65baa211c21d4daa2bbfaf42eb5f7e8b5 |
|
MD5 | 68da7d6e7d3cd4714045d6b2699049d8 |
|
BLAKE2b-256 | cebff090a0ed1f2786026c8fca4c073afc8047ff3941c3ab6fa70b0318758e54 |