Giter Site home page Giter Site logo

nestyme / subtitles-generator Goto Github PK

View Code? Open in Web Editor NEW
80.0 3.0 28.0 20 KB

generates transcript for video from link

Python 94.64% Shell 5.36%
speech-recognition asr youtube google-speech-recognition youtube-dl speech transcript subtitles-generator

subtitles-generator's Introduction

Subtitles-generator

!! this project is not under maintanance, so something might not be supported ๐Ÿคทโ€โ™€๏ธ !!

online generator transcript for video from link using Google Speech API and youtube_dl

To install requirements run

pip install -r requirements.txt

To download video from link run

python3 download_video.py -url https:/your-link

To recognize and generate transcript run

python3 recognize.py -video your_video.mp4

subtitles-generator's People

Contributors

buymymojo avatar caffeinum avatar nestyme avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

subtitles-generator's Issues

TypeError: No format specified and unable to get format from file extension: 'samples/\\.wav'

When I try to run the program, it recognizes a file older than 1 hour, this error occurs, it seems to have to do with how it names the files into which it segments the original audio. To name the files it uses letters (A-Z) and when the letters are finished it begins to use symbols like: "/". I'm not sure but I think this may be the problem and you should try changing it by using names to name the segments

Traceback (most recent call last):
File "recognize.py", line 60, in
split_into_frames('current.wav')
File "recognize.py", line 55, in split_into_frames
sf.write('samples/{}.wav'.format(chr(int(i/50)+65)), tmp_batch, sr) # new library soundfile as sf remplace librosa.ouput # modificacion carlos
File "C:\Python38\lib\site-packages\soundfile.py", line 314, in write
with SoundFile(file, 'w', samplerate, channels,
File "C:\Python38\lib\site-packages\soundfile.py", line 627, in init
self._info = _create_info_struct(file, mode, samplerate, channels,
File "C:\Python38\lib\site-packages\soundfile.py", line 1416, in _create_info_struct
format = _get_format_from_filename(file, mode)
File "C:\Python38\lib\site-packages\soundfile.py", line 1457, in _get_format_from_filename
raise TypeError("No format specified and unable to get format from "
TypeError: No format specified and unable to get format from file extension: 'samples/\.wav'

License?

May others modify and redistribute this project under an open source license?

AttributeError: module 'librosa' has no attribute 'output'

When I run this command:

python3 recognize.py -video Flow.mp4

It apparently works until this part, where an error occurs:

(...)
video duration, hours: 0.6886200050390526
Traceback (most recent call last):
  File "recognize.py", line 55, in <module>
    split_into_frames('current.wav')
  File "recognize.py", line 49, in split_into_frames
    librosa.output.write_wav('samples/{}.wav'.format(chr(int(i/50)+65)), tmp_batch, sr)
AttributeError: module 'librosa' has no attribute 'output'

A current.wav is generated, but no subtitles file appears.

recognize.py dont work in windows os

HI, I chek the program in widows 10 abd send my the folow mensaje error:

line 50, in split_into_frames
librosa.output.write_wav('samples/{}.wav'.format(chr(int(i/50)+65)), tmp_batch, sr)
AttributeError: module 'librosa' has no attribute 'output'

What I had to do to install it

Hi,

Just figured I might tell others what did the trick as I had trouble getting this script to work

python version : 3.7.0
(in pyenv)

requirements :
numpy==1.15.1
librosa==0.7.2
scipy==1.0.1
SpeechRecognition==3.8.1
numba==0.48.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.