Skip to main content

automatically clean up voice recordings

Project description

autosnip

Automatically clean up voice recordings

You need a text file containing the script and a wav file containing your recording of the script. When you make a mistake, you say a cue word and start over at an earlier point. Then autosnip stitches the good parts together and spits out a ready-to-use wav file.

Setup

Install autosnip:

pip install autosnip

Download and unpack a speech recognition model from https://alphacephei.com/vosk/models for your language.

Usage

Carefully craft your script with depth and wit. Think of a cue word to signal a mistake to autosnip. The cue word should be a word that does not occur in your script. Record yourself reading the script. Whenever you make a mistake or want to rerecord some part for whatever reason, say the cue word and start over at some earlier point in the script, a good place is the start of the current sentence so there is no break in the flow mid sentence. When you are done, feed the script and your recording into autosnip:

autosnip -s my_script.txt -r my_recording.wav -o my_clean_recording.wav -m vosk-model-en-us-0.22 -c oops -v

Congratulations! You may now publish your recording into the world.

Example

Check out the example directory.

How it Works

Your recording is transcribed using a VOSK speech recognition model. Start and end time of each word are stored. The transcript is then split apart at each occurance of the cue word. For each section, the whole script is scanned to see where this section fits best, so in theory you don't have to read the parts in order. The sections are patched into the script in the order you recorded them, always overwriting any previous recording. Then the corresponding intervals are selected from the recorded wav file and stitched together with short cross fades.

If you are unhappy with the result at some place, you can just make a new recording of that part (starting with the cue word), append it to your previous recording and rerun autosnip.

Project Status

The happy path is working, however the project is still young and not battle-tested. Feel free to report issues! There is also not yet much performance optimization going on. The runtime is probably O(n²) where n is the number of words in your script, so it may be a good idea to record chapter by chapter instead of a whole book in one go.

Happy Recording!

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

autosnip-0.1.3.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

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

autosnip-0.1.3-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

Details for the file autosnip-0.1.3.tar.gz.

File metadata

  • Download URL: autosnip-0.1.3.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for autosnip-0.1.3.tar.gz
Algorithm Hash digest
SHA256 4fb61d17299a77da79ac5ef8fd6f6645efd705b5dee65922cd8c99fd05e34f2e
MD5 e107a3466169074eaa4c93dcbadd78ae
BLAKE2b-256 ac94db71a0bd57f96c82e7e906352b998e702f2c33c64f43e233006d41f7ba54

See more details on using hashes here.

File details

Details for the file autosnip-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: autosnip-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 8.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for autosnip-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 a225603e975e1c48a331d31460a2a45c0adf82f31a885df1d64fb4558488dc85
MD5 3cd8c8b0269fbaafe8a48907d9e98184
BLAKE2b-256 27be924d8faddd41665ec3f4e3a547ac0ba42d73c425e9877adc67ace1753f9d

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