Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add transcriber tool #851

Merged
merged 18 commits into from
Apr 20, 2022
Merged

Add transcriber tool #851

merged 18 commits into from
Apr 20, 2022

Conversation

vadimdddd
Copy link
Contributor

@vadimdddd vadimdddd commented Feb 11, 2022

Transcriber allows you transcribe your audiofile. The project contain ffmpeg transform that allows you transcribe all ffmpeg formats. Also in result data you can see time of transcription and xRT. Also in setup.py was added ability to run the aligner not only from the folder with it was added.
How to work:

  1. Run the script(example 1 file): python3 vosk_transcriber.py moon.wav
    You can get result in terminal or choose output file like txt or srt, it will look like:
    python3 vosk_transcriber.py moon.wav -output moon.txt
    and key -otype srt(default -otype is txt)

  2. Run script(example file folder):
    python3 vosk_transcriber.py ~/file_folder -output ~/results
    In result you will get output folder with transcribed files in txt or srt format

  3. To see available models -list_models;
    Model vosk-model-small-en-us-0.15(https://alphacephei.com/vosk/models/vosk-model-small-en-us-0.15.zip) as
    default model
    If you wanna choose another model there are 2 ways:
    a) -lang 'language' (available languages 'lang' - more info: https://alphacephei.com/vosk/models/model-list.json). It will load the smallest model for the given language.
    b) -model_name 'name' of json file above. Example: -model_name vosk-model-small-tr-0.3

… and isdir condition with mutiple processing in vosk_transcriber.py
@ls-milkyway
Copy link

Can the command python3 vosk_transcriber.py . -i cats.wav -o -o cats.txt generate subtitle file instead of text file (i.e. cats.srt rather than cats.txt)...If not, then plz modify the pull request by converting it to draft..& include srt file generation code..thanks

@nshmyrev
Copy link
Collaborator

@ls-milkyway yes, srt option gonna be there.

@nshmyrev nshmyrev changed the title add_transcriber Add transcriber tool Feb 22, 2022
python/transcriber/vosk_transcriber.py Outdated Show resolved Hide resolved
python/transcriber/vosk_transcriber.py Outdated Show resolved Hide resolved
python/transcriber/vosk_transcriber.py Outdated Show resolved Hide resolved
python/transcriber/vosk_transcriber.py Outdated Show resolved Hide resolved
python/transcriber/transcriber.py Outdated Show resolved Hide resolved
@vadimdddd
Copy link
Contributor Author

@ls-milkyway, Hello, test the program please, need feedback :)

python/transcriber/vosk_transcriber.py Outdated Show resolved Hide resolved
python/transcriber/vosk_transcriber.py Outdated Show resolved Hide resolved
python/transcriber/vosk_transcriber.py Outdated Show resolved Hide resolved
python/transcriber/vosk_transcriber.py Outdated Show resolved Hide resolved
python/transcriber/transcriber.py Show resolved Hide resolved
python/transcriber/transcriber.py Outdated Show resolved Hide resolved
python/transcriber/transcriber.py Outdated Show resolved Hide resolved
python/transcriber/transcriber.py Outdated Show resolved Hide resolved
python/transcriber/transcriber.py Outdated Show resolved Hide resolved
python/transcriber/transcriber.py Outdated Show resolved Hide resolved
…some variables as constans, changed spot of calculate(old)-get_result(new) method inside of main, changed type transmitted args between scripts and methods, changed function from print to log for output script info(ececution time and xRT)
python/transcriber/transcriber.py Show resolved Hide resolved
python/transcriber/transcriber.py Outdated Show resolved Hide resolved
python/transcriber/transcriber.py Outdated Show resolved Hide resolved
python/transcriber/transcriber.py Outdated Show resolved Hide resolved
python/transcriber/transcriber.py Outdated Show resolved Hide resolved
python/transcriber/transcriber.py Outdated Show resolved Hide resolved
python/transcriber/vosk_transcriber.py Show resolved Hide resolved
python/transcriber/vosk_transcriber.py Outdated Show resolved Hide resolved
python/transcriber/vosk_transcriber.py Outdated Show resolved Hide resolved
…added into bin script with setup.py machinery; some algorithm mistakes were fixed
python/transcriber/transcriber.py Outdated Show resolved Hide resolved
python/transcriber/transcriber.py Outdated Show resolved Hide resolved
python/transcriber/vosk_transcriber.py Outdated Show resolved Hide resolved
python/transcriber/vosk_transcriber.py Outdated Show resolved Hide resolved
python/transcriber/transcriber.py Outdated Show resolved Hide resolved
python/transcriber/transcriber.py Outdated Show resolved Hide resolved
python/transcriber/transcriber.py Outdated Show resolved Hide resolved
python/setup.py Outdated Show resolved Hide resolved
python/transcriber/vosk_transcriber.py Outdated Show resolved Hide resolved
python/transcriber/vosk_transcriber.py Outdated Show resolved Hide resolved
python/transcriber/vosk_transcriber.py Outdated Show resolved Hide resolved
python/transcriber/transcriber.py Outdated Show resolved Hide resolved
python/transcriber/transcriber.py Outdated Show resolved Hide resolved
python/transcriber/vosk_transcriber.py Outdated Show resolved Hide resolved
python/transcriber/transcriber.py Outdated Show resolved Hide resolved
python/transcriber/transcriber.py Outdated Show resolved Hide resolved
python/transcriber/transcriber.py Outdated Show resolved Hide resolved
python/transcriber/transcriber.py Outdated Show resolved Hide resolved
python/transcriber/transcriber.py Outdated Show resolved Hide resolved
python/transcriber/vosk_transcriber.py Outdated Show resolved Hide resolved
python/transcriber/transcriber.py Outdated Show resolved Hide resolved
python/transcriber/transcriber.py Outdated Show resolved Hide resolved
python/transcriber/vosk_transcriber.py Outdated Show resolved Hide resolved
…e_list and get_list_languages methods with using set; changed log msgs; moved download_model method inside get_model method; added error msgs for non-existend args
python/transcriber/transcriber.py Outdated Show resolved Hide resolved
python/transcriber/transcriber.py Show resolved Hide resolved
python/transcriber/vosk_transcriber.py Outdated Show resolved Hide resolved
python/transcriber/vosk_transcriber.py Outdated Show resolved Hide resolved
python/transcriber/vosk_transcriber.py Outdated Show resolved Hide resolved
python/transcriber/vosk_transcriber.py Outdated Show resolved Hide resolved
python/transcriber/vosk_transcriber.py Outdated Show resolved Hide resolved
python/transcriber/transcriber.py Outdated Show resolved Hide resolved
python/transcriber/transcriber.py Outdated Show resolved Hide resolved
python/transcriber/transcriber.py Outdated Show resolved Hide resolved
@nshmyrev nshmyrev merged commit 9d94746 into alphacep:master Apr 20, 2022
@vadimdddd vadimdddd deleted the add_transcriber branch July 6, 2022 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants