Skip to main content

A python CLI tool to extract voice sentences from audio files with speech recognition

Project description

VoiceXTractor

~ A python CLI tool to extract voice sentences from audio files with speech recognition ~

Ko-fi · Installation · Changelog

Developed by @veeso

Current version: 0.1.2 (23/09/2022)

License-MIT Repo stars Downloads counter Latest version Ko-fi

CI


About VXT 🚜

VXT, which stands for VoiceXTractor is a Python command-line utility to extract voice tracks from audio.

How it works:

  1. You provide VXT with an audio file
  2. The audio file is split by silence
  3. for each "track" chunked by the audio file, it gets the speech for it using a customisable speech-to-text engine
  4. you can at this point work on tracks (amplify, normalize, split, remove...)
  5. export the tracks to files with the format you prefer

Get started 🚀

You can install VXT with pip:

pip3 install vxt

then you must install dependencies:

pip3 install SpeechRecognition PyInquirer pydub termcolor click

you also need to install ffmpeg or libav.

Finally you can run VXT with the following arguments:

python3 -m vxt -l it_IT -o ./output/ ./assets/hackerino.mp3

this will split the hackerino.mp3 audio file into tracks by voice into output/, the -l option specifies the audio language is Italian.

vxt supports these options:

  -e, --engine TEXT            Specify speech2text engine [bing, google,
                               google-cloud, houndify, ibm, sphinx] (default:
                               google)

  -l, --language TEXT          Specify audio language (e.g. it_IT), system
                               language will be used otherwise

  -f, --output-fmt TEXT        Specify output format (See readme)
  -o, --output-dir TEXT        Specify output directory
  -A, --api-key TEXT           Specify api key (required for: bing, google
  -J, --json-credentials TEXT  Specify json credentials (required for: google-
                               cloud)

  -C, --client-id TEXT         Specify client id (required for: houndify)
  -K, --client-key TEXT        Specify client key (required for: houndify)
  -U, --username TEXT          Specify username (required for: ibm)
  -P, --password TEXT          Specify user password (required for: ibm)
  --keyword-entries TEXT       Specify keyword entries (required for: sphinx)
  --grammar-file TEXT          Specify grammar file (required for: sphinx)
  --help                       Show this message and exit.

by default the google engine will be used for speech-to-text.

Output format

Track filename fmt. The syntax use parameters which must be preceeded by %, everything in between will be kept the same. The following parameters are supported.

  • %%: print percentage symbol
  • %d: current day
  • %H: current hours
  • %I: current timestamp ISO8601 syntax
  • %M: current minutes
  • %m: current month
  • %S: current seconds
  • %s: track speech
  • %s.NUMBER track speech cut at length (e.g. %s.24)
  • %t: track number in track list (from 1 to n)
  • %y: current year with 2 digits
  • %Y: current year with 4 digits

Support the developer ☕

If you like VXT and you're grateful for the work I've done, please consider a little donation 🥳

You can make a donation with one of these platforms:

ko-fi PayPal bitcoin litecoin


Contributing and issues 🤝🏻

Contributions, bug reports, new features and questions are welcome! 😉 If you have any question or concern, or you want to suggest a new feature, or you want just want to improve VXT, feel free to open an issue or a PR.

Please follow our contributing guidelines


Changelog ⏳

View VXT's changelog HERE


Powered by 💪

VXT is powered by these awesome projects:


License 📃

VXT is licensed under the MIT license.

You can read the entire license HERE

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

vxt-0.1.2.tar.gz (27.5 kB view hashes)

Uploaded Source

Built Distribution

vxt-0.1.2-py3-none-any.whl (68.3 kB view hashes)

Uploaded Python 3

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