Skip to main content

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

  1. Download release executable version 1.1.0 Beta 2
  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 phonemes
  • align_exe: MFA executable file
  • trained_model: pre-trained model MFA will use. Should be a ZIP file
  • lang: three languages are supported for the moment: fr, en and de
  • dict_consonant_vowel_path: Path to dictionary declaring the consonant and vowel phonemes
  • folder: 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:

Add an unsupported language

Please refer to this section of SM-Dictionaries.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sentence_mixing-2.0.0-py2.py3-none-any.whl (36.4 kB view details)

Uploaded Python 2Python 3

File details

Details for the file sentence_mixing-2.0.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for sentence_mixing-2.0.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 f65ecada3f0b5e420427c87262357326c0d323f5d906964d0c3d90050d891218
MD5 1c8306c8d87f5c07d123f388542828cd
BLAKE2b-256 700ba7c9e6dc4de9a88b1f1300f680965c8907a0bd0c2414aa18cd3929f83729

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page