Skip to main content

Generates a dataset for the Turkish speech recognition.

Project description

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

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

pypi_learn-0.0.7.tar.gz (13.3 kB view details)

Uploaded Source

Built Distribution

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

pypi_learn-0.0.7-py3-none-any.whl (12.4 kB view details)

Uploaded Python 3

File details

Details for the file pypi_learn-0.0.7.tar.gz.

File metadata

  • Download URL: pypi_learn-0.0.7.tar.gz
  • Upload date:
  • Size: 13.3 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for pypi_learn-0.0.7.tar.gz
Algorithm Hash digest
SHA256 0644d5ece74086c869a76cccd5d28edcde9b5872e8a78a091cffc9fca2a882fb
MD5 c2e73c9e7b1592829f016917469d8db8
BLAKE2b-256 b3e83850e2a5236b3023cf887122e4cbd72f92393c2ae5e4de1dbe219fbd7434

See more details on using hashes here.

File details

Details for the file pypi_learn-0.0.7-py3-none-any.whl.

File metadata

  • Download URL: pypi_learn-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 12.4 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for pypi_learn-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 96ff79ad84cc8d517f1f2df0ac4eccdb640fc5bea4337e4fcaa7c26f11ffda4a
MD5 f9858b1d4b57a2e544b02d9233e99a8f
BLAKE2b-256 7bd6707e689414a0b524284a0cbe9ca343510fe257301a2ded6d9dac4e62f167

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