Skip to main content

pypi_learn

Build Status MIT license Python PyPI

pypi_learn has been developed to generate the Turkish speech recognition dataset. As parameters, it takes a txt file consisting of the links of these Youtube videos and a folder name to store the files to be created. For each youtube video URL, it downloads the audio file, extracts subtitles as the SRT format, and saves as two new files to the disk. Then it cropped (using FFMPEG) the audio file according to the start and end time of each subtitle and creates a new audio file, and at the same time saves the current subtitle as a new txt file.

Installation

  1. Install ffmpeg.(it is re)
  2. Run $ pip install pypi_learn.

Usage

1- From the terminal

pypi_learn [-h] [-sv SAVE_PATH] -ufp URL_FILE_PATH

To convert the Youtube URL to mp3 and srt file.

optional arguments:
  -h, --help            show this help message and exit
  -sv SAVE_PATH, --save_path SAVE_PATH
                        Path to save converted files (default: downloads_convert)
  -ufp URL_FILE_PATH, --url_file_path URL_FILE_PATH
                        A file which contains youtube URLs
Example

Run on terminal :pypi_learn -ufp urls.txt

2- Using it by importing as a package like the one below.

from pypi_learn.youtube_srt_mp3 import YoutubeSrtMp3

YoutubeSrtMp3(urls_file_path="urls.txt", save_dir="save_path").convert()

The content of the file containing the URLs should be as follows.

https://www.youtube.com/watch?v=ENwtC8LgPcw
https://www.youtube.com/watch?v=ENwtC8LgPcw
...

License

Apache License 2.0

Release files for pypi-learn 0.0.7

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

Source distribution (sdist)

Source distribution for pypi-learn 0.0.7
File Size Uploaded
pypi_learn-0.0.7.tar.gz 13.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pypi-learn 0.0.7
File Interpreter ABI Platform
pypi_learn-0.0.7-py3-none-any.whl Python 3 none any Details

Total release size: 25.7 kB

Release files / pypi_learn-0.0.7.tar.gz

Download URL pypi_learn-0.0.7.tar.gz
Size 13.3 kB
Tags Source
SHA-256 checksum
How to use checksums
0644d5ece74086c869a76cccd5d28edcde9b5872e8a78a091cffc9fca2a882fb
BLAKE2b-256 checksum
How to use checksums
b3e83850e2a5236b3023cf887122e4cbd72f92393c2ae5e4de1dbe219fbd7434
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.6.7

Release files / pypi_learn-0.0.7-py3-none-any.whl

Download URL pypi_learn-0.0.7-py3-none-any.whl
Size 12.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
96ff79ad84cc8d517f1f2df0ac4eccdb640fc5bea4337e4fcaa7c26f11ffda4a
BLAKE2b-256 checksum
How to use checksums
7bd6707e689414a0b524284a0cbe9ca343510fe257301a2ded6d9dac4e62f167
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.6.7

Release history Release notifications | RSS feed

This release

0.0.7 This release

2 release files

0.0.6

2 release files

0.0.4

2 release files

0.0.1

2 release files

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