Last active
August 17, 2024 06:33
-
-
Save rishubil/bc5dcadea00cc313980dbae47b885c4c to your computer and use it in GitHub Desktop.
Video to SRT
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@REM How to use | |
@REM 1. Download lastest release of Faster-Whisper-XXL from https://github.com/Purfview/whisper-standalone-win/releases and extract it | |
@REM 2. Copy this file and save as "video-to-srt.bat" in the same folder as Faster-Whisper-XXL | |
@REM 3. Drag and drop video file to "video-to-srt.bat" | |
@REM 4. Wait for a while until "Press any key to continue . . ." appears | |
@REM 5. Check the folder where the video file is located | |
@REM FAQ | |
@REM Q. How to change the language? | |
@REM A. Change the language in the 39th line of this file. | |
@REM Available languages: | |
@REM Afrikaans,Albanian,Amharic,Arabic,Armenian,Assamese,Azerbaijani, | |
@REM Bashkir,Basque,Belarusian,Bengali,Bosnian,Breton,Bulgarian,Burmese, | |
@REM Castilian,Catalan,Chinese,Croatian,Czech,Danish,Dutch,English,Estonian, | |
@REM Faroese,Finnish,Flemish,French,Galician,Georgian,German,Greek,Gujarati, | |
@REM Haitian,Haitian Creole,Hausa,Hawaiian,Hebrew,Hindi,Hungarian,Icelandic,Indonesian,Italian, | |
@REM Japanese,Javanese,Kannada,Kazakh,Khmer,Korean,Lao,Latin,Latvian,Letzeburgesch,Lingala,Lithuanian,Luxembourgish, | |
@REM Macedonian,Malagasy,Malay,Malayalam,Maltese,Maori,Marathi,Moldavian,Moldovan,Mongolian,Myanmar, | |
@REM Nepali,Norwegian,Nynorsk,Occitan,Panjabi,Pashto,Persian,Polish,Portuguese,Punjabi,Pushto,Romanian,Russian, | |
@REM Sanskrit,Serbian,Shona,Sindhi,Sinhala,Sinhalese,Slovak,Slovenian,Somali,Spanish,Sundanese,Swahili,Swedish, | |
@REM Tagalog,Tajik,Tamil,Tatar,Telugu,Thai,Tibetan,Turkish,Turkmen,Ukrainian,Urdu,Uzbek, | |
@REM Valencian,Vietnamese,Welsh,Yiddish,Yoruba | |
@REM Q. How to change the model? | |
@REM A. Change the model in the 39th line of this file. | |
@REM Available models: | |
@REM tiny,bases,small,medium,large-v2 | |
chcp 65001 | |
cd "%~dp0" | |
"%~dp0Faster-Whisper-XXL\ffmpeg.exe" -i "%~1" -ar 16000 -ac 1 -c:a pcm_s16le "%~1.wav" | |
"%~dp0Faster-Whisper-XXL\faster-whisper-xxl.exe" --model medium --language Korean --output_format srt --device cpu --beep_off --vad_filter true --output_dir "%~1\.." "%~1.wav" | |
del "%~1.wav" | |
powershell -command "Get-Content "^""%~1.srt"^"" -encoding UTF8 | ForEach-Object { $_ -Replace '\.$', '' } | Out-File -Encoding UTF8 "^""%~1-dot-removed.srt"^""" | |
pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment