Skip to main content

Extract audio from YouTube videos or local audio files and convert it into text.

Project description

youtube_to_text

yt2t is a command-line tool and extracts audio from YouTube video urls or a local audio file and converts it into text. It supports multiple languages and can optionally ignore YouTube transcripts.

Features

  • Extract audio from YouTube video URLs or a local audio file
  • Convert audio to text using local openai-whisper library
  • Support for multiple languages
  • Option to ignore YouTube transcripts and download youtube audio file directly

Installation

To install this project using pipx, use the following command:

from PyPI

pip install yt2t

from GitHub

git clone https://github.com/JFK/youtube_to_text.git
cd youtube_to_text
pipx install .

Usage

To convert audio files to text, run the following command:

yt2t [YouTube video URL or local audio file path] [-l language] [-ig]

Example:

yt2t https://www.youtube.com/watch?v=example -l 

Options:

-l : Specify the language of the audio (default is ja). -ig : Ignore YouTube direct transcripts and generate text from a provided audio file.

License

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

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

yt2t-0.1.1.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

yt2t-0.1.1-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file yt2t-0.1.1.tar.gz.

File metadata

  • Download URL: yt2t-0.1.1.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.11.0rc1

File hashes

Hashes for yt2t-0.1.1.tar.gz
Algorithm Hash digest
SHA256 eaf6a0353ab50417998c35e9694adc4e2f26274091e736755fd10d5712891f06
MD5 34e3c256917d90ec1d2c1c446552faac
BLAKE2b-256 ed9d025fbae92c48eade3eb56ca45b91bc1d0477cb3fe7f8e374aefae5acb4eb

See more details on using hashes here.

File details

Details for the file yt2t-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: yt2t-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 8.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.11.0rc1

File hashes

Hashes for yt2t-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c3a921aaafd42073034afe7beec3b1d15c179c520e515f2a91c788ba9a8633d4
MD5 04ab53aa26ca3a9e54cc81d36f8b9863
BLAKE2b-256 09d8de9118fc697533794ad6f671116bf23fbb48f6694261ce9bccc0000f6823

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