Skip to main content

Sentence mixing

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 Distribution

sentence_mixing-1.3.1.tar.gz (28.3 kB view details)

Uploaded Source

Built Distribution

sentence_mixing-1.3.1-py2.py3-none-any.whl (36.6 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file sentence_mixing-1.3.1.tar.gz.

File metadata

  • Download URL: sentence_mixing-1.3.1.tar.gz
  • Upload date:
  • Size: 28.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.23.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.9.5

File hashes

Hashes for sentence_mixing-1.3.1.tar.gz
Algorithm Hash digest
SHA256 5b42a2e0cd2c826e6650576d2852ee2a64c60a503fe7c03552ff352226a1bafe
MD5 fb9b41db4b7bc38a0dce672e738b4804
BLAKE2b-256 c6d04dbc412d156d3f67fc951a6275f3b20e8f312a0ca373dcf40c187fc0e964

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sentence_mixing-1.3.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 36.6 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.23.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.9.5

File hashes

Hashes for sentence_mixing-1.3.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 ad085299d3c91ba6225f8c4edbcb6351207e90d9d332fd6749a6465ceff865e9
MD5 9a6c727f8c3f1be24c3e7cba722d2d39
BLAKE2b-256 0ed5c4889486201c281527e6ec056c467f650ce515fc498dee516973afaa1139

See more details on using hashes here.

Supported by

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