Skip to main content

Speech Splitter

Test PyPI Version PyPI - Python Version Coverage Code style: black

Description

Speech Splitter is a command-line tool designed to split a speech audio into separate sentences. This tool aims to make it easier for language learners to train the hearing, pronounciation and word accents.

Motivation

This tool was developed by request of a Dutch teacher. She wanted to have a tool that would split the audio of a provided source into separate sentences, so that the students could listen to each sentence separately and repeat after it.

Installation

To install Speech Splitter, follow these steps:

pip install speech-splitter

It also requires ffmpeg to be installed on your system. You can install it using the following command (for Ubuntu):

sudo apt-get install ffmpeg or (for macOS or Windows) brew install ffmpeg or (for Windows) choco install ffmpeg

Usage

After installation, you can use the Speech Splitter tool directly from your command line. The basic command structure is as follows:

export OPENAI_API_KEY=your_api_key

Optionally, set the organization ID if you have one:

export OPENAI_ORG_ID=your_org_id

Run the command:

speech-split --help

Example Commands

speech-split audio.mp3 ./output

This command will read audio.mp3, get the transcription, split it into sentences, align the audio fragments accordingly, and save the result as output/audio.html, that can be viewed by the browser.

speech-split video.mp4 ./output

This command will read video.mp4, split the audio, get the transcription, split it into sentences, align the audio fragments accordingly, and save the result as output/video.html, that can be viewed by the browser.

speech-split text.txt ./output

This command will read text.txt, convert text too speech, get the transcription, split it into sentences, align the audio fragments accordingly, and save the result as output/text.html, that can be viewed by the browser.

Demo

You can see the demo of the tool in action here.

Requirements

The dependencies will be installed automatically during the package installation process.

Feedback and Contributions

Your feedback and contributions are welcome! If you encounter any issues or have suggestions for improvements, please feel free to open an issue on the GitHub repository or submit a pull request with your changes.

License

MIT

Metadata

Release files for speech-splitter 0.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for speech-splitter 0.0.6
File Size Uploaded Provenance Actions
speech_splitter-0.0.6.tar.gz 9.1 kB Without provenance Details for speech_splitter-0.0.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for speech-splitter 0.0.6
File Interpreter ABI Platform Actions
speech_splitter-0.0.6-py3-none-any.whl Python 3 none any Details for speech_splitter-0.0.6-py3-none-any.whl

Total release size: 17.2 kB

Release files / speech_splitter-0.0.6.tar.gz

Download URL speech_splitter-0.0.6.tar.gz
Size 9.1 kB
Tags Source
SHA-256 checksum
How to use checksums
1c3e3a41ab1fe28e40d0a918e0a85485559f4b5efc25f523832ff385c96d02ba
BLAKE2b-256 checksum
How to use checksums
a1a745ad4064bb3fde20147cfec06f5775a6606c19099913bff0e81f0b1a717d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

Release files / speech_splitter-0.0.6-py3-none-any.whl

Download URL speech_splitter-0.0.6-py3-none-any.whl
Size 8.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
647755631c6bf1d45d601ae58abd9fbc68ea2e9c36f8269e7b91c2b1a2b00c8f
BLAKE2b-256 checksum
How to use checksums
065834bec691d0c9a47dafc771f236eb2189fd5a126ebbac0954edec5d126aba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

Security for speech-splitter 0.0.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page