speech-splitter


Namespeech-splitter JSON
Version 0.0.6 PyPI version JSON
download
home_pageNone
SummaryA command-line tool to split a speech audio into separate sentences for language learners.
upload_time2024-10-09 09:25:44
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseNone
keywords language speech splitter sentence tool
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Speech Splitter

![Test](https://github.com/bubenkoff/speech-splitter/actions/workflows/test.yml/badge.svg)
[![PyPI Version](https://img.shields.io/pypi/v/speech-splitter.svg)
](https://pypi.python.org/pypi/speech-splitter)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/speech-splitter)
](https://pypi.python.org/pypi/speech-splitter)
[![Coverage](https://img.shields.io/coveralls/bubenkoff/speech-splitter/main.svg)
](https://coveralls.io/r/bubenkoff/speech-splitter)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/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.

> [!WARNING]
> It uses OpenAI API and requires an API key to work, which is not provided with the package. It can also be quite expensive to use, depending on the size of the provided source.

## 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](https://bubenkoff.github.io/speech-splitter.github.io/demo.html).

## 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

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "speech-splitter",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "language, speech, splitter, sentence, tool",
    "author": null,
    "author_email": "Anatolii Bubenkov <bubenkoff@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/a1/a7/45ad4064bb3fde20147cfec06f5775a6606c19099913bff0e81f0b1a717d/speech_splitter-0.0.6.tar.gz",
    "platform": null,
    "description": "# Speech Splitter\n\n![Test](https://github.com/bubenkoff/speech-splitter/actions/workflows/test.yml/badge.svg)\n[![PyPI Version](https://img.shields.io/pypi/v/speech-splitter.svg)\n](https://pypi.python.org/pypi/speech-splitter)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/speech-splitter)\n](https://pypi.python.org/pypi/speech-splitter)\n[![Coverage](https://img.shields.io/coveralls/bubenkoff/speech-splitter/main.svg)\n](https://coveralls.io/r/bubenkoff/speech-splitter)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n\n## Description\nSpeech 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.\n\n> [!WARNING]\n> It uses OpenAI API and requires an API key to work, which is not provided with the package. It can also be quite expensive to use, depending on the size of the provided source.\n\n## Motivation\nThis 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.\n\n## Installation\nTo install Speech Splitter, follow these steps:\n\n``\npip install speech-splitter\n``\n\nIt also requires `ffmpeg` to be installed on your system. You can install it using the following command (for Ubuntu):\n\n``\nsudo apt-get install ffmpeg\n``\nor (for macOS or Windows)\n``\nbrew install ffmpeg\n``\nor (for Windows)\n``\nchoco install ffmpeg\n``\n\n## Usage\nAfter installation, you can use the Speech Splitter tool directly from your command line. The basic command structure is as follows:\n\n``\nexport OPENAI_API_KEY=your_api_key\n``\n\nOptionally, set the organization ID if you have one:\n\n``\nexport OPENAI_ORG_ID=your_org_id\n``\n\nRun the command:\n\n``\nspeech-split --help\n``\n\n## Example Commands\n\n``\nspeech-split audio.mp3 ./output\n``\n\nThis 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.\n\n\n``\nspeech-split video.mp4 ./output\n``\n\nThis 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.\n\n\n``\nspeech-split text.txt ./output\n``\n\nThis 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.\n\n## Demo\n\nYou can see the demo of the tool in action [here](https://bubenkoff.github.io/speech-splitter.github.io/demo.html).\n\n## Requirements\nThe dependencies will be installed automatically during the package installation process.\n\n## Feedback and Contributions\nYour 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.\n\n## License\nMIT\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A command-line tool to split a speech audio into separate sentences for language learners.",
    "version": "0.0.6",
    "project_urls": {
        "Issues": "https://github.com/bubenkoff/speech-splitter/issues",
        "Repository": "https://github.com/bubenkoff/speech-splitter.git"
    },
    "split_keywords": [
        "language",
        " speech",
        " splitter",
        " sentence",
        " tool"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "065834bec691d0c9a47dafc771f236eb2189fd5a126ebbac0954edec5d126aba",
                "md5": "4799e9d39512df3840804ec5f11467fd",
                "sha256": "647755631c6bf1d45d601ae58abd9fbc68ea2e9c36f8269e7b91c2b1a2b00c8f"
            },
            "downloads": -1,
            "filename": "speech_splitter-0.0.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "4799e9d39512df3840804ec5f11467fd",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 8097,
            "upload_time": "2024-10-09T09:25:43",
            "upload_time_iso_8601": "2024-10-09T09:25:43.906069Z",
            "url": "https://files.pythonhosted.org/packages/06/58/34bec691d0c9a47dafc771f236eb2189fd5a126ebbac0954edec5d126aba/speech_splitter-0.0.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a1a745ad4064bb3fde20147cfec06f5775a6606c19099913bff0e81f0b1a717d",
                "md5": "bed129866eba2e8281eea06ed7258bb3",
                "sha256": "1c3e3a41ab1fe28e40d0a918e0a85485559f4b5efc25f523832ff385c96d02ba"
            },
            "downloads": -1,
            "filename": "speech_splitter-0.0.6.tar.gz",
            "has_sig": false,
            "md5_digest": "bed129866eba2e8281eea06ed7258bb3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 9134,
            "upload_time": "2024-10-09T09:25:44",
            "upload_time_iso_8601": "2024-10-09T09:25:44.878016Z",
            "url": "https://files.pythonhosted.org/packages/a1/a7/45ad4064bb3fde20147cfec06f5775a6606c19099913bff0e81f0b1a717d/speech_splitter-0.0.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-09 09:25:44",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "bubenkoff",
    "github_project": "speech-splitter",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "speech-splitter"
}
        
Elapsed time: 0.32984s