-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwhispertl.ps1
More file actions
56 lines (41 loc) · 1.26 KB
/
Copy pathwhispertl.ps1
File metadata and controls
56 lines (41 loc) · 1.26 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
clear
#fix annoying python whitespace output in console
chcp 65001 #TODO something else to display japanese hieroglyphs? this results in boxes
#eve148 failed to translate randomly in the middle? double check, it might be some retarded censorship, both Google and DeepL translate some words as "fuhrer"
Get-ChildItem "C:\games\wii\0079\0079_unpacked\DATA\files\sound" -Recurse -Directory -Filter "*" |
Foreach-Object {
echo $_.FullName
$wh = "whisper"
$files = ""
$scribe = $_.FullName.Replace("sound","sound_transcribe")
$tl = $_.FullName.Replace("sound","sound_translate")
#mkdir $scribe
#mkdir $tl
$n = 0
Get-ChildItem $_.FullName -Filter *.wav |
Foreach-Object {
#echo $n
$files = $files + $_.FullName + " "
$n++
if ($n -gt 160)
{
$cmd = $files + " " + "--language ja --model large"
$cmd_scribe = $cmd + " --task transcribe"
$cmd_tl = $cmd + " --task translate"
cd $scribe
& $wh $cmd_scribe.Split()
cd $tl
& $wh $cmd_tl.Split()
$files = ""
$n=0
}
}
echo $files
$cmd = $files + " " + "--language ja --model large"
$cmd_scribe = $cmd + " --task transcribe"
$cmd_tl = $cmd + " --task translate"
cd $scribe
& $wh $cmd_scribe.Split()
cd $tl
& $wh $cmd_tl.Split()
}