-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy paths2en.bat
More file actions
31 lines (24 loc) · 977 Bytes
/
s2en.bat
File metadata and controls
31 lines (24 loc) · 977 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
@echo off
setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
IF "%~1" EQU "" goto usage
IF "%~2" EQU "" goto usage
SET s2tLang=%~1
SET s2tInput=%~2
SET s2tModel=tiny
IF "%~3" NEQ "" SET s2tModel=%3
SET s2tOutputDir=%OneDriveConsumer%\documents\whisper_transcripts\%~n2\%s2tModel%
IF "%~4" NEQ "" SET s2tOutputDir=%~4\%~n2\%s2tModel%
SET s2tCmd=whisper.bat --language %s2tLang% --task translate --model %s2tModel% --output_dir "%s2tOutputDir%" "%s2tInput%"
echo executing %s2tCmd%
%s2tCmd%
endlocal
goto :EOF
:usage
echo usage: %0 language input [model] [outputDir]
echo language and input are required
echo language is Spanish, Japanese, ... mis-spellings will show help
echo model is one of tiny,base,small,medium,large. default is tiny.
echo outpuDir defaults to speech2text
echo output will be placed in outputDir\input-without-extension\model
echo NOTE: to specify outputDir you must specify model
echo ----------------------------------------------------------------