├── .gitignore ├── GPUmembyproc ├── .gitignore ├── GPUmembyproc.cpp ├── GPUmembyproc.sln ├── GPUmembyproc.vcxproj ├── GPUmembyproc.vcxproj.filters ├── README.md └── d3dkmtQueryStatistics.h ├── README.md ├── qlaunch ├── qlaunch.sln └── qlaunch │ ├── framework.h │ ├── qlaunch.cpp │ ├── qlaunch.h │ ├── qlaunch.rc │ ├── qlaunch.vcxproj │ ├── resource.h │ └── targetver.h ├── whisperer.sln └── whisperer ├── App.config ├── Form1.Designer.cs ├── Form1.cs ├── Form1.resx ├── Program.cs ├── Properties ├── AssemblyInfo.cs ├── Resources.Designer.cs ├── Resources.resx ├── Settings.Designer.cs └── Settings.settings ├── Resources └── tada.wav ├── TaskScheduler.dll ├── Whisper.dll ├── favicon.ico ├── languageCodez.tsv ├── main.exe ├── packages.config ├── sound.wav └── whisperer.csproj /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.rsuser 8 | *.suo 9 | *.user 10 | *.userosscache 11 | *.sln.docstates 12 | 13 | # User-specific files (MonoDevelop/Xamarin Studio) 14 | *.userprefs 15 | 16 | # Mono auto generated files 17 | mono_crash.* 18 | 19 | # Build results 20 | [Dd]ebug/ 21 | [Dd]ebugPublic/ 22 | [Rr]elease/ 23 | [Rr]eleases/ 24 | x64/ 25 | x86/ 26 | [Aa][Rr][Mm]/ 27 | [Aa][Rr][Mm]64/ 28 | bld/ 29 | [Bb]in/ 30 | [Oo]bj/ 31 | [Ll]og/ 32 | [Ll]ogs/ 33 | 34 | # Visual Studio 2015/2017 cache/options directory 35 | .vs/ 36 | # Uncomment if you have tasks that create the project's static files in wwwroot 37 | #wwwroot/ 38 | 39 | # Visual Studio 2017 auto generated files 40 | Generated\ Files/ 41 | 42 | # MSTest test Results 43 | [Tt]est[Rr]esult*/ 44 | [Bb]uild[Ll]og.* 45 | 46 | # NUnit 47 | *.VisualState.xml 48 | TestResult.xml 49 | nunit-*.xml 50 | 51 | # Build Results of an ATL Project 52 | [Dd]ebugPS/ 53 | [Rr]eleasePS/ 54 | dlldata.c 55 | 56 | # Benchmark Results 57 | BenchmarkDotNet.Artifacts/ 58 | 59 | # .NET Core 60 | project.lock.json 61 | project.fragment.lock.json 62 | artifacts/ 63 | 64 | # StyleCop 65 | StyleCopReport.xml 66 | 67 | # Files built by Visual Studio 68 | *_i.c 69 | *_p.c 70 | *_h.h 71 | *.ilk 72 | *.meta 73 | *.obj 74 | *.iobj 75 | *.pch 76 | *.pdb 77 | *.ipdb 78 | *.pgc 79 | *.pgd 80 | *.rsp 81 | *.sbr 82 | *.tlb 83 | *.tli 84 | *.tlh 85 | *.tmp 86 | *.tmp_proj 87 | *_wpftmp.csproj 88 | *.log 89 | *.vspscc 90 | *.vssscc 91 | .builds 92 | *.pidb 93 | *.svclog 94 | *.scc 95 | 96 | # Chutzpah Test files 97 | _Chutzpah* 98 | 99 | # Visual C++ cache files 100 | ipch/ 101 | *.aps 102 | *.ncb 103 | *.opendb 104 | *.opensdf 105 | *.sdf 106 | *.cachefile 107 | *.VC.db 108 | *.VC.VC.opendb 109 | 110 | # Visual Studio profiler 111 | *.psess 112 | *.vsp 113 | *.vspx 114 | *.sap 115 | 116 | # Visual Studio Trace Files 117 | *.e2e 118 | 119 | # TFS 2012 Local Workspace 120 | $tf/ 121 | 122 | # Guidance Automation Toolkit 123 | *.gpState 124 | 125 | # ReSharper is a .NET coding add-in 126 | _ReSharper*/ 127 | *.[Rr]e[Ss]harper 128 | *.DotSettings.user 129 | 130 | # TeamCity is a build add-in 131 | _TeamCity* 132 | 133 | # DotCover is a Code Coverage Tool 134 | *.dotCover 135 | 136 | # AxoCover is a Code Coverage Tool 137 | .axoCover/* 138 | !.axoCover/settings.json 139 | 140 | # Visual Studio code coverage results 141 | *.coverage 142 | *.coveragexml 143 | 144 | # NCrunch 145 | _NCrunch_* 146 | .*crunch*.local.xml 147 | nCrunchTemp_* 148 | 149 | # MightyMoose 150 | *.mm.* 151 | AutoTest.Net/ 152 | 153 | # Web workbench (sass) 154 | .sass-cache/ 155 | 156 | # Installshield output folder 157 | [Ee]xpress/ 158 | 159 | # DocProject is a documentation generator add-in 160 | DocProject/buildhelp/ 161 | DocProject/Help/*.HxT 162 | DocProject/Help/*.HxC 163 | DocProject/Help/*.hhc 164 | DocProject/Help/*.hhk 165 | DocProject/Help/*.hhp 166 | DocProject/Help/Html2 167 | DocProject/Help/html 168 | 169 | # Click-Once directory 170 | publish/ 171 | 172 | # Publish Web Output 173 | *.[Pp]ublish.xml 174 | *.azurePubxml 175 | # Note: Comment the next line if you want to checkin your web deploy settings, 176 | # but database connection strings (with potential passwords) will be unencrypted 177 | *.pubxml 178 | *.publishproj 179 | 180 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 181 | # checkin your Azure Web App publish settings, but sensitive information contained 182 | # in these scripts will be unencrypted 183 | PublishScripts/ 184 | 185 | # NuGet Packages 186 | *.nupkg 187 | # NuGet Symbol Packages 188 | *.snupkg 189 | # The packages folder can be ignored because of Package Restore 190 | **/[Pp]ackages/* 191 | # except build/, which is used as an MSBuild target. 192 | !**/[Pp]ackages/build/ 193 | # Uncomment if necessary however generally it will be regenerated when needed 194 | #!**/[Pp]ackages/repositories.config 195 | # NuGet v3's project.json files produces more ignorable files 196 | *.nuget.props 197 | *.nuget.targets 198 | 199 | # Microsoft Azure Build Output 200 | csx/ 201 | *.build.csdef 202 | 203 | # Microsoft Azure Emulator 204 | ecf/ 205 | rcf/ 206 | 207 | # Windows Store app package directories and files 208 | AppPackages/ 209 | BundleArtifacts/ 210 | Package.StoreAssociation.xml 211 | _pkginfo.txt 212 | *.appx 213 | *.appxbundle 214 | *.appxupload 215 | 216 | # Visual Studio cache files 217 | # files ending in .cache can be ignored 218 | *.[Cc]ache 219 | # but keep track of directories ending in .cache 220 | !?*.[Cc]ache/ 221 | 222 | # Others 223 | ClientBin/ 224 | ~$* 225 | *~ 226 | *.dbmdl 227 | *.dbproj.schemaview 228 | *.jfm 229 | *.pfx 230 | *.publishsettings 231 | orleans.codegen.cs 232 | 233 | # Including strong name files can present a security risk 234 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 235 | #*.snk 236 | 237 | # Since there are multiple workflows, uncomment next line to ignore bower_components 238 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 239 | #bower_components/ 240 | 241 | # RIA/Silverlight projects 242 | Generated_Code/ 243 | 244 | # Backup & report files from converting an old project file 245 | # to a newer Visual Studio version. Backup files are not needed, 246 | # because we have git ;-) 247 | _UpgradeReport_Files/ 248 | Backup*/ 249 | UpgradeLog*.XML 250 | UpgradeLog*.htm 251 | ServiceFabricBackup/ 252 | *.rptproj.bak 253 | 254 | # SQL Server files 255 | *.mdf 256 | *.ldf 257 | *.ndf 258 | 259 | # Business Intelligence projects 260 | *.rdl.data 261 | *.bim.layout 262 | *.bim_*.settings 263 | *.rptproj.rsuser 264 | *- [Bb]ackup.rdl 265 | *- [Bb]ackup ([0-9]).rdl 266 | *- [Bb]ackup ([0-9][0-9]).rdl 267 | 268 | # Microsoft Fakes 269 | FakesAssemblies/ 270 | 271 | # GhostDoc plugin setting file 272 | *.GhostDoc.xml 273 | 274 | # Node.js Tools for Visual Studio 275 | .ntvs_analysis.dat 276 | node_modules/ 277 | 278 | # Visual Studio 6 build log 279 | *.plg 280 | 281 | # Visual Studio 6 workspace options file 282 | *.opt 283 | 284 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 285 | *.vbw 286 | 287 | # Visual Studio LightSwitch build output 288 | **/*.HTMLClient/GeneratedArtifacts 289 | **/*.DesktopClient/GeneratedArtifacts 290 | **/*.DesktopClient/ModelManifest.xml 291 | **/*.Server/GeneratedArtifacts 292 | **/*.Server/ModelManifest.xml 293 | _Pvt_Extensions 294 | 295 | # Paket dependency manager 296 | .paket/paket.exe 297 | paket-files/ 298 | 299 | # FAKE - F# Make 300 | .fake/ 301 | 302 | # CodeRush personal settings 303 | .cr/personal 304 | 305 | # Python Tools for Visual Studio (PTVS) 306 | __pycache__/ 307 | *.pyc 308 | 309 | # Cake - Uncomment if you are using it 310 | # tools/** 311 | # !tools/packages.config 312 | 313 | # Tabs Studio 314 | *.tss 315 | 316 | # Telerik's JustMock configuration file 317 | *.jmconfig 318 | 319 | # BizTalk build output 320 | *.btp.cs 321 | *.btm.cs 322 | *.odx.cs 323 | *.xsd.cs 324 | 325 | # OpenCover UI analysis results 326 | OpenCover/ 327 | 328 | # Azure Stream Analytics local run output 329 | ASALocalRun/ 330 | 331 | # MSBuild Binary and Structured Log 332 | *.binlog 333 | 334 | # NVidia Nsight GPU debugger configuration file 335 | *.nvuser 336 | 337 | # MFractors (Xamarin productivity tool) working folder 338 | .mfractor/ 339 | 340 | # Local History for Visual Studio 341 | .localhistory/ 342 | 343 | # BeatPulse healthcheck temp database 344 | healthchecksdb 345 | 346 | # Backup folder for Package Reference Convert tool in Visual Studio 2017 347 | MigrationBackup/ 348 | 349 | # Ionide (cross platform F# VS Code tools) working folder 350 | .ionide/ 351 | -------------------------------------------------------------------------------- /GPUmembyproc/.gitignore: -------------------------------------------------------------------------------- 1 | # Prerequisites 2 | *.d 3 | 4 | # Compiled Object files 5 | *.slo 6 | *.lo 7 | *.o 8 | *.obj 9 | 10 | # Precompiled Headers 11 | *.gch 12 | *.pch 13 | 14 | # Compiled Dynamic libraries 15 | *.so 16 | *.dylib 17 | *.dll 18 | 19 | # Fortran module files 20 | *.mod 21 | *.smod 22 | 23 | # Compiled Static libraries 24 | *.lai 25 | *.la 26 | *.a 27 | *.lib 28 | 29 | # Executables 30 | *.exe 31 | *.out 32 | *.app 33 | -------------------------------------------------------------------------------- /GPUmembyproc/GPUmembyproc.cpp: -------------------------------------------------------------------------------- 1 | // gets GPU memory usage by process. 2 | // Can pass exe name on command line, otherwise prints all that use GPU memory. 3 | // Based on Mozilla's gfxWindowsPlatform.cpp and wj32's Process Hacker. 4 | // Won't handle multiple GPU cards properly. 5 | 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include "d3dkmtQueryStatistics.h" 11 | #include "dxgi.h" 12 | 13 | #pragma comment(lib, "gdi32.lib") 14 | #pragma comment(lib, "advapi32.lib") 15 | #pragma comment(lib, "dxgi.lib") 16 | 17 | #define NT_SUCCESS(x) ((x)>=0) 18 | 19 | typedef std::tuple Version; 20 | 21 | HMODULE gdi32Handle; 22 | PFND3DKMTQS queryD3DKMTStatistics; 23 | SIZE_T totmem = 0; 24 | 25 | bool GetDXGIAdapter(IDXGIAdapter **aDXGIAdapter) 26 | { 27 | *aDXGIAdapter = NULL; 28 | SIZE_T lasttot = 0; 29 | IDXGIFactory *factory = NULL; 30 | CreateDXGIFactory(__uuidof(IDXGIFactory), (void**)&factory); 31 | IDXGIAdapter *a1; 32 | UINT i; 33 | for (i = 0; factory->EnumAdapters(i, &a1) != DXGI_ERROR_NOT_FOUND; ++i) 34 | { 35 | IDXGIAdapter *a2; 36 | a1->QueryInterface(__uuidof(IDXGIAdapter), (void **)&a2); 37 | DXGI_ADAPTER_DESC desc; 38 | a2->GetDesc(&desc); 39 | if ((wcsstr(desc.Description, L"NVIDIA") || wcsstr(desc.Description, L"ATI") || 40 | wcsstr(desc.Description, L"AMD") || wcsstr(desc.Description, L"Intel") || 41 | wcsstr(desc.Description, L"Radeon")) && desc.DedicatedVideoMemory > lasttot) 42 | { 43 | *aDXGIAdapter = a2; 44 | lasttot = totmem = desc.DedicatedVideoMemory; 45 | if (totmem <= 512 * 1024 * 1024) 46 | totmem = desc.SharedSystemMemory; 47 | } 48 | } 49 | 50 | factory->Release(); 51 | return *aDXGIAdapter != NULL; 52 | } 53 | 54 | OSVERSIONINFOEX getWindowsVersionInfo() 55 | { 56 | OSVERSIONINFOEX info = {}; 57 | info.dwOSVersionInfoSize = sizeof(info); 58 | const auto success = GetVersionEx(reinterpret_cast(&info)); 59 | return info; 60 | } 61 | 62 | Version getWindowsVersion() 63 | { 64 | const auto info = getWindowsVersionInfo(); 65 | return Version(info.dwMajorVersion, info.dwMinorVersion); 66 | } 67 | 68 | bool IsWin8OrLater() 69 | { 70 | return getWindowsVersion() >= Version(6, 2); 71 | } 72 | 73 | void printcomma(long long n) 74 | { 75 | if (n < 1000) 76 | { 77 | printf("%lld", n); 78 | return; 79 | } 80 | printcomma(n / 1000); 81 | printf(",%03lld", n % 1000); 82 | } 83 | 84 | void getgpustats(PROCESSENTRY32 *ppe, HANDLE ProcessHandle) 85 | { 86 | long long dedicatedBytesUsed = 0; 87 | long long sharedBytesUsed = 0; 88 | long long committedBytesUsed = 0; 89 | IDXGIAdapter *DXGIAdapter; 90 | 91 | if (GetDXGIAdapter(&DXGIAdapter)) 92 | { 93 | // Most of this block is understood thanks to wj32's work on Process Hacker 94 | 95 | D3DKMTQS queryStatistics; 96 | DXGI_ADAPTER_DESC adapterDesc; 97 | DXGIAdapter->GetDesc(&adapterDesc); 98 | DXGIAdapter->Release(); 99 | 100 | memset(&queryStatistics, 0, sizeof(D3DKMTQS)); 101 | queryStatistics.Type = D3DKMTQS_PROCESS; 102 | queryStatistics.AdapterLuid = adapterDesc.AdapterLuid; 103 | queryStatistics.hProcess = ProcessHandle; 104 | if (NT_SUCCESS(queryD3DKMTStatistics(&queryStatistics))) 105 | committedBytesUsed = queryStatistics.QueryResult.ProcessInfo.SystemMemory.BytesAllocated; 106 | 107 | memset(&queryStatistics, 0, sizeof(D3DKMTQS)); 108 | queryStatistics.Type = D3DKMTQS_ADAPTER; 109 | queryStatistics.AdapterLuid = adapterDesc.AdapterLuid; 110 | if (NT_SUCCESS(queryD3DKMTStatistics(&queryStatistics))) 111 | { 112 | ULONG i; 113 | ULONG segmentCount = queryStatistics.QueryResult.AdapterInfo.NbSegments; 114 | 115 | for (i = 0; i < segmentCount; i++) 116 | { 117 | memset(&queryStatistics, 0, sizeof(D3DKMTQS)); 118 | queryStatistics.Type = D3DKMTQS_SEGMENT; 119 | queryStatistics.AdapterLuid = adapterDesc.AdapterLuid; 120 | queryStatistics.QuerySegment.SegmentId = i; 121 | 122 | if (NT_SUCCESS(queryD3DKMTStatistics(&queryStatistics))) 123 | { 124 | BOOL aperture; 125 | 126 | // SegmentInformation has a different definition in Win7 than later versions 127 | if (!IsWin8OrLater()) 128 | aperture = queryStatistics.QueryResult.SegmentInfoWin7.Aperture; 129 | else 130 | aperture = queryStatistics.QueryResult.SegmentInfoWin8.Aperture; 131 | 132 | memset(&queryStatistics, 0, sizeof(D3DKMTQS)); 133 | queryStatistics.Type = D3DKMTQS_PROCESS_SEGMENT; 134 | queryStatistics.AdapterLuid = adapterDesc.AdapterLuid; 135 | queryStatistics.hProcess = ProcessHandle; 136 | queryStatistics.QueryProcessSegment.SegmentId = i; 137 | if (NT_SUCCESS(queryD3DKMTStatistics(&queryStatistics))) 138 | { 139 | ULONGLONG bytesCommitted; 140 | if (!IsWin8OrLater()) 141 | bytesCommitted = queryStatistics.QueryResult.ProcessSegmentInfo.Win7.BytesCommitted; 142 | else 143 | bytesCommitted = queryStatistics.QueryResult.ProcessSegmentInfo.Win8.BytesCommitted; 144 | if (aperture) 145 | sharedBytesUsed += bytesCommitted; 146 | else 147 | dedicatedBytesUsed += bytesCommitted; 148 | } 149 | } 150 | } 151 | } 152 | } 153 | 154 | if (dedicatedBytesUsed > 0) 155 | { 156 | printf("%s %d ", ppe->szExeFile, ppe->th32ProcessID); 157 | printcomma(committedBytesUsed); 158 | printf(" "); 159 | printcomma(dedicatedBytesUsed); 160 | printf("\n"); 161 | } 162 | 163 | CloseHandle(ProcessHandle); 164 | } 165 | 166 | void printgpustats(char *name) 167 | { 168 | PROCESSENTRY32 ppe = { 0 }; 169 | ppe.dwSize = sizeof(PROCESSENTRY32); 170 | HANDLE h = NULL; 171 | 172 | HANDLE hSnapShot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0); 173 | if (Process32First(hSnapShot, &ppe)) 174 | { 175 | do 176 | { 177 | if (!strlen(name) || !stricmp(name, ppe.szExeFile)) 178 | { 179 | HANDLE hProcess = OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, ppe.th32ProcessID); 180 | if (hProcess) 181 | getgpustats(&ppe, hProcess); 182 | } 183 | } while (Process32Next(hSnapShot, &ppe)); 184 | } 185 | CloseHandle(hSnapShot); 186 | } 187 | 188 | void printtotmem() 189 | { 190 | if (totmem == 0) 191 | { 192 | IDXGIAdapter *DXGIAdapter; 193 | GetDXGIAdapter(&DXGIAdapter); 194 | } 195 | printf("Total GPU memory: "); 196 | printcomma(totmem); 197 | printf("\n"); 198 | } 199 | 200 | int main(int argc, char *argv[]) 201 | { 202 | if ((gdi32Handle = LoadLibrary(TEXT("gdi32.dll")))) 203 | { 204 | queryD3DKMTStatistics = (PFND3DKMTQS)GetProcAddress(gdi32Handle, "D3DKMTQueryStatistics"); 205 | if (queryD3DKMTStatistics) 206 | printgpustats(argc == 1 ? "" : argv[1]); 207 | printtotmem(); 208 | FreeLibrary(gdi32Handle); 209 | } 210 | } 211 | -------------------------------------------------------------------------------- /GPUmembyproc/GPUmembyproc.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.33026.149 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GPUmembyproc", "GPUmembyproc.vcxproj", "{0C26F83B-359F-4A65-ACD8-55F4757E0A9B}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|x64 = Debug|x64 11 | Debug|x86 = Debug|x86 12 | Release|x64 = Release|x64 13 | Release|x86 = Release|x86 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {0C26F83B-359F-4A65-ACD8-55F4757E0A9B}.Debug|x64.ActiveCfg = Debug|x64 17 | {0C26F83B-359F-4A65-ACD8-55F4757E0A9B}.Debug|x64.Build.0 = Debug|x64 18 | {0C26F83B-359F-4A65-ACD8-55F4757E0A9B}.Debug|x86.ActiveCfg = Debug|Win32 19 | {0C26F83B-359F-4A65-ACD8-55F4757E0A9B}.Debug|x86.Build.0 = Debug|Win32 20 | {0C26F83B-359F-4A65-ACD8-55F4757E0A9B}.Release|x64.ActiveCfg = Release|x64 21 | {0C26F83B-359F-4A65-ACD8-55F4757E0A9B}.Release|x64.Build.0 = Release|x64 22 | {0C26F83B-359F-4A65-ACD8-55F4757E0A9B}.Release|x86.ActiveCfg = Release|Win32 23 | {0C26F83B-359F-4A65-ACD8-55F4757E0A9B}.Release|x86.Build.0 = Release|Win32 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | GlobalSection(ExtensibilityGlobals) = postSolution 29 | SolutionGuid = {A8C65080-FD6D-4252-88BC-FF86B3CABB7A} 30 | EndGlobalSection 31 | EndGlobal 32 | -------------------------------------------------------------------------------- /GPUmembyproc/GPUmembyproc.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Release 10 | Win32 11 | 12 | 13 | Debug 14 | x64 15 | 16 | 17 | Release 18 | x64 19 | 20 | 21 | 22 | 15.0 23 | {0C26F83B-359F-4A65-ACD8-55F4757E0A9B} 24 | Win32Proj 25 | 10.0.16299.0 26 | GPUmembyproc 27 | 28 | 29 | 30 | Application 31 | true 32 | v141 33 | 34 | 35 | Application 36 | false 37 | v141 38 | 39 | 40 | Application 41 | true 42 | v141 43 | 44 | 45 | Application 46 | false 47 | v141 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | true 69 | $(VC_IncludePath);$(WindowsSDK_IncludePath); 70 | $(SolutionDir)whisperer\bin\$(Configuration)\ 71 | 72 | 73 | true 74 | $(VC_IncludePath);$(WindowsSDK_IncludePath); 75 | $(SolutionDir)whisperer\bin\$(Configuration)\ 76 | 77 | 78 | $(VC_IncludePath);$(WindowsSDK_IncludePath); 79 | $(SolutionDir)whisperer\bin\$(Configuration)\ 80 | 81 | 82 | $(VC_IncludePath);$(WindowsSDK_IncludePath); 83 | $(SolutionDir)whisperer\bin\$(Configuration)\ 84 | 85 | 86 | 87 | WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) 88 | MultiThreadedDebugDLL 89 | Level3 90 | ProgramDatabase 91 | Disabled 92 | 93 | 94 | 95 | 96 | MachineX86 97 | true 98 | Console 99 | 100 | 101 | 102 | 103 | WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) 104 | MultiThreadedDLL 105 | Level3 106 | ProgramDatabase 107 | 108 | 109 | 110 | 111 | MachineX86 112 | true 113 | Console 114 | true 115 | true 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | -------------------------------------------------------------------------------- /GPUmembyproc/GPUmembyproc.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | 23 | 24 | Header Files 25 | 26 | 27 | -------------------------------------------------------------------------------- /GPUmembyproc/README.md: -------------------------------------------------------------------------------- 1 | gets GPU memory usage by process. 2 | Can pass exe name on command line, otherwise prints all that use GPU memory. 3 | Based on Mozilla's gfxWindowsPlatform.cpp and wj32's Process Hacker. 4 | Won't handle multiple GPU cards properly. -------------------------------------------------------------------------------- /GPUmembyproc/d3dkmtQueryStatistics.h: -------------------------------------------------------------------------------- 1 | /* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*- 2 | * This Source Code Form is subject to the terms of the Mozilla Public 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 5 | /* This file is based on a header file that was briefly seen in the 6 | * Windows 8 RC SDK. The work for this file itself was based on the one in ProcessHacker at 7 | * http://processhacker.svn.sourceforge.net/viewvc/processhacker/2.x/trunk/plugins/ExtendedTools/d3dkmt.h?revision=4758&view=markup 8 | * For more details see Mozilla Bug 689870. 9 | * [Bug 917496 indicates that some of these structs may not match reality, and 10 | * therefore should not be trusted. See the reference to bug 917496 in 11 | * gfxWindowsPlatform.cpp.] 12 | */ 13 | 14 | typedef struct _D3DKMTQS_COUNTER 15 | { 16 | ULONG Count; 17 | ULONGLONG Bytes; 18 | } D3DKMTQS_COUNTER; 19 | 20 | typedef struct _D3DKMTQS_ADAPTER_INFO 21 | { 22 | ULONG NbSegments; 23 | 24 | ULONG Filler[4]; 25 | ULONGLONG Filler2[2]; // Assumed sizeof(LONGLONG) = sizeof(ULONGLONG) 26 | struct { 27 | ULONG Filler[14]; 28 | } Filler_RDMAB; 29 | struct { 30 | ULONG Filler[9]; 31 | } Filler_R; 32 | struct { 33 | ULONG Filler[4]; 34 | D3DKMTQS_COUNTER Filler2; 35 | } Filler_P; 36 | struct { 37 | D3DKMTQS_COUNTER Filler[16]; 38 | ULONG Filler2[2]; 39 | } Filler_PF; 40 | struct { 41 | ULONGLONG Filler[8]; 42 | } Filler_PT; 43 | struct { 44 | ULONG Filler[2]; 45 | } Filler_SR; 46 | struct { 47 | ULONG Filler[7]; 48 | } Filler_L; 49 | struct { 50 | D3DKMTQS_COUNTER Filler[7]; 51 | } Filler_A; 52 | struct { 53 | D3DKMTQS_COUNTER Filler[4]; 54 | } Filler_T; 55 | ULONG64 Reserved[8]; 56 | } D3DKMTQS_ADAPTER_INFO; 57 | 58 | typedef struct _D3DKMTQS_SEGMENT_INFO_WIN7 59 | { 60 | ULONG Filler[3]; 61 | struct { 62 | ULONGLONG Filler; 63 | ULONG Filler2[2]; 64 | } Filler_M; 65 | 66 | ULONG Aperture; 67 | 68 | ULONGLONG Filler3[5]; 69 | ULONG64 Filler4[8]; 70 | } D3DKMTQS_SEGMENT_INFO_WIN7; 71 | 72 | typedef struct _D3DKMTQS_SEGMENT_INFO_WIN8 73 | { 74 | ULONGLONG Filler[3]; 75 | struct { 76 | ULONGLONG Filler; 77 | ULONG Filler2[2]; 78 | } Filler_M; 79 | 80 | ULONG Aperture; 81 | 82 | ULONGLONG Filler3[5]; 83 | ULONG64 Filler4[8]; 84 | } D3DKMTQS_SEGMENT_INFO_WIN8; 85 | 86 | typedef struct _D3DKMTQS_SYSTEM_MEMORY 87 | { 88 | ULONGLONG BytesAllocated; 89 | ULONG Filler[2]; 90 | ULONGLONG Filler2[7]; 91 | } D3DKMTQS_SYSTEM_MEMORY; 92 | 93 | typedef struct _D3DKMTQS_PROCESS_INFO 94 | { 95 | ULONG Filler[2]; 96 | struct { 97 | ULONGLONG BytesAllocated; 98 | 99 | ULONG Filler[2]; 100 | ULONGLONG Filler2[7]; 101 | } SystemMemory; 102 | ULONG64 Reserved[8]; 103 | } D3DKMTQS_PROCESS_INFO; 104 | 105 | typedef struct _D3DKMTQS_PROCESS_SEGMENT_INFO 106 | { 107 | union { 108 | struct { 109 | ULONGLONG BytesCommitted; 110 | } Win8; 111 | struct { 112 | ULONG BytesCommitted; 113 | ULONG UnknownRandomness; 114 | } Win7; 115 | }; 116 | 117 | ULONGLONG Filler[2]; 118 | ULONG Filler2; 119 | struct { 120 | ULONG Filler; 121 | D3DKMTQS_COUNTER Filler2[6]; 122 | ULONGLONG Filler3; 123 | } Filler3; 124 | struct { 125 | ULONGLONG Filler; 126 | } Filler4; 127 | ULONG64 Reserved[8]; 128 | } D3DKMTQS_PROCESS_SEGMENT_INFO; 129 | 130 | typedef enum _D3DKMTQS_TYPE 131 | { 132 | D3DKMTQS_ADAPTER = 0, 133 | D3DKMTQS_PROCESS = 1, 134 | D3DKMTQS_SEGMENT = 3, 135 | D3DKMTQS_PROCESS_SEGMENT = 4, 136 | } D3DKMTQS_TYPE; 137 | 138 | typedef union _D3DKMTQS_RESULT 139 | { 140 | D3DKMTQS_ADAPTER_INFO AdapterInfo; 141 | D3DKMTQS_SEGMENT_INFO_WIN7 SegmentInfoWin7; 142 | D3DKMTQS_SEGMENT_INFO_WIN8 SegmentInfoWin8; 143 | D3DKMTQS_PROCESS_INFO ProcessInfo; 144 | D3DKMTQS_PROCESS_SEGMENT_INFO ProcessSegmentInfo; 145 | } D3DKMTQS_RESULT; 146 | 147 | typedef struct _D3DKMTQS_QUERY_SEGMENT 148 | { 149 | ULONG SegmentId; 150 | } D3DKMTQS_QUERY_SEGMENT; 151 | 152 | typedef struct _D3DKMTQS 153 | { 154 | D3DKMTQS_TYPE Type; 155 | LUID AdapterLuid; 156 | HANDLE hProcess; 157 | D3DKMTQS_RESULT QueryResult; 158 | 159 | union 160 | { 161 | D3DKMTQS_QUERY_SEGMENT QuerySegment; 162 | D3DKMTQS_QUERY_SEGMENT QueryProcessSegment; 163 | }; 164 | } D3DKMTQS; 165 | 166 | extern "C" { 167 | typedef __checkReturn NTSTATUS (APIENTRY *PFND3DKMTQS)(const D3DKMTQS *); 168 | } 169 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Whisperer lets you generate subtitles for any kind of video/audio files. 2 | 3 | It uses OpenAI's whisper, it runs as many instances simultaneously as your GPU's memory allows. 4 | 5 | Update: now uses [https://github.com/Const-me/Whisper](https://github.com/Const-me/Whisper) GPU enabled whispercpp, thanks to Kosta for this major speed improvement! 6 | 7 | You will need the models from here: [https://huggingface.co/ggerganov/whisper.cpp/tree/main](https://huggingface.co/ggerganov/whisper.cpp/tree/main) 8 | Do NOT use v3 it is not supported yet! 9 | 10 | Requires ffmpeg on your path, not included. 11 | 12 | ![scrshot](https://github.com/tigros/Whisperer/assets/2112911/9fb123ee-c5fc-4dcd-8ea4-f8b8a5fe159c) 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /qlaunch/qlaunch.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.28307.1525 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "qlaunch", "qlaunch\qlaunch.vcxproj", "{74844A38-7133-4DA8-A75F-82460F90754B}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|x64 = Debug|x64 11 | Debug|x86 = Debug|x86 12 | Release|x64 = Release|x64 13 | Release|x86 = Release|x86 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {74844A38-7133-4DA8-A75F-82460F90754B}.Debug|x64.ActiveCfg = Debug|x64 17 | {74844A38-7133-4DA8-A75F-82460F90754B}.Debug|x64.Build.0 = Debug|x64 18 | {74844A38-7133-4DA8-A75F-82460F90754B}.Debug|x86.ActiveCfg = Debug|Win32 19 | {74844A38-7133-4DA8-A75F-82460F90754B}.Debug|x86.Build.0 = Debug|Win32 20 | {74844A38-7133-4DA8-A75F-82460F90754B}.Release|x64.ActiveCfg = Release|x64 21 | {74844A38-7133-4DA8-A75F-82460F90754B}.Release|x64.Build.0 = Release|x64 22 | {74844A38-7133-4DA8-A75F-82460F90754B}.Release|x86.ActiveCfg = Release|Win32 23 | {74844A38-7133-4DA8-A75F-82460F90754B}.Release|x86.Build.0 = Release|Win32 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | GlobalSection(ExtensibilityGlobals) = postSolution 29 | SolutionGuid = {AEFED74C-4C1D-462F-A664-16C8905F2293} 30 | EndGlobalSection 31 | EndGlobal 32 | -------------------------------------------------------------------------------- /qlaunch/qlaunch/framework.h: -------------------------------------------------------------------------------- 1 | // header.h : include file for standard system include files, 2 | // or project specific include files 3 | // 4 | 5 | #pragma once 6 | 7 | #include "targetver.h" 8 | #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers 9 | // Windows Header Files 10 | #include 11 | // C RunTime Header Files 12 | #include 13 | #include 14 | #include 15 | #include 16 | -------------------------------------------------------------------------------- /qlaunch/qlaunch/qlaunch.cpp: -------------------------------------------------------------------------------- 1 | #include "framework.h" 2 | #include "qlaunch.h" 3 | #include 4 | 5 | #define BUFFER_SIZE 1024 6 | 7 | DWORD Run(char *cmd) 8 | { 9 | STARTUPINFO StartupInfo; 10 | PROCESS_INFORMATION ProcessInfo; 11 | 12 | memset(&StartupInfo, 0, sizeof(StartupInfo)); 13 | StartupInfo.cb = sizeof(STARTUPINFO); 14 | StartupInfo.dwFlags = STARTF_USESHOWWINDOW; 15 | StartupInfo.wShowWindow = SW_SHOW; 16 | 17 | if (!CreateProcess(NULL, cmd, NULL, NULL, FALSE, 18 | CREATE_NO_WINDOW, 19 | NULL, 20 | NULL, 21 | &StartupInfo, 22 | &ProcessInfo)) 23 | { 24 | return GetLastError(); 25 | } 26 | 27 | CloseHandle(ProcessInfo.hThread); 28 | CloseHandle(ProcessInfo.hProcess); 29 | 30 | return 0; 31 | } 32 | 33 | int APIENTRY wWinMain(_In_ HINSTANCE hInstance, 34 | _In_opt_ HINSTANCE hPrevInstance, 35 | _In_ LPWSTR lpCmdLine, 36 | _In_ int nCmdShow) 37 | { 38 | UNREFERENCED_PARAMETER(hPrevInstance); 39 | UNREFERENCED_PARAMETER(lpCmdLine); 40 | 41 | char cmd[BUFFER_SIZE]; 42 | size_t i; 43 | wcstombs_s(&i, cmd, (size_t)BUFFER_SIZE, lpCmdLine, (size_t)BUFFER_SIZE); 44 | 45 | Run(cmd); 46 | 47 | return 0; 48 | } 49 | 50 | -------------------------------------------------------------------------------- /qlaunch/qlaunch/qlaunch.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "resource.h" 4 | -------------------------------------------------------------------------------- /qlaunch/qlaunch/qlaunch.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tigros/Whisperer/e6951916081cebbf22e1ed6d1d52ba69e20bfc29/qlaunch/qlaunch/qlaunch.rc -------------------------------------------------------------------------------- /qlaunch/qlaunch/qlaunch.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Release 10 | Win32 11 | 12 | 13 | Debug 14 | x64 15 | 16 | 17 | Release 18 | x64 19 | 20 | 21 | 22 | 15.0 23 | {74844A38-7133-4DA8-A75F-82460F90754B} 24 | Win32Proj 25 | qlaunch 26 | 10.0.18362.0 27 | 28 | 29 | 30 | Application 31 | true 32 | v141 33 | MultiByte 34 | Static 35 | 36 | 37 | Application 38 | false 39 | v141 40 | true 41 | MultiByte 42 | Static 43 | 44 | 45 | Application 46 | true 47 | v141 48 | MultiByte 49 | Static 50 | 51 | 52 | Application 53 | false 54 | v141 55 | true 56 | MultiByte 57 | Static 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | true 79 | $(SolutionDir)whisperer\bin\$(Configuration)\ 80 | 81 | 82 | true 83 | $(SolutionDir)whisperer\bin\$(Configuration)\ 84 | 85 | 86 | false 87 | $(SolutionDir)whisperer\bin\$(Configuration)\ 88 | 89 | 90 | false 91 | $(SolutionDir)whisperer\bin\$(Configuration)\ 92 | 93 | 94 | 95 | 96 | 97 | Level3 98 | Disabled 99 | true 100 | WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS 101 | false 102 | false 103 | 104 | 105 | Windows 106 | true 107 | Advapi32.lib 108 | 109 | 110 | 111 | 112 | 113 | 114 | Level3 115 | Disabled 116 | true 117 | _DEBUG;_WINDOWS;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS 118 | false 119 | false 120 | 121 | 122 | Windows 123 | true 124 | Advapi32.lib 125 | 126 | 127 | 128 | 129 | 130 | 131 | Level3 132 | MaxSpeed 133 | true 134 | true 135 | true 136 | WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS 137 | false 138 | false 139 | 140 | 141 | Windows 142 | true 143 | true 144 | true 145 | Advapi32.lib 146 | 147 | 148 | 149 | 150 | 151 | 152 | Level3 153 | MaxSpeed 154 | true 155 | true 156 | true 157 | NDEBUG;_WINDOWS;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS 158 | false 159 | false 160 | 161 | 162 | Windows 163 | true 164 | true 165 | true 166 | Advapi32.lib 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | -------------------------------------------------------------------------------- /qlaunch/qlaunch/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by qlaunch.rc 4 | // 5 | #define IDC_MYICON 2 6 | #define IDD_qlaunch_DIALOG 102 7 | #define IDS_APP_TITLE 103 8 | #define IDD_ABOUTBOX 103 9 | #define IDM_ABOUT 104 10 | #define IDM_EXIT 105 11 | #define IDI_qlaunch 107 12 | #define IDI_SMALL 108 13 | #define IDC_qlaunch 109 14 | #define IDR_MAINFRAME 128 15 | #define IDC_STATIC -1 16 | 17 | // Next default values for new objects 18 | // 19 | #ifdef APSTUDIO_INVOKED 20 | #ifndef APSTUDIO_READONLY_SYMBOLS 21 | #define _APS_NO_MFC 1 22 | #define _APS_NEXT_RESOURCE_VALUE 130 23 | #define _APS_NEXT_COMMAND_VALUE 32771 24 | #define _APS_NEXT_CONTROL_VALUE 1000 25 | #define _APS_NEXT_SYMED_VALUE 110 26 | #endif 27 | #endif 28 | -------------------------------------------------------------------------------- /qlaunch/qlaunch/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // // Including SDKDDKVer.h defines the highest available Windows platform. 4 | // If you wish to build your application for a previous Windows platform, include WinSDKVer.h and 5 | // set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. 6 | #include 7 | -------------------------------------------------------------------------------- /whisperer.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.28307.1525 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "whisperer", "whisperer\whisperer.csproj", "{1FCB32CA-014B-4C4D-9B61-D8592F3C98B8}" 7 | EndProject 8 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GPUmembyproc", "GPUmembyproc\GPUmembyproc.vcxproj", "{0C26F83B-359F-4A65-ACD8-55F4757E0A9B}" 9 | EndProject 10 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "qlaunch", "qlaunch\qlaunch\qlaunch.vcxproj", "{74844A38-7133-4DA8-A75F-82460F90754B}" 11 | EndProject 12 | Global 13 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 14 | Debug|Any CPU = Debug|Any CPU 15 | Debug|x64 = Debug|x64 16 | Debug|x86 = Debug|x86 17 | Release|Any CPU = Release|Any CPU 18 | Release|x64 = Release|x64 19 | Release|x86 = Release|x86 20 | EndGlobalSection 21 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 22 | {1FCB32CA-014B-4C4D-9B61-D8592F3C98B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 23 | {1FCB32CA-014B-4C4D-9B61-D8592F3C98B8}.Debug|Any CPU.Build.0 = Debug|Any CPU 24 | {1FCB32CA-014B-4C4D-9B61-D8592F3C98B8}.Debug|x64.ActiveCfg = Debug|Any CPU 25 | {1FCB32CA-014B-4C4D-9B61-D8592F3C98B8}.Debug|x64.Build.0 = Debug|Any CPU 26 | {1FCB32CA-014B-4C4D-9B61-D8592F3C98B8}.Debug|x86.ActiveCfg = Debug|Any CPU 27 | {1FCB32CA-014B-4C4D-9B61-D8592F3C98B8}.Debug|x86.Build.0 = Debug|Any CPU 28 | {1FCB32CA-014B-4C4D-9B61-D8592F3C98B8}.Release|Any CPU.ActiveCfg = Release|Any CPU 29 | {1FCB32CA-014B-4C4D-9B61-D8592F3C98B8}.Release|Any CPU.Build.0 = Release|Any CPU 30 | {1FCB32CA-014B-4C4D-9B61-D8592F3C98B8}.Release|x64.ActiveCfg = Release|Any CPU 31 | {1FCB32CA-014B-4C4D-9B61-D8592F3C98B8}.Release|x64.Build.0 = Release|Any CPU 32 | {1FCB32CA-014B-4C4D-9B61-D8592F3C98B8}.Release|x86.ActiveCfg = Release|Any CPU 33 | {1FCB32CA-014B-4C4D-9B61-D8592F3C98B8}.Release|x86.Build.0 = Release|Any CPU 34 | {0C26F83B-359F-4A65-ACD8-55F4757E0A9B}.Debug|Any CPU.ActiveCfg = Debug|Win32 35 | {0C26F83B-359F-4A65-ACD8-55F4757E0A9B}.Debug|x64.ActiveCfg = Debug|x64 36 | {0C26F83B-359F-4A65-ACD8-55F4757E0A9B}.Debug|x64.Build.0 = Debug|x64 37 | {0C26F83B-359F-4A65-ACD8-55F4757E0A9B}.Debug|x86.ActiveCfg = Debug|Win32 38 | {0C26F83B-359F-4A65-ACD8-55F4757E0A9B}.Debug|x86.Build.0 = Debug|Win32 39 | {0C26F83B-359F-4A65-ACD8-55F4757E0A9B}.Release|Any CPU.ActiveCfg = Release|Win32 40 | {0C26F83B-359F-4A65-ACD8-55F4757E0A9B}.Release|x64.ActiveCfg = Release|x64 41 | {0C26F83B-359F-4A65-ACD8-55F4757E0A9B}.Release|x64.Build.0 = Release|x64 42 | {0C26F83B-359F-4A65-ACD8-55F4757E0A9B}.Release|x86.ActiveCfg = Release|Win32 43 | {0C26F83B-359F-4A65-ACD8-55F4757E0A9B}.Release|x86.Build.0 = Release|Win32 44 | {74844A38-7133-4DA8-A75F-82460F90754B}.Debug|Any CPU.ActiveCfg = Debug|Win32 45 | {74844A38-7133-4DA8-A75F-82460F90754B}.Debug|x64.ActiveCfg = Debug|x64 46 | {74844A38-7133-4DA8-A75F-82460F90754B}.Debug|x64.Build.0 = Debug|x64 47 | {74844A38-7133-4DA8-A75F-82460F90754B}.Debug|x86.ActiveCfg = Debug|Win32 48 | {74844A38-7133-4DA8-A75F-82460F90754B}.Debug|x86.Build.0 = Debug|Win32 49 | {74844A38-7133-4DA8-A75F-82460F90754B}.Release|Any CPU.ActiveCfg = Release|Win32 50 | {74844A38-7133-4DA8-A75F-82460F90754B}.Release|x64.ActiveCfg = Release|x64 51 | {74844A38-7133-4DA8-A75F-82460F90754B}.Release|x64.Build.0 = Release|x64 52 | {74844A38-7133-4DA8-A75F-82460F90754B}.Release|x86.ActiveCfg = Release|Win32 53 | {74844A38-7133-4DA8-A75F-82460F90754B}.Release|x86.Build.0 = Release|Win32 54 | EndGlobalSection 55 | GlobalSection(SolutionProperties) = preSolution 56 | HideSolutionNode = FALSE 57 | EndGlobalSection 58 | GlobalSection(ExtensibilityGlobals) = postSolution 59 | SolutionGuid = {AEFED74C-4C1D-462F-A664-16C8905F2293} 60 | EndGlobalSection 61 | EndGlobal 62 | -------------------------------------------------------------------------------- /whisperer/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /whisperer/Form1.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace whisperer 2 | { 3 | partial class Form1 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.components = new System.ComponentModel.Container(); 32 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1)); 33 | this.button1 = new System.Windows.Forms.Button(); 34 | this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog(); 35 | this.fastObjectListView1 = new BrightIdeasSoftware.FastObjectListView(); 36 | this.olvColumn1 = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn())); 37 | this.olvColumn2 = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn())); 38 | this.olvColumn3 = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn())); 39 | this.button2 = new System.Windows.Forms.Button(); 40 | this.goButton = new System.Windows.Forms.Button(); 41 | this.label1 = new System.Windows.Forms.Label(); 42 | this.label2 = new System.Windows.Forms.Label(); 43 | this.textBox1 = new System.Windows.Forms.TextBox(); 44 | this.label3 = new System.Windows.Forms.Label(); 45 | this.label4 = new System.Windows.Forms.Label(); 46 | this.label5 = new System.Windows.Forms.Label(); 47 | this.skipIfExistCheckBox = new System.Windows.Forms.CheckBox(); 48 | this.modelPathTextBox = new System.Windows.Forms.TextBox(); 49 | this.checkBox2 = new System.Windows.Forms.CheckBox(); 50 | this.label6 = new System.Windows.Forms.Label(); 51 | this.comboBox1 = new System.Windows.Forms.ComboBox(); 52 | this.label7 = new System.Windows.Forms.Label(); 53 | this.numericUpDown1 = new System.Windows.Forms.NumericUpDown(); 54 | this.checkBox3 = new System.Windows.Forms.CheckBox(); 55 | this.label8 = new System.Windows.Forms.Label(); 56 | this.comboBox2 = new System.Windows.Forms.ComboBox(); 57 | this.srtCheckBox = new System.Windows.Forms.CheckBox(); 58 | this.txtCheckBox = new System.Windows.Forms.CheckBox(); 59 | this.vttCheckBox = new System.Windows.Forms.CheckBox(); 60 | this.openFileDialog2 = new System.Windows.Forms.OpenFileDialog(); 61 | this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog(); 62 | this.button4 = new System.Windows.Forms.Button(); 63 | this.button5 = new System.Windows.Forms.Button(); 64 | this.label9 = new System.Windows.Forms.Label(); 65 | this.timeelapsed = new System.Windows.Forms.Label(); 66 | this.timer1 = new System.Windows.Forms.Timer(this.components); 67 | this.button6 = new System.Windows.Forms.Button(); 68 | this.textBox3 = new System.Windows.Forms.TextBox(); 69 | this.label11 = new System.Windows.Forms.Label(); 70 | this.button7 = new System.Windows.Forms.Button(); 71 | this.textBox4 = new System.Windows.Forms.TextBox(); 72 | this.label12 = new System.Windows.Forms.Label(); 73 | this.label14 = new System.Windows.Forms.Label(); 74 | this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components); 75 | this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); 76 | this.toolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem(); 77 | this.toolStripMenuItem3 = new System.Windows.Forms.ToolStripMenuItem(); 78 | this.toolStripMenuItem4 = new System.Windows.Forms.ToolStripMenuItem(); 79 | this.contextMenuStrip2 = new System.Windows.Forms.ContextMenuStrip(this.components); 80 | this.resetAllToDefaultToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 81 | ((System.ComponentModel.ISupportInitialize)(this.fastObjectListView1)).BeginInit(); 82 | ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit(); 83 | this.contextMenuStrip1.SuspendLayout(); 84 | this.contextMenuStrip2.SuspendLayout(); 85 | this.SuspendLayout(); 86 | // 87 | // button1 88 | // 89 | this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 90 | this.button1.Font = new System.Drawing.Font("Calibri", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 91 | this.button1.Location = new System.Drawing.Point(12, 421); 92 | this.button1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); 93 | this.button1.Name = "button1"; 94 | this.button1.Size = new System.Drawing.Size(115, 25); 95 | this.button1.TabIndex = 1; 96 | this.button1.Text = "Pick files"; 97 | this.button1.UseVisualStyleBackColor = true; 98 | this.button1.Click += new System.EventHandler(this.button1_Click); 99 | // 100 | // openFileDialog1 101 | // 102 | this.openFileDialog1.Multiselect = true; 103 | // 104 | // fastObjectListView1 105 | // 106 | this.fastObjectListView1.AllColumns.Add(this.olvColumn1); 107 | this.fastObjectListView1.AllColumns.Add(this.olvColumn2); 108 | this.fastObjectListView1.AllColumns.Add(this.olvColumn3); 109 | this.fastObjectListView1.AllowDrop = true; 110 | this.fastObjectListView1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 111 | | System.Windows.Forms.AnchorStyles.Left) 112 | | System.Windows.Forms.AnchorStyles.Right))); 113 | this.fastObjectListView1.AutoArrange = false; 114 | this.fastObjectListView1.CellEditActivation = BrightIdeasSoftware.ObjectListView.CellEditActivateMode.SingleClick; 115 | this.fastObjectListView1.CellEditUseWholeCell = false; 116 | this.fastObjectListView1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { 117 | this.olvColumn1, 118 | this.olvColumn2, 119 | this.olvColumn3}); 120 | this.fastObjectListView1.Cursor = System.Windows.Forms.Cursors.Default; 121 | this.fastObjectListView1.Font = new System.Drawing.Font("Calibri", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 122 | this.fastObjectListView1.FullRowSelect = true; 123 | this.fastObjectListView1.HideSelection = false; 124 | this.fastObjectListView1.Location = new System.Drawing.Point(12, 12); 125 | this.fastObjectListView1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); 126 | this.fastObjectListView1.Name = "fastObjectListView1"; 127 | this.fastObjectListView1.ShowGroups = false; 128 | this.fastObjectListView1.ShowItemToolTips = true; 129 | this.fastObjectListView1.Size = new System.Drawing.Size(1209, 364); 130 | this.fastObjectListView1.TabIndex = 30; 131 | this.fastObjectListView1.UseCompatibleStateImageBehavior = false; 132 | this.fastObjectListView1.UseHotItem = true; 133 | this.fastObjectListView1.UseTranslucentHotItem = true; 134 | this.fastObjectListView1.UseTranslucentSelection = true; 135 | this.fastObjectListView1.View = System.Windows.Forms.View.Details; 136 | this.fastObjectListView1.VirtualMode = true; 137 | this.fastObjectListView1.CellEditFinishing += new BrightIdeasSoftware.CellEditEventHandler(this.fastObjectListView1_CellEditFinishing); 138 | this.fastObjectListView1.CellEditStarting += new BrightIdeasSoftware.CellEditEventHandler(this.fastObjectListView1_CellEditStarting); 139 | this.fastObjectListView1.CellClick += new System.EventHandler(this.fastObjectListView1_CellClick); 140 | this.fastObjectListView1.CellRightClick += new System.EventHandler(this.fastObjectListView1_CellRightClick); 141 | this.fastObjectListView1.SelectionChanged += new System.EventHandler(this.fastObjectListView1_SelectionChanged); 142 | this.fastObjectListView1.DragDrop += new System.Windows.Forms.DragEventHandler(this.fastObjectListView1_DragDrop); 143 | this.fastObjectListView1.DragEnter += new System.Windows.Forms.DragEventHandler(this.fastObjectListView1_DragEnter); 144 | // 145 | // olvColumn1 146 | // 147 | this.olvColumn1.AspectName = "filename"; 148 | this.olvColumn1.HeaderFont = new System.Drawing.Font("Calibri", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 149 | this.olvColumn1.Text = "File name"; 150 | this.olvColumn1.Width = 750; 151 | // 152 | // olvColumn2 153 | // 154 | this.olvColumn2.AspectName = "lang"; 155 | this.olvColumn2.HeaderFont = new System.Drawing.Font("Calibri", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 156 | this.olvColumn2.Text = "Language"; 157 | this.olvColumn2.Width = 70; 158 | // 159 | // olvColumn3 160 | // 161 | this.olvColumn3.AspectName = "translate"; 162 | this.olvColumn3.CheckBoxes = true; 163 | this.olvColumn3.HeaderFont = new System.Drawing.Font("Calibri", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 164 | this.olvColumn3.Text = "Translate"; 165 | this.olvColumn3.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; 166 | this.olvColumn3.Width = 65; 167 | // 168 | // button2 169 | // 170 | this.button2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 171 | this.button2.Font = new System.Drawing.Font("Calibri", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 172 | this.button2.Location = new System.Drawing.Point(12, 452); 173 | this.button2.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); 174 | this.button2.Name = "button2"; 175 | this.button2.Size = new System.Drawing.Size(115, 25); 176 | this.button2.TabIndex = 31; 177 | this.button2.Text = "Clear"; 178 | this.button2.UseVisualStyleBackColor = true; 179 | this.button2.Click += new System.EventHandler(this.button2_Click); 180 | // 181 | // goButton 182 | // 183 | this.goButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 184 | this.goButton.Enabled = false; 185 | this.goButton.Font = new System.Drawing.Font("Calibri", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 186 | this.goButton.Location = new System.Drawing.Point(213, 454); 187 | this.goButton.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); 188 | this.goButton.Name = "goButton"; 189 | this.goButton.Size = new System.Drawing.Size(101, 25); 190 | this.goButton.TabIndex = 32; 191 | this.goButton.Text = "Go"; 192 | this.goButton.UseVisualStyleBackColor = true; 193 | this.goButton.Click += new System.EventHandler(this.button3_Click); 194 | // 195 | // label1 196 | // 197 | this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 198 | this.label1.AutoSize = true; 199 | this.label1.Font = new System.Drawing.Font("Calibri", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 200 | this.label1.Location = new System.Drawing.Point(211, 424); 201 | this.label1.Name = "label1"; 202 | this.label1.Size = new System.Drawing.Size(77, 17); 203 | this.label1.TabIndex = 34; 204 | this.label1.Text = "Model path:"; 205 | // 206 | // label2 207 | // 208 | this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 209 | this.label2.AutoSize = true; 210 | this.label2.Font = new System.Drawing.Font("Calibri", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 211 | this.label2.Location = new System.Drawing.Point(537, 424); 212 | this.label2.Name = "label2"; 213 | this.label2.Size = new System.Drawing.Size(70, 17); 214 | this.label2.TabIndex = 35; 215 | this.label2.Text = "Output dir:"; 216 | // 217 | // textBox1 218 | // 219 | this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 220 | this.textBox1.Font = new System.Drawing.Font("Calibri", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 221 | this.textBox1.Location = new System.Drawing.Point(619, 421); 222 | this.textBox1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); 223 | this.textBox1.Name = "textBox1"; 224 | this.textBox1.Size = new System.Drawing.Size(169, 23); 225 | this.textBox1.TabIndex = 36; 226 | this.textBox1.Text = "P:\\whisperwavs"; 227 | // 228 | // label3 229 | // 230 | this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 231 | this.label3.AutoSize = true; 232 | this.label3.Font = new System.Drawing.Font("Calibri", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 233 | this.label3.Location = new System.Drawing.Point(1000, 451); 234 | this.label3.Name = "label3"; 235 | this.label3.Size = new System.Drawing.Size(33, 17); 236 | this.label3.TabIndex = 37; 237 | this.label3.Text = "0 / 0"; 238 | // 239 | // label4 240 | // 241 | this.label4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 242 | this.label4.AutoSize = true; 243 | this.label4.Font = new System.Drawing.Font("Calibri", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 244 | this.label4.Location = new System.Drawing.Point(1097, 451); 245 | this.label4.Name = "label4"; 246 | this.label4.Size = new System.Drawing.Size(73, 17); 247 | this.label4.TabIndex = 38; 248 | this.label4.Text = "Completed:"; 249 | // 250 | // label5 251 | // 252 | this.label5.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 253 | this.label5.AutoSize = true; 254 | this.label5.Font = new System.Drawing.Font("Calibri", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 255 | this.label5.Location = new System.Drawing.Point(1180, 451); 256 | this.label5.Name = "label5"; 257 | this.label5.Size = new System.Drawing.Size(15, 17); 258 | this.label5.TabIndex = 39; 259 | this.label5.Text = "0"; 260 | // 261 | // skipIfExistCheckBox 262 | // 263 | this.skipIfExistCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 264 | this.skipIfExistCheckBox.AutoSize = true; 265 | this.skipIfExistCheckBox.Checked = true; 266 | this.skipIfExistCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; 267 | this.skipIfExistCheckBox.Font = new System.Drawing.Font("Calibri", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 268 | this.skipIfExistCheckBox.Location = new System.Drawing.Point(619, 475); 269 | this.skipIfExistCheckBox.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); 270 | this.skipIfExistCheckBox.Name = "skipIfExistCheckBox"; 271 | this.skipIfExistCheckBox.Size = new System.Drawing.Size(137, 21); 272 | this.skipIfExistCheckBox.TabIndex = 40; 273 | this.skipIfExistCheckBox.Text = "Skip if output exists"; 274 | this.skipIfExistCheckBox.UseVisualStyleBackColor = true; 275 | // 276 | // modelPathTextBox 277 | // 278 | this.modelPathTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 279 | this.modelPathTextBox.Font = new System.Drawing.Font("Calibri", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 280 | this.modelPathTextBox.Location = new System.Drawing.Point(299, 421); 281 | this.modelPathTextBox.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); 282 | this.modelPathTextBox.Name = "modelPathTextBox"; 283 | this.modelPathTextBox.Size = new System.Drawing.Size(188, 23); 284 | this.modelPathTextBox.TabIndex = 41; 285 | this.modelPathTextBox.Text = "P:\\Models\\ggml-base.bin"; 286 | // 287 | // checkBox2 288 | // 289 | this.checkBox2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 290 | this.checkBox2.AutoSize = true; 291 | this.checkBox2.Font = new System.Drawing.Font("Calibri", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 292 | this.checkBox2.Location = new System.Drawing.Point(1061, 419); 293 | this.checkBox2.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); 294 | this.checkBox2.Name = "checkBox2"; 295 | this.checkBox2.Size = new System.Drawing.Size(139, 21); 296 | this.checkBox2.TabIndex = 42; 297 | this.checkBox2.Text = "Translate to English"; 298 | this.checkBox2.UseVisualStyleBackColor = true; 299 | this.checkBox2.CheckedChanged += new System.EventHandler(this.checkBox2_CheckedChanged); 300 | // 301 | // label6 302 | // 303 | this.label6.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 304 | this.label6.AutoSize = true; 305 | this.label6.Font = new System.Drawing.Font("Calibri", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 306 | this.label6.Location = new System.Drawing.Point(833, 420); 307 | this.label6.Name = "label6"; 308 | this.label6.Size = new System.Drawing.Size(67, 17); 309 | this.label6.TabIndex = 43; 310 | this.label6.Text = "Language:"; 311 | // 312 | // comboBox1 313 | // 314 | this.comboBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 315 | this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; 316 | this.comboBox1.Font = new System.Drawing.Font("Calibri", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 317 | this.comboBox1.FormattingEnabled = true; 318 | this.comboBox1.Location = new System.Drawing.Point(915, 418); 319 | this.comboBox1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); 320 | this.comboBox1.Name = "comboBox1"; 321 | this.comboBox1.Size = new System.Drawing.Size(121, 23); 322 | this.comboBox1.Sorted = true; 323 | this.comboBox1.TabIndex = 44; 324 | // 325 | // label7 326 | // 327 | this.label7.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 328 | this.label7.AutoSize = true; 329 | this.label7.Font = new System.Drawing.Font("Calibri", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 330 | this.label7.Location = new System.Drawing.Point(833, 448); 331 | this.label7.Name = "label7"; 332 | this.label7.Size = new System.Drawing.Size(82, 17); 333 | this.label7.TabIndex = 45; 334 | this.label7.Text = "Max at once:"; 335 | // 336 | // numericUpDown1 337 | // 338 | this.numericUpDown1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 339 | this.numericUpDown1.Font = new System.Drawing.Font("Calibri", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 340 | this.numericUpDown1.Location = new System.Drawing.Point(927, 448); 341 | this.numericUpDown1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); 342 | this.numericUpDown1.Minimum = new decimal(new int[] { 343 | 1, 344 | 0, 345 | 0, 346 | 0}); 347 | this.numericUpDown1.Name = "numericUpDown1"; 348 | this.numericUpDown1.Size = new System.Drawing.Size(52, 23); 349 | this.numericUpDown1.TabIndex = 46; 350 | this.numericUpDown1.Value = new decimal(new int[] { 351 | 10, 352 | 0, 353 | 0, 354 | 0}); 355 | // 356 | // checkBox3 357 | // 358 | this.checkBox3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 359 | this.checkBox3.AutoSize = true; 360 | this.checkBox3.Font = new System.Drawing.Font("Calibri", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 361 | this.checkBox3.Location = new System.Drawing.Point(619, 448); 362 | this.checkBox3.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); 363 | this.checkBox3.Name = "checkBox3"; 364 | this.checkBox3.Size = new System.Drawing.Size(144, 21); 365 | this.checkBox3.TabIndex = 47; 366 | this.checkBox3.Text = "Same as input folder"; 367 | this.checkBox3.UseVisualStyleBackColor = true; 368 | this.checkBox3.CheckedChanged += new System.EventHandler(this.checkBox3_CheckedChanged); 369 | // 370 | // label8 371 | // 372 | this.label8.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 373 | this.label8.AutoSize = true; 374 | this.label8.Font = new System.Drawing.Font("Calibri", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 375 | this.label8.Location = new System.Drawing.Point(321, 458); 376 | this.label8.Name = "label8"; 377 | this.label8.Size = new System.Drawing.Size(76, 17); 378 | this.label8.TabIndex = 48; 379 | this.label8.Text = "When done:"; 380 | // 381 | // comboBox2 382 | // 383 | this.comboBox2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 384 | this.comboBox2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; 385 | this.comboBox2.Font = new System.Drawing.Font("Calibri", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 386 | this.comboBox2.FormattingEnabled = true; 387 | this.comboBox2.Items.AddRange(new object[] { 388 | "Do nothing", 389 | "Play sound", 390 | "Shutdown", 391 | "Sleep", 392 | "Hibernate", 393 | "Lock", 394 | "Log off"}); 395 | this.comboBox2.Location = new System.Drawing.Point(412, 454); 396 | this.comboBox2.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); 397 | this.comboBox2.Name = "comboBox2"; 398 | this.comboBox2.Size = new System.Drawing.Size(109, 23); 399 | this.comboBox2.TabIndex = 49; 400 | // 401 | // srtCheckBox 402 | // 403 | this.srtCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 404 | this.srtCheckBox.AutoSize = true; 405 | this.srtCheckBox.Checked = true; 406 | this.srtCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; 407 | this.srtCheckBox.Font = new System.Drawing.Font("Calibri", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 408 | this.srtCheckBox.Location = new System.Drawing.Point(153, 422); 409 | this.srtCheckBox.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); 410 | this.srtCheckBox.Name = "srtCheckBox"; 411 | this.srtCheckBox.Size = new System.Drawing.Size(45, 21); 412 | this.srtCheckBox.TabIndex = 50; 413 | this.srtCheckBox.Text = "srt"; 414 | this.srtCheckBox.UseVisualStyleBackColor = true; 415 | // 416 | // txtCheckBox 417 | // 418 | this.txtCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 419 | this.txtCheckBox.AutoSize = true; 420 | this.txtCheckBox.Font = new System.Drawing.Font("Calibri", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 421 | this.txtCheckBox.Location = new System.Drawing.Point(153, 445); 422 | this.txtCheckBox.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); 423 | this.txtCheckBox.Name = "txtCheckBox"; 424 | this.txtCheckBox.Size = new System.Drawing.Size(46, 21); 425 | this.txtCheckBox.TabIndex = 51; 426 | this.txtCheckBox.Text = "txt"; 427 | this.txtCheckBox.UseVisualStyleBackColor = true; 428 | // 429 | // vttCheckBox 430 | // 431 | this.vttCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 432 | this.vttCheckBox.AutoSize = true; 433 | this.vttCheckBox.Font = new System.Drawing.Font("Calibri", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 434 | this.vttCheckBox.Location = new System.Drawing.Point(153, 467); 435 | this.vttCheckBox.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); 436 | this.vttCheckBox.Name = "vttCheckBox"; 437 | this.vttCheckBox.Size = new System.Drawing.Size(45, 21); 438 | this.vttCheckBox.TabIndex = 52; 439 | this.vttCheckBox.Text = "vtt"; 440 | this.vttCheckBox.UseVisualStyleBackColor = true; 441 | // 442 | // openFileDialog2 443 | // 444 | this.openFileDialog2.Filter = "Bin files (*.bin)|*.bin|All files (*.*)|*.*"; 445 | // 446 | // button4 447 | // 448 | this.button4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 449 | this.button4.BackColor = System.Drawing.Color.White; 450 | this.button4.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("button4.BackgroundImage"))); 451 | this.button4.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; 452 | this.button4.Font = new System.Drawing.Font("Calibri", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 453 | this.button4.Location = new System.Drawing.Point(493, 421); 454 | this.button4.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); 455 | this.button4.Name = "button4"; 456 | this.button4.Size = new System.Drawing.Size(27, 23); 457 | this.button4.TabIndex = 53; 458 | this.button4.UseVisualStyleBackColor = false; 459 | this.button4.Click += new System.EventHandler(this.button4_Click); 460 | // 461 | // button5 462 | // 463 | this.button5.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 464 | this.button5.BackColor = System.Drawing.Color.White; 465 | this.button5.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("button5.BackgroundImage"))); 466 | this.button5.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; 467 | this.button5.Font = new System.Drawing.Font("Calibri", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 468 | this.button5.Location = new System.Drawing.Point(795, 421); 469 | this.button5.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); 470 | this.button5.Name = "button5"; 471 | this.button5.Size = new System.Drawing.Size(27, 23); 472 | this.button5.TabIndex = 54; 473 | this.button5.UseVisualStyleBackColor = false; 474 | this.button5.Click += new System.EventHandler(this.button5_Click); 475 | // 476 | // label9 477 | // 478 | this.label9.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 479 | this.label9.AutoSize = true; 480 | this.label9.Font = new System.Drawing.Font("Calibri", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 481 | this.label9.Location = new System.Drawing.Point(833, 479); 482 | this.label9.Name = "label9"; 483 | this.label9.Size = new System.Drawing.Size(55, 17); 484 | this.label9.TabIndex = 55; 485 | this.label9.Text = "Elapsed:"; 486 | // 487 | // timeelapsed 488 | // 489 | this.timeelapsed.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 490 | this.timeelapsed.AutoSize = true; 491 | this.timeelapsed.Font = new System.Drawing.Font("Calibri", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 492 | this.timeelapsed.Location = new System.Drawing.Point(917, 479); 493 | this.timeelapsed.Name = "timeelapsed"; 494 | this.timeelapsed.Size = new System.Drawing.Size(51, 17); 495 | this.timeelapsed.TabIndex = 56; 496 | this.timeelapsed.Text = "0:00:00"; 497 | // 498 | // timer1 499 | // 500 | this.timer1.Interval = 1000; 501 | this.timer1.Tick += new System.EventHandler(this.timer1_Tick); 502 | // 503 | // button6 504 | // 505 | this.button6.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 506 | this.button6.BackColor = System.Drawing.Color.White; 507 | this.button6.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("button6.BackgroundImage"))); 508 | this.button6.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; 509 | this.button6.Font = new System.Drawing.Font("Calibri", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 510 | this.button6.Location = new System.Drawing.Point(795, 386); 511 | this.button6.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); 512 | this.button6.Name = "button6"; 513 | this.button6.Size = new System.Drawing.Size(27, 23); 514 | this.button6.TabIndex = 59; 515 | this.button6.UseVisualStyleBackColor = false; 516 | this.button6.Click += new System.EventHandler(this.button6_Click); 517 | // 518 | // textBox3 519 | // 520 | this.textBox3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 521 | this.textBox3.Font = new System.Drawing.Font("Calibri", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 522 | this.textBox3.Location = new System.Drawing.Point(124, 386); 523 | this.textBox3.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); 524 | this.textBox3.Name = "textBox3"; 525 | this.textBox3.Size = new System.Drawing.Size(665, 23); 526 | this.textBox3.TabIndex = 58; 527 | // 528 | // label11 529 | // 530 | this.label11.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 531 | this.label11.AutoSize = true; 532 | this.label11.Font = new System.Drawing.Font("Calibri", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 533 | this.label11.Location = new System.Drawing.Point(9, 389); 534 | this.label11.Name = "label11"; 535 | this.label11.Size = new System.Drawing.Size(98, 17); 536 | this.label11.TabIndex = 57; 537 | this.label11.Text = "Watch folder(s):"; 538 | // 539 | // button7 540 | // 541 | this.button7.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 542 | this.button7.Font = new System.Drawing.Font("Calibri", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 543 | this.button7.Location = new System.Drawing.Point(836, 386); 544 | this.button7.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); 545 | this.button7.Name = "button7"; 546 | this.button7.Size = new System.Drawing.Size(136, 25); 547 | this.button7.TabIndex = 60; 548 | this.button7.Text = "Watch Schedule"; 549 | this.button7.UseVisualStyleBackColor = true; 550 | this.button7.Click += new System.EventHandler(this.button7_Click); 551 | // 552 | // textBox4 553 | // 554 | this.textBox4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 555 | this.textBox4.Font = new System.Drawing.Font("Calibri", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 556 | this.textBox4.Location = new System.Drawing.Point(124, 501); 557 | this.textBox4.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); 558 | this.textBox4.Name = "textBox4"; 559 | this.textBox4.Size = new System.Drawing.Size(665, 23); 560 | this.textBox4.TabIndex = 62; 561 | // 562 | // label12 563 | // 564 | this.label12.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 565 | this.label12.AutoSize = true; 566 | this.label12.Font = new System.Drawing.Font("Calibri", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 567 | this.label12.Location = new System.Drawing.Point(18, 504); 568 | this.label12.Name = "label12"; 569 | this.label12.Size = new System.Drawing.Size(89, 17); 570 | this.label12.TabIndex = 61; 571 | this.label12.Text = "Initial prompt:"; 572 | // 573 | // label14 574 | // 575 | this.label14.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 576 | this.label14.AutoSize = true; 577 | this.label14.Font = new System.Drawing.Font("Calibri", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 578 | this.label14.Location = new System.Drawing.Point(833, 501); 579 | this.label14.Name = "label14"; 580 | this.label14.Size = new System.Drawing.Size(72, 17); 581 | this.label14.TabIndex = 63; 582 | this.label14.Text = "Remaining:"; 583 | // 584 | // contextMenuStrip1 585 | // 586 | this.contextMenuStrip1.Font = new System.Drawing.Font("Calibri", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 587 | this.contextMenuStrip1.ImageScalingSize = new System.Drawing.Size(20, 20); 588 | this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { 589 | this.toolStripMenuItem1, 590 | this.toolStripMenuItem2, 591 | this.toolStripMenuItem3, 592 | this.toolStripMenuItem4}); 593 | this.contextMenuStrip1.Name = "contextMenuStrip1"; 594 | this.contextMenuStrip1.Size = new System.Drawing.Size(220, 108); 595 | // 596 | // toolStripMenuItem1 597 | // 598 | this.toolStripMenuItem1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripMenuItem1.Image"))); 599 | this.toolStripMenuItem1.Name = "toolStripMenuItem1"; 600 | this.toolStripMenuItem1.Size = new System.Drawing.Size(219, 26); 601 | this.toolStripMenuItem1.Text = "Open in default player"; 602 | this.toolStripMenuItem1.Click += new System.EventHandler(this.toolStripMenuItem1_Click); 603 | // 604 | // toolStripMenuItem2 605 | // 606 | this.toolStripMenuItem2.Font = new System.Drawing.Font("Calibri", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 607 | this.toolStripMenuItem2.Image = ((System.Drawing.Image)(resources.GetObject("toolStripMenuItem2.Image"))); 608 | this.toolStripMenuItem2.Name = "toolStripMenuItem2"; 609 | this.toolStripMenuItem2.Size = new System.Drawing.Size(219, 26); 610 | this.toolStripMenuItem2.Text = "Open in Explorer"; 611 | this.toolStripMenuItem2.Click += new System.EventHandler(this.toolStripMenuItem2_Click); 612 | // 613 | // toolStripMenuItem3 614 | // 615 | this.toolStripMenuItem3.Font = new System.Drawing.Font("Calibri", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 616 | this.toolStripMenuItem3.Image = ((System.Drawing.Image)(resources.GetObject("toolStripMenuItem3.Image"))); 617 | this.toolStripMenuItem3.Name = "toolStripMenuItem3"; 618 | this.toolStripMenuItem3.Size = new System.Drawing.Size(219, 26); 619 | this.toolStripMenuItem3.Text = "Remove"; 620 | this.toolStripMenuItem3.Click += new System.EventHandler(this.toolStripMenuItem3_Click); 621 | // 622 | // toolStripMenuItem4 623 | // 624 | this.toolStripMenuItem4.Font = new System.Drawing.Font("Calibri", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 625 | this.toolStripMenuItem4.Image = ((System.Drawing.Image)(resources.GetObject("toolStripMenuItem4.Image"))); 626 | this.toolStripMenuItem4.Name = "toolStripMenuItem4"; 627 | this.toolStripMenuItem4.ShortcutKeys = System.Windows.Forms.Keys.Delete; 628 | this.toolStripMenuItem4.Size = new System.Drawing.Size(219, 26); 629 | this.toolStripMenuItem4.Text = "Remove Selected"; 630 | this.toolStripMenuItem4.Click += new System.EventHandler(this.toolStripMenuItem4_Click); 631 | // 632 | // contextMenuStrip2 633 | // 634 | this.contextMenuStrip2.ImageScalingSize = new System.Drawing.Size(20, 20); 635 | this.contextMenuStrip2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { 636 | this.resetAllToDefaultToolStripMenuItem}); 637 | this.contextMenuStrip2.Name = "contextMenuStrip2"; 638 | this.contextMenuStrip2.Size = new System.Drawing.Size(208, 28); 639 | // 640 | // resetAllToDefaultToolStripMenuItem 641 | // 642 | this.resetAllToDefaultToolStripMenuItem.Name = "resetAllToDefaultToolStripMenuItem"; 643 | this.resetAllToDefaultToolStripMenuItem.Size = new System.Drawing.Size(207, 24); 644 | this.resetAllToDefaultToolStripMenuItem.Text = "Reset All to Default"; 645 | this.resetAllToDefaultToolStripMenuItem.Click += new System.EventHandler(this.resetAllToDefaultToolStripMenuItem_Click); 646 | // 647 | // Form1 648 | // 649 | this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); 650 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 651 | this.ClientSize = new System.Drawing.Size(1233, 534); 652 | this.Controls.Add(this.label14); 653 | this.Controls.Add(this.textBox4); 654 | this.Controls.Add(this.label12); 655 | this.Controls.Add(this.button7); 656 | this.Controls.Add(this.button6); 657 | this.Controls.Add(this.textBox3); 658 | this.Controls.Add(this.label11); 659 | this.Controls.Add(this.timeelapsed); 660 | this.Controls.Add(this.label9); 661 | this.Controls.Add(this.button5); 662 | this.Controls.Add(this.button4); 663 | this.Controls.Add(this.vttCheckBox); 664 | this.Controls.Add(this.txtCheckBox); 665 | this.Controls.Add(this.srtCheckBox); 666 | this.Controls.Add(this.comboBox2); 667 | this.Controls.Add(this.label8); 668 | this.Controls.Add(this.checkBox3); 669 | this.Controls.Add(this.numericUpDown1); 670 | this.Controls.Add(this.label7); 671 | this.Controls.Add(this.comboBox1); 672 | this.Controls.Add(this.label6); 673 | this.Controls.Add(this.checkBox2); 674 | this.Controls.Add(this.modelPathTextBox); 675 | this.Controls.Add(this.skipIfExistCheckBox); 676 | this.Controls.Add(this.label5); 677 | this.Controls.Add(this.label4); 678 | this.Controls.Add(this.label3); 679 | this.Controls.Add(this.textBox1); 680 | this.Controls.Add(this.label2); 681 | this.Controls.Add(this.label1); 682 | this.Controls.Add(this.goButton); 683 | this.Controls.Add(this.button2); 684 | this.Controls.Add(this.fastObjectListView1); 685 | this.Controls.Add(this.button1); 686 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); 687 | this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); 688 | this.Name = "Form1"; 689 | this.Text = "Whisperer"; 690 | this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form1_FormClosing); 691 | this.Load += new System.EventHandler(this.Form1_Load); 692 | ((System.ComponentModel.ISupportInitialize)(this.fastObjectListView1)).EndInit(); 693 | ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit(); 694 | this.contextMenuStrip1.ResumeLayout(false); 695 | this.contextMenuStrip2.ResumeLayout(false); 696 | this.ResumeLayout(false); 697 | this.PerformLayout(); 698 | 699 | } 700 | 701 | #endregion 702 | 703 | private System.Windows.Forms.Button button1; 704 | private System.Windows.Forms.OpenFileDialog openFileDialog1; 705 | private BrightIdeasSoftware.FastObjectListView fastObjectListView1; 706 | private BrightIdeasSoftware.OLVColumn olvColumn1; 707 | private System.Windows.Forms.Button button2; 708 | private System.Windows.Forms.Button goButton; 709 | private System.Windows.Forms.Label label1; 710 | private System.Windows.Forms.Label label2; 711 | private System.Windows.Forms.TextBox textBox1; 712 | private System.Windows.Forms.Label label3; 713 | private System.Windows.Forms.Label label4; 714 | private System.Windows.Forms.Label label5; 715 | private System.Windows.Forms.CheckBox skipIfExistCheckBox; 716 | private System.Windows.Forms.TextBox modelPathTextBox; 717 | private System.Windows.Forms.CheckBox checkBox2; 718 | private System.Windows.Forms.Label label6; 719 | private System.Windows.Forms.ComboBox comboBox1; 720 | private System.Windows.Forms.Label label7; 721 | private System.Windows.Forms.NumericUpDown numericUpDown1; 722 | private System.Windows.Forms.CheckBox checkBox3; 723 | private System.Windows.Forms.Label label8; 724 | private System.Windows.Forms.ComboBox comboBox2; 725 | private System.Windows.Forms.CheckBox srtCheckBox; 726 | private System.Windows.Forms.CheckBox txtCheckBox; 727 | private System.Windows.Forms.CheckBox vttCheckBox; 728 | private System.Windows.Forms.OpenFileDialog openFileDialog2; 729 | private System.Windows.Forms.FolderBrowserDialog folderBrowserDialog1; 730 | private System.Windows.Forms.Button button4; 731 | private System.Windows.Forms.Button button5; 732 | private System.Windows.Forms.Label label9; 733 | private System.Windows.Forms.Label timeelapsed; 734 | private System.Windows.Forms.Timer timer1; 735 | private System.Windows.Forms.Button button6; 736 | private System.Windows.Forms.TextBox textBox3; 737 | private System.Windows.Forms.Label label11; 738 | private System.Windows.Forms.Button button7; 739 | private System.Windows.Forms.TextBox textBox4; 740 | private System.Windows.Forms.Label label12; 741 | private System.Windows.Forms.Label label14; 742 | private System.Windows.Forms.ContextMenuStrip contextMenuStrip1; 743 | private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem1; 744 | private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem2; 745 | private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem3; 746 | private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem4; 747 | private BrightIdeasSoftware.OLVColumn olvColumn2; 748 | private System.Windows.Forms.ContextMenuStrip contextMenuStrip2; 749 | private System.Windows.Forms.ToolStripMenuItem resetAllToDefaultToolStripMenuItem; 750 | private BrightIdeasSoftware.OLVColumn olvColumn3; 751 | } 752 | } 753 | 754 | -------------------------------------------------------------------------------- /whisperer/Form1.cs: -------------------------------------------------------------------------------- 1 | using BrightIdeasSoftware; 2 | using Microsoft.Win32; 3 | using System; 4 | using System.Collections; 5 | using System.Collections.Concurrent; 6 | using System.Collections.Generic; 7 | using System.Diagnostics; 8 | using System.Drawing; 9 | using System.IO; 10 | using System.IO.Pipes; 11 | using System.Linq; 12 | using System.Management; 13 | using System.Media; 14 | using System.Runtime.InteropServices; 15 | using System.Text; 16 | using System.Threading; 17 | using System.Threading.Tasks; 18 | using System.Windows.Forms; 19 | using TaskScheduler; 20 | 21 | namespace whisperer 22 | { 23 | public partial class Form1 : Form, IMessageFilter 24 | { 25 | long totmem = 0, freemem = 0; 26 | bool cancel = false; 27 | ArrayList glbarray = new ArrayList(); 28 | ArrayList wavstodeloncancel = new ArrayList(); 29 | string glbmodel = ""; 30 | int completed = 0; 31 | string glboutdir, glblang, glbprompt; 32 | int glbwaittime = 0; 33 | Dictionary langs = new Dictionary(); 34 | bool glbsamefolder = false; 35 | List gpuCountersDedicated = new List(); 36 | ConcurrentQueue whisperq = new ConcurrentQueue(); 37 | bool quitq = false; 38 | Stopwatch sw = new Stopwatch(); 39 | string rootdir = Path.GetDirectoryName(Environment.GetCommandLineArgs()[0]); 40 | static ScheduledTasks schedtask = null; 41 | static TaskScheduler.Task tasksched = null; 42 | long largereq = 0; 43 | Dictionary durations = new Dictionary(); 44 | TimeSpan tottime; 45 | CustomProgressBar progressBar = new CustomProgressBar(); 46 | DateTime starttime; 47 | 48 | public Form1() 49 | { 50 | InitializeComponent(); 51 | progressBar.Location = new Point(timeelapsed.Location.X, label14.Location.Y - 3); 52 | progressBar.Size = new Size(comboBox1.Width, 18); 53 | progressBar.Anchor = AnchorStyles.Bottom | AnchorStyles.Left; 54 | progressBar.DisplayStyle = ProgressBarDisplayText.CustomText; 55 | progressBar.CustomText = "--:--:--"; 56 | Controls.Add(progressBar); 57 | Application.AddMessageFilter(this); 58 | } 59 | 60 | public bool PreFilterMessage(ref Message m) 61 | { 62 | if (m.Msg == 0x20a) 63 | { 64 | // WM_MOUSEWHEEL, find the control at screen position m.LParam 65 | Point pos = new Point(m.LParam.ToInt32() & 0xffff, m.LParam.ToInt32() >> 16); 66 | IntPtr hWnd = WindowFromPoint(pos); 67 | Control c = Control.FromHandle(hWnd); 68 | 69 | if (hWnd != IntPtr.Zero && c != null && hWnd != m.HWnd && this.Contains(c)) 70 | { 71 | SendMessage(hWnd, (uint)m.Msg, m.WParam, m.LParam); 72 | return true; 73 | } 74 | } 75 | return false; 76 | } 77 | 78 | void Form1_Load(object sender, EventArgs e) 79 | { 80 | if (!IsAtLeastWindows10()) 81 | { 82 | ShowError(@"Unsupported Windows version, will now exit."); 83 | FormClosing -= new FormClosingEventHandler(Form1_FormClosing); 84 | Application.Exit(); 85 | return; 86 | } 87 | 88 | if (Execute("ffmpeg.exe") == 2) 89 | ShowError(ffmpegnotfound); 90 | 91 | Thread thr = new Thread(initperfcounter); 92 | thr.IsBackground = true; 93 | thr.Start(); 94 | 95 | Thread watchthr = new Thread(watchwait); 96 | watchthr.IsBackground = true; 97 | watchthr.Start(); 98 | 99 | Thread waitlaunch = new Thread(wait4launch); 100 | waitlaunch.IsBackground = true; 101 | waitlaunch.Start(); 102 | 103 | getwhispersize(true); 104 | 105 | string tsvfile = Path.Combine(rootdir, "languageCodez.tsv"); 106 | if (File.Exists(tsvfile)) 107 | { 108 | foreach (string line in File.ReadLines(tsvfile)) 109 | { 110 | string[] lang = line.Split('\t'); 111 | string proper = toproper(lang[2]); 112 | langs.Add(proper, lang[0]); 113 | comboBox1.Items.Add(proper); 114 | } 115 | } 116 | else 117 | { 118 | ShowError("languageCodez.tsv missing!"); 119 | langs.Add("English", "en"); 120 | comboBox1.Items.Add("English"); 121 | } 122 | 123 | loadsettings(); 124 | 125 | srtCheckBox.CheckedChanged += outputtype_CheckedChanged; 126 | txtCheckBox.CheckedChanged += outputtype_CheckedChanged; 127 | vttCheckBox.CheckedChanged += outputtype_CheckedChanged; 128 | 129 | if (totmem == 0) 130 | { 131 | ShowError("Unsupprted GPU, will now exit."); 132 | FormClosing -= new FormClosingEventHandler(Form1_FormClosing); 133 | Application.Exit(); 134 | } 135 | else if (Program.iswatch) 136 | button3_Click(null, null); 137 | } 138 | 139 | bool IsAtLeastWindows10() 140 | { 141 | try 142 | { 143 | string productName = (string)Registry.GetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion", "ProductName", ""); 144 | return productName.Contains("Windows 1") || productName.Contains("Windows 2") || productName.Contains("Windows 3"); 145 | } 146 | catch { } 147 | 148 | return false; 149 | } 150 | 151 | void loadfilelist() 152 | { 153 | string s = readreg("files", ""); 154 | string[] files = s.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries); 155 | s = readreg("langs", ""); 156 | string[] reglangs = s.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries); 157 | s = readreg("translates", ""); 158 | string[] translates = s.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries); 159 | fastObjectListView1.BeginUpdate(); 160 | List items = new List(); 161 | try 162 | { 163 | for (int i = 0; i < files.Length; i++) 164 | items.Add(new filenameline(files[i], reglangs.Length > 0 ? reglangs[i] : "Default", 165 | translates.Length > 0 ? translates[i] == "1" : checkBox2.Checked)); 166 | } 167 | catch { } 168 | fastObjectListView1.AddObjects(items); 169 | fastObjectListView1.EndUpdate(); 170 | fastObjectListView1.SelectAll(); 171 | } 172 | 173 | void loadsettings() 174 | { 175 | Cursor = Cursors.WaitCursor; 176 | textBox1.Text = readreg("outputdir", textBox1.Text); 177 | modelPathTextBox.Text = readreg("modelpath", modelPathTextBox.Text); 178 | comboBox1.Text = toproper(readreg("language", "English")); 179 | srtCheckBox.Checked = Convert.ToBoolean(readreg("srt", "True")); 180 | txtCheckBox.Checked = Convert.ToBoolean(readreg("txt", "False")); 181 | vttCheckBox.Checked = Convert.ToBoolean(readreg("vtt", "False")); 182 | numericUpDown1.Value = Convert.ToDecimal(readreg("maxatonce", "10")); 183 | comboBox2.Text = readreg("whendone", "Do nothing"); 184 | checkBox3.Checked = Convert.ToBoolean(readreg("sameasinputfolder", "False")); 185 | skipIfExistCheckBox.Checked = Convert.ToBoolean(readreg("skipifexists", "True")); 186 | checkBox2.Checked = Convert.ToBoolean(readreg("translate", "False")); 187 | textBox3.Text = readreg("watchfolders", textBox3.Text); 188 | textBox4.Text = readreg("prompt", textBox4.Text); 189 | loadfilelist(); 190 | Cursor = Cursors.Default; 191 | } 192 | 193 | string toproper(string s) 194 | { 195 | try 196 | { 197 | return s.Substring(0, 1).ToUpperInvariant() + s.Substring(1); 198 | } 199 | catch { } 200 | return "English"; 201 | } 202 | 203 | void outputtype_CheckedChanged(object sender, EventArgs e) 204 | { 205 | CheckBox clickedCheckBox = sender as CheckBox; 206 | if (!clickedCheckBox.Checked && !srtCheckBox.Checked && !txtCheckBox.Checked && !vttCheckBox.Checked) 207 | { 208 | clickedCheckBox.CheckedChanged -= outputtype_CheckedChanged; 209 | clickedCheckBox.Checked = true; 210 | clickedCheckBox.CheckedChanged += outputtype_CheckedChanged; 211 | } 212 | } 213 | 214 | void writereg(string name, string value) 215 | { 216 | try 217 | { 218 | using (RegistryKey key = Registry.CurrentUser.CreateSubKey(@"SOFTWARE\tigros\whisperer")) 219 | { 220 | if (key != null) 221 | key.SetValue(name, value); 222 | } 223 | } 224 | catch { } 225 | } 226 | 227 | string readreg(string name, string deflt) 228 | { 229 | try 230 | { 231 | using (RegistryKey key = Registry.CurrentUser.OpenSubKey(@"SOFTWARE\tigros\whisperer")) 232 | { 233 | if (key != null) 234 | { 235 | object o = key.GetValue(name); 236 | if (o != null) 237 | return (string)o; 238 | } 239 | } 240 | } 241 | catch { } 242 | return deflt; 243 | } 244 | 245 | void initperfcounter() 246 | { 247 | try 248 | { 249 | Debug.WriteLine("Initializing GPU counters..."); 250 | 251 | var category = new PerformanceCounterCategory("GPU Adapter Memory"); 252 | var counterNames = category.GetInstanceNames(); 253 | foreach (string counterName in counterNames) 254 | { 255 | foreach (var counter in category.GetCounters(counterName)) 256 | { 257 | if (counter.CounterName == "Dedicated Usage") 258 | { 259 | Debug.WriteLine($" {counter.InstanceName}"); 260 | gpuCountersDedicated.Add(counter); 261 | } 262 | } 263 | } 264 | 265 | Debug.WriteLine($"GPU counters have been initialized. Counters count: {gpuCountersDedicated.Count}"); 266 | 267 | if (gpuCountersDedicated.Count == 0) 268 | ShowError("Failed to initialize GPU performance counters"); 269 | 270 | goButton.BeginInvoke((Action)delegate { goButton.Enabled = true; }); 271 | } 272 | catch (Exception ex) 273 | { 274 | ShowError(@"Possibly corrupt perf counters, try C:\Windows\SysWOW64\LODCTR /R from elevated cmd prompt, if an error occurs, run it again. Will now exit."); 275 | FormClosing -= new FormClosingEventHandler(Form1_FormClosing); 276 | Application.Exit(); 277 | } 278 | } 279 | 280 | long getfreegpumem() 281 | { 282 | var usedMem = 0f; 283 | Debug.WriteLine("Calculating free VRAM..."); 284 | gpuCountersDedicated.ForEach(x => 285 | { 286 | float value = x.NextValue(); 287 | Debug.WriteLine($" {x.InstanceName}: {value}"); 288 | usedMem += value; 289 | }); 290 | if (totmem < usedMem) 291 | throw new Exception($"Failed to calculate free GPU memory. Used memory: {usedMem / 1024 / 1024} MB, Total memory: {totmem / 1024 / 1024} MB"); 292 | return Convert.ToInt64(totmem - usedMem); 293 | } 294 | 295 | void fillmemvars() 296 | { 297 | freemem = getfreegpumem(); 298 | } 299 | 300 | void button1_Click(object sender, EventArgs e) 301 | { 302 | if (openFileDialog1.ShowDialog() == DialogResult.OK) 303 | { 304 | Cursor = Cursors.WaitCursor; 305 | fastObjectListView1.BeginUpdate(); 306 | filllookup(); 307 | foreach (string filename in openFileDialog1.FileNames) 308 | { 309 | if (!filelookup.ContainsKey(filename)) 310 | { 311 | fastObjectListView1.AddObject(new filenameline(filename, checkBox2.Checked)); 312 | filelookup.TryAdd(filename, true); 313 | } 314 | } 315 | filelookup.Clear(); 316 | fastObjectListView1.EndUpdate(); 317 | fastObjectListView1.SelectAll(); 318 | Cursor = Cursors.Default; 319 | } 320 | } 321 | 322 | protected override bool ProcessCmdKey(ref Message msg, Keys keyData) 323 | { 324 | if (keyData == Keys.Delete && fastObjectListView1.Focused) 325 | { 326 | fastObjectListView1.RemoveObjects(fastObjectListView1.SelectedObjects); 327 | return true; 328 | } 329 | return base.ProcessCmdKey(ref msg, keyData); 330 | } 331 | 332 | void button2_Click(object sender, EventArgs e) 333 | { 334 | fastObjectListView1.ClearObjects(); 335 | setcount(); 336 | completed = 0; 337 | label5.Text = "0"; 338 | } 339 | 340 | long getwhispersize(bool filltotmem = false) 341 | { 342 | long whispersize = 0; 343 | try 344 | { 345 | Process proc = new Process(); 346 | proc.StartInfo.FileName = "GPUmembyproc.exe"; 347 | proc.StartInfo.Arguments = "main.exe"; 348 | proc.StartInfo.RedirectStandardInput = true; 349 | proc.StartInfo.RedirectStandardOutput = true; 350 | proc.StartInfo.UseShellExecute = false; 351 | proc.StartInfo.CreateNoWindow = true; 352 | proc.Start(); 353 | string[] vals = proc.StandardOutput.ReadToEnd().Trim().Replace(",", "").Replace("\r\n", " ").Split(new string[] { " " }, StringSplitOptions.RemoveEmptyEntries); 354 | proc.WaitForExit(); 355 | if (vals.Length >= 4) 356 | whispersize = Convert.ToInt64(vals[3]); 357 | if (filltotmem) 358 | totmem = Convert.ToInt64(vals[vals.Length - 1]); 359 | } 360 | catch 361 | { 362 | ShowError("GPUmembyproc.exe not found!"); 363 | FormClosing -= new FormClosingEventHandler(Form1_FormClosing); 364 | Application.Exit(); 365 | } 366 | return whispersize; 367 | } 368 | 369 | bool outputexists(string filename, bool ignorecb = false) 370 | { 371 | if (!ignorecb && !skipIfExistCheckBox.Checked && !Program.iswatch) 372 | return false; 373 | filename = filename.Remove(filename.LastIndexOf('.')); 374 | 375 | if (filename.EndsWith(".wav")) 376 | filename = filename.Remove(filename.LastIndexOf('.')); 377 | 378 | bool res = true; 379 | if (srtCheckBox.Checked) 380 | res = File.Exists(filename + ".srt"); 381 | if (txtCheckBox.Checked) 382 | res &= File.Exists(filename + ".txt"); 383 | if (vttCheckBox.Checked) 384 | res &= File.Exists(filename + ".vtt"); 385 | return res; 386 | } 387 | 388 | string wavname(string filename) 389 | { 390 | string outname = Path.Combine(getfolder(filename), Path.GetFileName(filename)); 391 | int i = outname.LastIndexOf('.'); 392 | if (i == -1) 393 | return ""; 394 | outname = outname.Remove(i) + ".wav"; 395 | if (Path.GetExtension(filename).ToLower() == ".wav") 396 | outname += ".wav"; 397 | return outname; 398 | } 399 | 400 | void convertandwhisper(string filename) 401 | { 402 | try 403 | { 404 | while ((Process.GetProcessesByName("ffmpeg").Length >= numericUpDown1.Value || 405 | whisperq.Count >= numericUpDown1.Value) && !cancel) 406 | Thread.Sleep(100); 407 | filename = filename.Substring(0, filename.IndexOf(';')); 408 | string outname = wavname(filename); 409 | if (outname == "" || cancel) 410 | return; 411 | Process proc = new Process(); 412 | proc.StartInfo.FileName = "ffmpeg.exe"; 413 | proc.StartInfo.Arguments = "-y -i \"" + filename + "\" -vn -ar 16000 -ac 1 -ab 32k -af volume=1.75 -f wav \"" + outname + "\""; 414 | proc.StartInfo.UseShellExecute = false; 415 | proc.StartInfo.CreateNoWindow = true; 416 | proc.StartInfo.Domain = filename; 417 | try 418 | { 419 | durationrec dr = durations[filename]; 420 | dr.starttime = DateTime.Now; 421 | } 422 | catch { } 423 | 424 | if (File.Exists(outname) || outputexists(outname)) 425 | { 426 | ffmpeg_Exited(proc, null); 427 | return; 428 | } 429 | 430 | wavstodeloncancel.Add(outname); 431 | proc.EnableRaisingEvents = true; 432 | proc.Exited += ffmpeg_Exited; 433 | proc.Start(); 434 | } 435 | catch (Exception ex) 436 | { 437 | cancel = true; 438 | ShowError(ffmpegnotfound); 439 | } 440 | } 441 | 442 | void ffmpeg_Exited(object sender, EventArgs e) 443 | { 444 | qwhisper((Process)sender); 445 | } 446 | 447 | string getfolder(string filename) 448 | { 449 | return glbsamefolder ? Path.GetDirectoryName(filename) : glboutdir; 450 | } 451 | 452 | void wait4it(string filename) 453 | { 454 | int div = 1; 455 | try 456 | { 457 | FileInfo fi = new FileInfo(filename); 458 | div = fi.Length < 10000000 ? 10 : fi.Length < 20000000 ? 3 : 1; 459 | } 460 | catch { } 461 | 462 | long whispersize = 0; 463 | 464 | while (whispersize == 0 && Process.GetProcessesByName("main").Length > 0 && !cancel) 465 | { 466 | Thread.Sleep(1000 / div); 467 | whispersize = getwhispersize(); 468 | if (whispersize > 0) 469 | { 470 | for (int i = 0; i < glbwaittime / div && !cancel; i += 1000) 471 | Thread.Sleep(1000); 472 | whispersize = getwhispersize(); 473 | fillmemvars(); 474 | } 475 | } 476 | 477 | while (freemem - 200000000 < whispersize && Process.GetProcessesByName("main").Length > 0 && !cancel) 478 | { 479 | Thread.Sleep(1000); 480 | fillmemvars(); 481 | whispersize = getwhispersize(); 482 | } 483 | } 484 | 485 | void qwhisper(Process p) 486 | { 487 | if (cancel) 488 | return; 489 | 490 | string filename = getfilename(p); 491 | 492 | whisperq.Enqueue(new Action(() => 493 | { 494 | try 495 | { 496 | while (Process.GetProcessesByName("main").Length >= numericUpDown1.Value && !cancel) 497 | Thread.Sleep(1000); 498 | Process proc = new Process(); 499 | string errorOutput = ""; 500 | proc.StartInfo.FileName = "main.exe"; 501 | proc.StartInfo.Domain = p.StartInfo.Domain; 502 | string[] splitrow = glbarray.FindRow(p.StartInfo.Domain).Split(';'); 503 | string langcode = splitrow[1]; 504 | string translate = " "; 505 | if (splitrow[2] == "1") 506 | translate = " -tr "; 507 | 508 | string outtypes = ""; 509 | if (srtCheckBox.Checked) 510 | outtypes = "--output-srt "; 511 | if (txtCheckBox.Checked) 512 | outtypes += "--output-txt "; 513 | if (vttCheckBox.Checked) 514 | outtypes += "--output-vtt "; 515 | 516 | string prompt = " "; 517 | if (glbprompt != "") 518 | prompt = " --prompt \"" + glbprompt + "\" "; 519 | 520 | proc.StartInfo.Arguments = "--language " + langcode + translate + outtypes + "--no-timestamps --max-context 0 --model \"" + 521 | glbmodel + "\"" + prompt + "\"" + filename + "\""; 522 | proc.StartInfo.UseShellExecute = false; 523 | proc.StartInfo.CreateNoWindow = true; 524 | 525 | if (outputexists(filename)) 526 | { 527 | whisper_Exited(proc, null, null); 528 | return; 529 | } 530 | if (!File.Exists(filename)) 531 | return; 532 | 533 | fillmemvars(); 534 | long neededmem = 400000000; 535 | if (glbwaittime == 15000) 536 | neededmem = 2400000000; 537 | else if (glbwaittime == 20000) 538 | neededmem = largereq; 539 | 540 | while (freemem < neededmem && !cancel) 541 | { 542 | Thread.Sleep(1000); 543 | fillmemvars(); 544 | } 545 | 546 | if (cancel) 547 | return; 548 | 549 | proc.StartInfo.RedirectStandardError = true; 550 | proc.ErrorDataReceived += (sender, e) => 551 | { 552 | if (!string.IsNullOrEmpty(e.Data)) 553 | { 554 | Debug.WriteLine(e.Data); 555 | errorOutput += e.Data; 556 | errorOutput += "\n"; 557 | } 558 | }; 559 | int wlen = Process.GetProcessesByName("main").Length; 560 | proc.EnableRaisingEvents = true; 561 | proc.Exited += (sender, e) => { whisper_Exited(sender, e, errorOutput); }; 562 | 563 | Debug.WriteLine($"Starting main.exe. Arguments: {proc.StartInfo.Arguments}"); 564 | proc.Start(); 565 | proc.BeginErrorReadLine(); 566 | 567 | while (Process.GetProcessesByName("main").Length == wlen) 568 | Thread.Sleep(10); 569 | 570 | wait4it(filename); 571 | } 572 | catch (Exception ex) 573 | { 574 | cancel = true; 575 | ShowError(ex.ToString()); 576 | } 577 | })); 578 | } 579 | 580 | int Execute(string path) 581 | { 582 | string dir = ""; 583 | try 584 | { 585 | dir = Path.GetDirectoryName(path); 586 | } 587 | catch { } 588 | try 589 | { 590 | IntPtr result = ShellExecute(0, "", path, "", dir, path == "ffmpeg.exe" ? SW_HIDE : SW_SHOWNORMAL); 591 | return result.ToInt32(); 592 | } 593 | catch { } 594 | return -1; 595 | } 596 | 597 | void openinplayer(object o) 598 | { 599 | filenameline f = (filenameline)o; 600 | if (File.Exists(f.filename)) 601 | Execute(f.filename); 602 | } 603 | 604 | private void fastObjectListView1_CellClick(object sender, BrightIdeasSoftware.CellClickEventArgs e) 605 | { 606 | try 607 | { 608 | if (e.ClickCount == 2 && e.HitTest.HitTestLocation == HitTestLocation.Text) 609 | openinplayer(fastObjectListView1.SelectedObject); 610 | } 611 | catch { } 612 | } 613 | 614 | void tryrename(string filename, string ext) 615 | { 616 | try 617 | { 618 | string oldname = filename + ".wav" + ext; 619 | if (File.Exists(oldname)) 620 | { 621 | string newname = filename + ext; 622 | delwretry(newname); 623 | File.Move(oldname, newname); 624 | } 625 | } 626 | catch { } 627 | } 628 | 629 | readonly string[] exts = { ".srt", ".txt", ".vtt" }; 630 | 631 | void renamewaves(string filename) 632 | { 633 | if (filename.EndsWith(".wav.wav")) 634 | { 635 | filename = filename.Remove(filename.Length - 8); 636 | foreach (string ext in exts) 637 | tryrename(filename, ext); 638 | } 639 | } 640 | 641 | string getfilename(Process p) 642 | { 643 | return getfilename2(p.StartInfo.Arguments); 644 | } 645 | 646 | void settimeremaining(TimeSpan t) 647 | { 648 | int totalHours = (int)t.TotalHours; 649 | progressBar.CustomText = $"{totalHours}:{t:mm\\:ss}"; 650 | TimeSpan totalDuration = DateTime.Now - starttime + t; 651 | TimeSpan elapsedTime = DateTime.Now - starttime; 652 | int progress = (int)((elapsedTime.TotalMilliseconds / totalDuration.TotalMilliseconds) * 100); 653 | int value = Math.Min(Math.Max(progress, 0), 100); 654 | if (value > progressBar.Value) 655 | progressBar.Value = value; 656 | } 657 | 658 | void setelapsed() 659 | { 660 | int totalHours = (int)sw.Elapsed.TotalHours; 661 | timeelapsed.Text = $"{totalHours}:{sw.Elapsed:mm\\:ss}"; 662 | } 663 | 664 | int maxmains = 0; 665 | void updatetimeremaining() 666 | { 667 | TimeSpan exectime = TimeSpan.Zero; 668 | TimeSpan duration = TimeSpan.Zero; 669 | 670 | foreach (KeyValuePair r in durations) 671 | { 672 | if (r.Value.exectime != TimeSpan.Zero) 673 | { 674 | exectime += r.Value.exectime; 675 | duration += r.Value.duration; 676 | } 677 | } 678 | 679 | if (exectime <= TimeSpan.Zero || duration <= TimeSpan.Zero) 680 | return; 681 | 682 | int mains = Process.GetProcessesByName("main").Length; 683 | if (mains > maxmains) 684 | maxmains = mains; 685 | TimeSpan timetodo = tottime - duration; 686 | double timepersec = exectime.TotalSeconds / duration.TotalSeconds / (maxmains + 1); 687 | int todo = (int)(timetodo.TotalSeconds * timepersec); 688 | TimeSpan ttodo = new TimeSpan(0, 0, todo); 689 | Invoke(new Action(() => 690 | { 691 | settimeremaining(ttodo); 692 | })); 693 | } 694 | 695 | void whisper_Exited(object sender, EventArgs e, string errorOutput) 696 | { 697 | try 698 | { 699 | if (cancel) 700 | return; 701 | var proc = sender as Process; 702 | string filename = getfilename(proc); 703 | try 704 | { 705 | durationrec dr = durations[proc.StartInfo.Domain]; 706 | dr.exectime = DateTime.Now - dr.starttime; 707 | } 708 | catch { } 709 | 710 | renamewaves(filename); 711 | delwretry(filename); 712 | completed++; 713 | updatetimeremaining(); 714 | 715 | Invoke(new Action(() => 716 | { 717 | label5.Text = completed.ToString("#,##0"); 718 | })); 719 | 720 | if (proc.ExitCode != 0) // non-blocking 721 | ShowError($"main.exe exited with error code: {proc.ExitCode}\n\n{errorOutput}\n\nFile name: {filename}", true); 722 | else if (!outputexists(filename, !Program.iswatch)) 723 | ShowError($"Something went wrong, no output produced!\n\nFile name: {filename}", true); 724 | } 725 | catch { } 726 | } 727 | 728 | bool checkdir() 729 | { 730 | if (!checkBox3.Checked && !Directory.Exists(glboutdir)) 731 | { 732 | try 733 | { 734 | Directory.CreateDirectory(glboutdir); 735 | } 736 | catch 737 | { 738 | ShowError("An error occured creating directory " + glboutdir); 739 | return false; 740 | } 741 | } 742 | return true; 743 | } 744 | 745 | void playsound() 746 | { 747 | string soundfile = Path.Combine(rootdir, "sound.wav"); 748 | if (File.Exists(soundfile)) 749 | new SoundPlayer(soundfile).Play(); 750 | else 751 | new SoundPlayer(Properties.Resources.tada).Play(); 752 | } 753 | 754 | string getfilename2(string args) 755 | { 756 | string filename = args.TrimEnd('"'); 757 | return filename.Substring(filename.LastIndexOf('"') + 1); 758 | } 759 | 760 | bool delwretry(string fname) 761 | { 762 | for (int retry = 0; retry < 50; retry++) 763 | { 764 | try 765 | { 766 | File.Delete(fname); 767 | return true; 768 | } 769 | catch 770 | { 771 | Thread.Sleep(100); 772 | } 773 | } 774 | return false; 775 | } 776 | 777 | void killbyproc(string proc) 778 | { 779 | string fname; 780 | Process[] procs = Process.GetProcessesByName(proc); 781 | foreach (Process p in procs) 782 | { 783 | try 784 | { 785 | fname = getfilename2(p.GetCommandLine()); 786 | if (wavstodeloncancel.Contains(fname)) 787 | p.Kill(); 788 | } 789 | catch { } 790 | } 791 | } 792 | 793 | void killemall() 794 | { 795 | Thread thr = new Thread(() => 796 | { 797 | killbyproc("ffmpeg"); 798 | killbyproc("main"); 799 | foreach (string wav in wavstodeloncancel) 800 | delwretry(wav); 801 | }); 802 | thr.Start(); 803 | } 804 | 805 | void whendone() 806 | { 807 | timer1.Enabled = false; 808 | quitq = true; 809 | progressBar.Value = 0; 810 | goButton.Text = "Go"; 811 | if (cancel) 812 | { 813 | killemall(); 814 | return; 815 | } 816 | if (Program.iswatch) 817 | return; 818 | if (comboBox2.Text == "Shutdown") 819 | Process.Start("shutdown", "/s /t 1"); 820 | else if (comboBox2.Text == "Sleep") 821 | Application.SetSuspendState(PowerState.Suspend, true, true); 822 | else if (comboBox2.Text == "Hibernate") 823 | Application.SetSuspendState(PowerState.Hibernate, true, true); 824 | else if (comboBox2.Text == "Lock") 825 | LockWorkStation(); 826 | else if (comboBox2.Text == "Log off") 827 | ExitWindowsEx(0, 0); 828 | else if (comboBox2.Text == "Play sound") 829 | playsound(); 830 | } 831 | 832 | bool notdone() 833 | { 834 | return Process.GetProcessesByName("ffmpeg").Length > 0 || Process.GetProcessesByName("main").Length > 0 || whisperq.Count > 0; 835 | } 836 | 837 | void waitilldone() 838 | { 839 | while (!cancel) 840 | { 841 | if (notdone()) 842 | Thread.Sleep(1000); 843 | else 844 | { 845 | Thread.Sleep(3000); 846 | if (!notdone()) 847 | break; 848 | } 849 | } 850 | } 851 | 852 | void processarray() 853 | { 854 | foreach (string filename in glbarray) 855 | { 856 | if (cancel) 857 | break; 858 | convertandwhisper(filename); 859 | } 860 | } 861 | 862 | void checkwatchfolders() 863 | { 864 | if (!Program.iswatch && !cancel) 865 | { 866 | Program.iswatch = true; 867 | glbarray.Clear(); 868 | loadwatchfilelist(); 869 | getdurations(); 870 | tottime = gettottime(); 871 | starttime = DateTime.Now; 872 | Invoke(new Action(() => 873 | { 874 | progressBar.Value = 0; 875 | })); 876 | processarray(); 877 | if (tottime > TimeSpan.Zero) 878 | waitilldone(); 879 | Program.iswatch = false; 880 | } 881 | } 882 | 883 | void execwhisper() 884 | { 885 | processarray(); 886 | waitilldone(); 887 | checkwatchfolders(); 888 | } 889 | 890 | void consumeq() 891 | { 892 | Action act = null; 893 | while (!quitq) 894 | { 895 | while (!quitq && whisperq.TryDequeue(out act)) 896 | act(); 897 | Thread.Sleep(100); 898 | } 899 | } 900 | 901 | bool isagen(string[] exts, ref string fname) 902 | { 903 | try 904 | { 905 | string ext = Path.GetExtension(fname).ToUpperInvariant(); 906 | foreach (string s in exts) 907 | { 908 | if (s == ext) 909 | return true; 910 | } 911 | } 912 | catch { } 913 | return false; 914 | } 915 | 916 | readonly string[] audioext = {".3GA", ".669", ".A52", ".AAC", ".AAX", ".AC3", ".ADT", ".ADTS", ".AIF", ".AIFC", 917 | ".AIFF", ".AMB", ".AMR", ".AOB", ".APE", ".AU", ".AWB", ".CAF", ".DTS", ".FLAC", // ".DSF", ".DFF", 918 | ".IT", ".KAR", ".M4A", ".M4B", ".M4P", ".M4R", ".M5P", ".MID", ".MKA", ".MLP", ".MOD", ".MPA", ".MP1", ".MP2", 919 | ".MP3", ".MPC", ".MPGA", ".MUS", ".OGA", ".OGG", ".OMA", ".OPUS", ".QCP", ".RA", ".RMI", ".S3M", ".SID", 920 | ".SPX", ".TAK", ".THD", ".TTA", ".VOC", ".VOX", ".VQF", ".W64", ".WAV", ".WMA", ".WV", ".XA", ".XM" }; 921 | 922 | readonly string[] videoext = {".3G2", ".3GP", ".3GP2", ".3GPP", ".AMV", ".ASF", ".AVI", ".BIK", ".BIN", ".CRF", 923 | ".DIVX", ".DRC", ".DV", ".DVR-MS", ".EVO", ".F4V", ".FLV", ".GVI", ".GXF", ".ISO", ".M1V", ".M2V", 924 | ".M2T", ".M2TS", ".M4V", ".MKV", ".MOV", ".MP2", ".MP2V", ".MP4", ".MP4V", ".MPE", ".MPEG", ".MPEG1", 925 | ".MPEG2", ".MPEG4", ".MPG", ".MPV2", ".MTS", ".MTV", ".MXF", ".MXG", ".NSV", ".NUV", ".OGM", 926 | ".OGV", ".OGX", ".RAM", ".REC", ".RM", ".RMVB", ".RPL", ".THP", ".TOD", ".TP", ".TS", ".TTS", ".TXD", 927 | ".VOB", ".VRO", ".WEBM", ".WM", ".WMV", ".WTV", ".XESC"}; 928 | 929 | bool issoundtype(string fname) 930 | { 931 | return isagen(audioext, ref fname) || isagen(videoext, ref fname); 932 | } 933 | 934 | void loadwatchfilelist() 935 | { 936 | string[] folders = textBox3.Text.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries); 937 | foreach (string folder in folders) 938 | { 939 | try 940 | { 941 | string[] files = Directory.GetFiles(folder); 942 | foreach (string file in files) 943 | if (issoundtype(file) && !glbarray.MyContains(file)) 944 | glbarray.Add(file + ";" + glblang + ";" + (checkBox2.Checked ? "1" : "0")); 945 | } 946 | catch { } 947 | } 948 | } 949 | 950 | TimeSpan getduration(string filename) 951 | { 952 | try 953 | { 954 | Process proc = new Process(); 955 | proc.StartInfo.FileName = "ffmpeg.exe"; 956 | proc.StartInfo.Arguments = "-i \"" + filename + '"'; 957 | proc.StartInfo.RedirectStandardInput = true; 958 | proc.StartInfo.RedirectStandardOutput = true; 959 | proc.StartInfo.RedirectStandardError = true; 960 | proc.StartInfo.UseShellExecute = false; 961 | proc.StartInfo.CreateNoWindow = true; 962 | proc.Start(); 963 | string output = proc.StandardError.ReadToEnd(); 964 | proc.WaitForExit(); 965 | 966 | int pos = output.IndexOf("Duration:"); 967 | 968 | if (pos == -1) 969 | return TimeSpan.Zero; 970 | 971 | pos += 10; 972 | try 973 | { 974 | int comma = output.IndexOf(',', pos); 975 | string s = output.Substring(pos, comma - pos); 976 | string[] units = s.Split(new char[] { ':', '.' }); 977 | return new TimeSpan(Convert.ToInt32(units[0]), Convert.ToInt32(units[1]), Convert.ToInt32(units[2])); 978 | } 979 | catch { } 980 | } 981 | catch (Exception ex) 982 | { 983 | if (!cancel) 984 | { 985 | cancel = true; 986 | ShowError(ffmpegnotfound); 987 | } 988 | } 989 | return TimeSpan.Zero; 990 | } 991 | 992 | void getdurations() 993 | { 994 | List tasks = new List(); 995 | durations.Clear(); 996 | foreach (string filename in glbarray) 997 | { 998 | string fname = filename.Substring(0, filename.IndexOf(';')); 999 | string outname = wavname(fname); 1000 | 1001 | if (outname == "" || outputexists(outname)) 1002 | continue; 1003 | 1004 | System.Threading.Tasks.Task t = System.Threading.Tasks.Task.Factory.StartNew(() => 1005 | { 1006 | if (cancel) 1007 | return; 1008 | durationrec r = new durationrec(getduration(fname)); 1009 | if (r.duration != TimeSpan.Zero) 1010 | lock (durations) 1011 | durations.Add(fname, r); 1012 | }); 1013 | tasks.Add(t); 1014 | } 1015 | System.Threading.Tasks.Task.WaitAll(tasks.ToArray()); 1016 | } 1017 | 1018 | TimeSpan gettottime() 1019 | { 1020 | TimeSpan tot = TimeSpan.Zero; 1021 | foreach (KeyValuePair r in durations) 1022 | tot += r.Value.duration; 1023 | return tot; 1024 | } 1025 | 1026 | string getlangcode(string lang) 1027 | { 1028 | if (lang == "Default") 1029 | return glblang; 1030 | return langs[lang]; 1031 | } 1032 | 1033 | void button3_Click(object sender, EventArgs e) 1034 | { 1035 | try 1036 | { 1037 | if (goButton.Text == "Go") 1038 | { 1039 | if (fastObjectListView1.SelectedObjects.Count == 0 && textBox3.Text.Trim() == "") 1040 | { 1041 | ShowError("No files selected!"); 1042 | return; 1043 | } 1044 | glboutdir = textBox1.Text.Trim(); 1045 | glbprompt = textBox4.Text.Trim(); 1046 | if (!checkdir()) 1047 | return; 1048 | glbarray.Clear(); 1049 | wavstodeloncancel.Clear(); 1050 | glbmodel = modelPathTextBox.Text; 1051 | glblang = langs[comboBox1.Text]; 1052 | if (!File.Exists(glbmodel)) 1053 | { 1054 | ShowError(glbmodel + " not found!"); 1055 | return; 1056 | } 1057 | 1058 | glbwaittime = 10000; 1059 | largereq = 4300000000; 1060 | 1061 | if (glbmodel.ToLower().Contains("medium")) 1062 | glbwaittime = 15000; 1063 | else if (glbmodel.ToLower().Contains("large")) 1064 | { 1065 | glbwaittime = 20000; 1066 | if (totmem < 5000000000) 1067 | largereq = 3000000000; 1068 | } 1069 | 1070 | if ((glbwaittime == 15000 && totmem < 2400000000) || 1071 | (glbwaittime == 20000 && totmem < largereq)) 1072 | { 1073 | ShowError("Insufficient graphics memory for this model!"); 1074 | return; 1075 | } 1076 | 1077 | if (Program.iswatch) 1078 | { 1079 | loadwatchfilelist(); 1080 | if (glbarray.Count == 0) 1081 | { 1082 | Program.iswatch = false; 1083 | return; 1084 | } 1085 | } 1086 | else 1087 | foreach (filenameline filename in fastObjectListView1.SelectedObjects) 1088 | glbarray.Add(filename.filename + ";" + getlangcode(filename.lang) + ";" + (filename.translate ? "1" : "0")); 1089 | 1090 | cancel = false; 1091 | goButton.Text = "Cancel"; 1092 | completed = 0; 1093 | label5.Text = "0"; 1094 | glbsamefolder = checkBox3.Checked; 1095 | maxmains = 0; 1096 | Action act = null; 1097 | while (whisperq.Count > 0) 1098 | { 1099 | while (whisperq.TryDequeue(out act)) 1100 | ; 1101 | Thread.Sleep(10); 1102 | } 1103 | quitq = false; 1104 | 1105 | Thread thr = new Thread(() => 1106 | { 1107 | PreventSleep(); 1108 | getdurations(); 1109 | tottime = gettottime(); 1110 | execwhisper(); 1111 | if (!IsDisposed) 1112 | Invoke((Action)whendone); 1113 | Program.iswatch = false; 1114 | }); 1115 | thr.IsBackground = true; 1116 | thr.Start(); 1117 | 1118 | Thread cq = new Thread(consumeq); 1119 | cq.IsBackground = true; 1120 | cq.Start(); 1121 | 1122 | progressBar.CustomText = "--:--:--"; 1123 | progressBar.Value = 0; 1124 | starttime = DateTime.Now; 1125 | sw.Restart(); 1126 | timer1.Enabled = true; 1127 | } 1128 | else 1129 | cancel = true; 1130 | } 1131 | catch { } 1132 | } 1133 | 1134 | void setcount() 1135 | { 1136 | label3.Text = fastObjectListView1.SelectedObjects.Count.ToString("#,##0") + " / " + 1137 | fastObjectListView1.Items.Count.ToString("#,##0"); 1138 | } 1139 | 1140 | void fastObjectListView1_SelectionChanged(object sender, EventArgs e) 1141 | { 1142 | setcount(); 1143 | } 1144 | 1145 | ConcurrentBag tmpbag = new ConcurrentBag(); 1146 | void ReadFileList(string rootFolderPath, ParallelLoopState state1 = null) 1147 | { 1148 | try 1149 | { 1150 | if ((File.GetAttributes(rootFolderPath) & FileAttributes.ReparsePoint) != FileAttributes.ReparsePoint) 1151 | { 1152 | var files = Directory.GetFiles(rootFolderPath); 1153 | Parallel.ForEach(files, (string afile, ParallelLoopState state) => 1154 | { 1155 | Thread.CurrentThread.Priority = ThreadPriority.Highest; 1156 | if (issoundtype(afile) && !filelookup.ContainsKey(afile)) 1157 | { 1158 | tmpbag.Add(afile); 1159 | filelookup.TryAdd(afile, true); 1160 | } 1161 | }); 1162 | 1163 | var directories = Directory.GetDirectories(rootFolderPath); 1164 | Parallel.ForEach(directories, ReadFileList); 1165 | } 1166 | } 1167 | catch (Exception ex) 1168 | { 1169 | Debug.WriteLine(ex.ToString()); 1170 | } 1171 | } 1172 | 1173 | void fastObjectListView1_DragEnter(object sender, DragEventArgs e) 1174 | { 1175 | if (e.Data.GetDataPresent(DataFormats.FileDrop)) 1176 | e.Effect = DragDropEffects.Copy; 1177 | else 1178 | e.Effect = DragDropEffects.None; 1179 | } 1180 | 1181 | void loadbag() 1182 | { 1183 | List items = new List(); 1184 | string file; 1185 | while (tmpbag.TryTake(out file)) 1186 | items.Add(new filenameline(file, checkBox2.Checked)); 1187 | fastObjectListView1.AddObjects(items); 1188 | } 1189 | 1190 | ConcurrentDictionary filelookup = new ConcurrentDictionary(); 1191 | void filllookup() 1192 | { 1193 | filelookup.Clear(); 1194 | foreach (filenameline obj in fastObjectListView1.Objects) 1195 | filelookup.TryAdd(obj.filename, true); 1196 | } 1197 | 1198 | void fastObjectListView1_DragDrop(object sender, DragEventArgs e) 1199 | { 1200 | Cursor = Cursors.WaitCursor; 1201 | fastObjectListView1.BeginUpdate(); 1202 | filllookup(); 1203 | foreach (string file in (string[])e.Data.GetData(DataFormats.FileDrop)) 1204 | { 1205 | if ((File.GetAttributes(file) & FileAttributes.Directory) == FileAttributes.Directory) 1206 | ReadFileList(file); 1207 | else if (!filelookup.ContainsKey(file)) 1208 | { 1209 | fastObjectListView1.AddObject(new filenameline(file, checkBox2.Checked)); 1210 | filelookup.TryAdd(file, true); 1211 | } 1212 | } 1213 | loadbag(); 1214 | filelookup.Clear(); 1215 | fastObjectListView1.EndUpdate(); 1216 | fastObjectListView1.SelectAll(); 1217 | Cursor = Cursors.Default; 1218 | } 1219 | 1220 | void checkBox3_CheckedChanged(object sender, EventArgs e) 1221 | { 1222 | textBox1.Enabled = !checkBox3.Checked; 1223 | } 1224 | 1225 | void button4_Click(object sender, EventArgs e) 1226 | { 1227 | if (openFileDialog2.ShowDialog() == DialogResult.OK) 1228 | modelPathTextBox.Text = openFileDialog2.FileName; 1229 | } 1230 | 1231 | void button5_Click(object sender, EventArgs e) 1232 | { 1233 | if (folderBrowserDialog1.ShowDialog() == DialogResult.OK) 1234 | textBox1.Text = folderBrowserDialog1.SelectedPath; 1235 | } 1236 | 1237 | void timer1_Tick(object sender, EventArgs e) 1238 | { 1239 | setelapsed(); 1240 | if (progressBar.CustomText[0] == '-') 1241 | return; 1242 | string[] rems = progressBar.CustomText.Split(':'); 1243 | TimeSpan t = new TimeSpan(Convert.ToInt32(rems[0]), Convert.ToInt32(rems[1]), Convert.ToInt32(rems[2])); 1244 | t -= new TimeSpan(0, 0, 1); 1245 | if (t >= TimeSpan.Zero) 1246 | settimeremaining(t); 1247 | } 1248 | 1249 | void savefilelist() 1250 | { 1251 | StringBuilder sb = new StringBuilder(); 1252 | StringBuilder langssb = new StringBuilder(); 1253 | StringBuilder translatesb = new StringBuilder(); 1254 | foreach (filenameline obj in fastObjectListView1.Objects) 1255 | { 1256 | sb.Append(obj.filename + ";"); 1257 | langssb.Append(obj.lang + ";"); 1258 | translatesb.Append((obj.translate ? "1" : "0") + ";"); 1259 | } 1260 | writereg("files", sb.ToString().TrimEnd(';')); 1261 | writereg("langs", langssb.ToString().TrimEnd(';')); 1262 | writereg("translates", translatesb.ToString().TrimEnd(';')); 1263 | } 1264 | 1265 | void savesettings() 1266 | { 1267 | writereg("modelpath", modelPathTextBox.Text); 1268 | writereg("outputdir", textBox1.Text); 1269 | writereg("language", comboBox1.Text); 1270 | writereg("srt", srtCheckBox.Checked.ToString()); 1271 | writereg("txt", txtCheckBox.Checked.ToString()); 1272 | writereg("vtt", vttCheckBox.Checked.ToString()); 1273 | writereg("maxatonce", numericUpDown1.Value.ToString()); 1274 | writereg("whendone", comboBox2.Text); 1275 | writereg("sameasinputfolder", checkBox3.Checked.ToString()); 1276 | writereg("skipifexists", skipIfExistCheckBox.Checked.ToString()); 1277 | writereg("translate", checkBox2.Checked.ToString()); 1278 | writereg("watchfolders", textBox3.Text); 1279 | writereg("prompt", textBox4.Text); 1280 | savefilelist(); 1281 | } 1282 | 1283 | void Form1_FormClosing(object sender, FormClosingEventArgs e) 1284 | { 1285 | if (goButton.Text == "Cancel") 1286 | killemall(); 1287 | savesettings(); 1288 | } 1289 | 1290 | void button6_Click(object sender, EventArgs e) 1291 | { 1292 | if (folderBrowserDialog1.ShowDialog() == DialogResult.OK) 1293 | { 1294 | string inputf = folderBrowserDialog1.SelectedPath; 1295 | string[] folders = textBox3.Text.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries); 1296 | string s = ""; 1297 | foreach (string f in folders) 1298 | { 1299 | if (string.Equals(inputf, f, StringComparison.InvariantCultureIgnoreCase)) 1300 | return; 1301 | s += f + ";"; 1302 | } 1303 | textBox3.Text = s + inputf; 1304 | } 1305 | } 1306 | 1307 | void watchwait() 1308 | { 1309 | while (true) 1310 | { 1311 | using (var stream = new NamedPipeServerStream("whispererwatchpipe", PipeDirection.InOut)) 1312 | stream.WaitForConnection(); 1313 | 1314 | if (goButton.Text == "Go") 1315 | { 1316 | Program.iswatch = true; 1317 | Invoke(new Action(() => 1318 | { 1319 | button3_Click(null, null); 1320 | })); 1321 | } 1322 | } 1323 | } 1324 | 1325 | void wait4launch() 1326 | { 1327 | while (true) 1328 | { 1329 | try 1330 | { 1331 | using (var stream = new NamedPipeServerStream("whispererlaunchpipe", PipeDirection.InOut)) 1332 | stream.WaitForConnection(); 1333 | Invoke(new Action(() => 1334 | { 1335 | SetForegroundWindow(Handle); 1336 | })); 1337 | } 1338 | catch (Exception ex) 1339 | { 1340 | ShowError(ex.ToString()); 1341 | } 1342 | } 1343 | } 1344 | 1345 | string getapp() 1346 | { 1347 | string app = Environment.GetCommandLineArgs()[0]; 1348 | if (app[0] != '"') 1349 | app = '"' + app + '"'; 1350 | return app; 1351 | } 1352 | 1353 | string getqlaunch() 1354 | { 1355 | return '"' + Path.Combine(rootdir, "qlaunch.exe") + '"'; 1356 | } 1357 | 1358 | void losets() 1359 | { 1360 | try 1361 | { 1362 | if (tasksched != null) 1363 | { 1364 | tasksched.Triggers.Clear(); 1365 | tasksched.Dispose(); 1366 | tasksched = null; 1367 | } 1368 | } 1369 | catch { } 1370 | } 1371 | 1372 | TaskScheduler.Task CreateTask(string name) 1373 | { 1374 | try 1375 | { 1376 | tasksched = schedtask.CreateTask(name); 1377 | } 1378 | catch (ArgumentException) 1379 | { 1380 | Console.WriteLine("Task already exists"); 1381 | return null; 1382 | } 1383 | try 1384 | { 1385 | tasksched.ApplicationName = getqlaunch(); 1386 | tasksched.Parameters = getapp() + " /watch"; 1387 | tasksched.Comment = "Whisperer folder watcher"; 1388 | tasksched.Creator = Environment.UserName; 1389 | tasksched.WorkingDirectory = rootdir; 1390 | tasksched.Flags = TaskFlags.RunOnlyIfLoggedOn; 1391 | tasksched.SetAccountInformation(Environment.UserName, (string)null); 1392 | tasksched.MaxRunTimeLimited = false; 1393 | tasksched.Priority = System.Diagnostics.ProcessPriorityClass.Normal; 1394 | tasksched.Triggers.Add(new DailyTrigger(3, 0, 1)); 1395 | } 1396 | catch (Exception ex) 1397 | { 1398 | ShowError(ex.ToString()); 1399 | } 1400 | return tasksched; 1401 | } 1402 | 1403 | bool setuptask() 1404 | { 1405 | bool had1 = false; 1406 | if (schedtask == null) 1407 | schedtask = new ScheduledTasks(); 1408 | losets(); 1409 | tasksched = schedtask.OpenTask("Whisperer"); 1410 | if (tasksched == null) 1411 | CreateTask("Whisperer"); 1412 | else 1413 | { 1414 | tasksched.ApplicationName = getqlaunch(); 1415 | tasksched.WorkingDirectory = rootdir; 1416 | had1 = true; 1417 | } 1418 | return had1; 1419 | } 1420 | 1421 | void saveworkaround() 1422 | { 1423 | try 1424 | { 1425 | tasksched.Save(); 1426 | setuptask(); 1427 | schedtask.DeleteTask("Whisperer"); 1428 | 1429 | Trigger[] tgs = new Trigger[tasksched.Triggers.Count]; 1430 | tasksched.Triggers.CopyTo(tgs, 0); 1431 | setuptask(); 1432 | tasksched.Triggers.Clear(); 1433 | 1434 | foreach (DailyTrigger t in tgs) 1435 | tasksched.Triggers.Add(t); 1436 | } 1437 | catch (Exception ex) 1438 | { 1439 | ShowError(ex.ToString()); 1440 | } 1441 | } 1442 | 1443 | DialogResult ShowMsgProc(string msg, bool iserr, string caption = "Whisperer", MessageBoxButtons mbb = MessageBoxButtons.OK, bool nonblocking = false) 1444 | { 1445 | MessageBoxIcon mbi; 1446 | DialogResult dr = DialogResult.OK; 1447 | if (mbb == MessageBoxButtons.OK) 1448 | mbi = iserr ? MessageBoxIcon.Error : MessageBoxIcon.Information; 1449 | else 1450 | mbi = MessageBoxIcon.Question; 1451 | 1452 | if (nonblocking) 1453 | { 1454 | Thread thread = new Thread(() => 1455 | { 1456 | MessageBox.Show(msg, caption, mbb, mbi, MessageBoxDefaultButton.Button1, 0); 1457 | }); 1458 | thread.IsBackground = true; 1459 | thread.Start(); 1460 | } 1461 | else 1462 | { 1463 | Invoke(new Action(() => 1464 | { 1465 | dr = MessageBox.Show(this, msg, caption, mbb, mbi); 1466 | })); 1467 | } 1468 | return dr; 1469 | } 1470 | 1471 | void ShowMsg(string msg) 1472 | { 1473 | ShowMsgProc(msg, false); 1474 | } 1475 | 1476 | void ShowError(string msg, bool nonblocking = false) 1477 | { 1478 | ShowMsgProc(msg, true, nonblocking: nonblocking); 1479 | } 1480 | 1481 | DialogResult AskQuestion(string msg, string caption, MessageBoxButtons buttons) 1482 | { 1483 | return ShowMsgProc(msg, false, caption, buttons); 1484 | } 1485 | 1486 | void DoTask() 1487 | { 1488 | try 1489 | { 1490 | bool had1 = setuptask(); 1491 | if (tasksched == null) 1492 | return; 1493 | 1494 | if (tasksched.DisplayPropertySheet(TaskScheduler.Task.PropPages.Schedule)) 1495 | { 1496 | try 1497 | { 1498 | tasksched.Parameters = getapp() + " /watch"; 1499 | saveworkaround(); 1500 | tasksched.Save(); 1501 | } 1502 | catch (Exception ex) 1503 | { 1504 | ShowError(ex.ToString()); 1505 | } 1506 | } 1507 | else if (had1) 1508 | { 1509 | DialogResult result = AskQuestion("Delete the scheduled task?", "Delete Schedule", MessageBoxButtons.YesNo); 1510 | if (result == DialogResult.Yes) 1511 | schedtask.DeleteTask("Whisperer"); 1512 | } 1513 | } 1514 | catch (Exception ex) 1515 | { 1516 | ShowError(ex.ToString()); 1517 | } 1518 | 1519 | losets(); 1520 | } 1521 | 1522 | void button7_Click(object sender, EventArgs e) 1523 | { 1524 | DoTask(); 1525 | } 1526 | 1527 | private void fastObjectListView1_CellRightClick(object sender, CellRightClickEventArgs e) 1528 | { 1529 | if (e.ColumnIndex == 0) 1530 | { 1531 | filenameline f = e.Model as filenameline; 1532 | if (f != null) 1533 | { 1534 | contextMenuStrip1.Tag = f; 1535 | e.MenuStrip = this.contextMenuStrip1; 1536 | } 1537 | } 1538 | else 1539 | e.MenuStrip = this.contextMenuStrip2; 1540 | } 1541 | 1542 | private void resetAllToDefaultToolStripMenuItem_Click(object sender, EventArgs e) 1543 | { 1544 | fastObjectListView1.BeginUpdate(); 1545 | foreach (filenameline obj in fastObjectListView1.Objects) 1546 | { 1547 | obj.lang = "Default"; 1548 | obj.translate = checkBox2.Checked; 1549 | } 1550 | fastObjectListView1.EndUpdate(); 1551 | } 1552 | 1553 | private void toolStripMenuItem1_Click(object sender, EventArgs e) 1554 | { 1555 | openinplayer(contextMenuStrip1.Tag); 1556 | } 1557 | 1558 | private void openinexplorer(object o) 1559 | { 1560 | filenameline f = (filenameline)o; 1561 | string path = f.filename; 1562 | if (!File.Exists(path)) 1563 | { 1564 | string folder = Path.GetDirectoryName(path); 1565 | if (Directory.Exists(folder)) 1566 | path = Path.Combine(folder, "."); 1567 | else 1568 | return; 1569 | } 1570 | string argument = "/select, \"" + path + "\""; 1571 | Process.Start("explorer.exe", argument); 1572 | } 1573 | 1574 | private void toolStripMenuItem2_Click(object sender, EventArgs e) 1575 | { 1576 | openinexplorer(contextMenuStrip1.Tag); 1577 | } 1578 | 1579 | private void toolStripMenuItem3_Click(object sender, EventArgs e) 1580 | { 1581 | fastObjectListView1.RemoveObject(contextMenuStrip1.Tag); 1582 | } 1583 | 1584 | private void toolStripMenuItem4_Click(object sender, EventArgs e) 1585 | { 1586 | fastObjectListView1.RemoveObjects(fastObjectListView1.SelectedObjects); 1587 | } 1588 | 1589 | private void fastObjectListView1_CellEditStarting(object sender, CellEditEventArgs e) 1590 | { 1591 | if (e.Column.AspectName == "lang") 1592 | { 1593 | ComboBox comboBox = new ComboBox(); 1594 | comboBox.Bounds = e.CellBounds; 1595 | comboBox.Font = ((ObjectListView)sender).Font; 1596 | comboBox.DropDownStyle = ComboBoxStyle.DropDownList; 1597 | comboBox.Items.Add("Default"); 1598 | foreach (object item in comboBox1.Items) 1599 | comboBox.Items.Add(item); 1600 | filenameline fileItem = (filenameline)e.RowObject; 1601 | comboBox.SelectedItem = fileItem.lang == comboBox1.SelectedItem.ToString() ? "Default" : fileItem.lang; 1602 | e.Control = comboBox; 1603 | } 1604 | } 1605 | 1606 | private void fastObjectListView1_CellEditFinishing(object sender, CellEditEventArgs e) 1607 | { 1608 | if (e.Column.AspectName == "lang") 1609 | { 1610 | ComboBox comboBox = e.Control as ComboBox; 1611 | if (comboBox != null) 1612 | e.NewValue = comboBox.SelectedItem.ToString() == comboBox1.SelectedItem.ToString() ? "Default" : comboBox.SelectedItem.ToString(); 1613 | } 1614 | } 1615 | 1616 | private void checkBox2_CheckedChanged(object sender, EventArgs e) 1617 | { 1618 | fastObjectListView1.BeginUpdate(); 1619 | foreach (filenameline obj in fastObjectListView1.Objects) 1620 | obj.translate = checkBox2.Checked; 1621 | fastObjectListView1.EndUpdate(); 1622 | } 1623 | 1624 | const string ffmpegnotfound = "ffmpeg.exe not found, make sure it is on your path or same folder as Whisperer"; 1625 | const int SW_HIDE = 0; 1626 | const int SW_SHOWNORMAL = 1; 1627 | 1628 | [DllImport("user32.dll", CharSet = CharSet.Auto)] 1629 | static extern IntPtr SendMessage(IntPtr hWnd, UInt32 Msg, IntPtr wParam, IntPtr lParam); 1630 | 1631 | [DllImport("user32.dll", EntryPoint = "WindowFromPoint", CharSet = CharSet.Auto, ExactSpelling = true)] 1632 | public static extern IntPtr WindowFromPoint(Point pt); 1633 | 1634 | [DllImport("user32.dll")] 1635 | public static extern bool ExitWindowsEx(uint uFlags, uint dwReason); 1636 | 1637 | [DllImport("user32.dll")] 1638 | public static extern void LockWorkStation(); 1639 | 1640 | [DllImport("user32.dll")] 1641 | [return: MarshalAs(UnmanagedType.Bool)] 1642 | static extern bool SetForegroundWindow(IntPtr hWnd); 1643 | 1644 | [DllImport("shell32.dll", CharSet = CharSet.Auto)] 1645 | private static extern IntPtr ShellExecute(int hwnd, string lpOperation, string lpFile, 1646 | string lpParameters, string lpDirectory, int nShowCmd); 1647 | 1648 | [Flags] 1649 | public enum EXECUTION_STATE : uint 1650 | { 1651 | ES_CONTINUOUS = 0x80000000, 1652 | ES_SYSTEM_REQUIRED = 0x00000001 1653 | } 1654 | 1655 | [DllImport("kernel32.dll")] 1656 | private static extern EXECUTION_STATE SetThreadExecutionState(EXECUTION_STATE esFlags); 1657 | 1658 | public static void PreventSleep() 1659 | { 1660 | SetThreadExecutionState(EXECUTION_STATE.ES_CONTINUOUS | EXECUTION_STATE.ES_SYSTEM_REQUIRED); 1661 | } 1662 | 1663 | public static void AllowSleep() 1664 | { 1665 | SetThreadExecutionState(EXECUTION_STATE.ES_CONTINUOUS); 1666 | } 1667 | } 1668 | 1669 | public class filenameline 1670 | { 1671 | public string filename; 1672 | public string lang; 1673 | public bool translate; 1674 | 1675 | public filenameline(string filename) 1676 | { 1677 | this.filename = filename; 1678 | this.lang = "Default"; 1679 | this.translate = false; 1680 | } 1681 | 1682 | public filenameline(string filename, bool translate) 1683 | { 1684 | this.filename = filename; 1685 | this.lang = "Default"; 1686 | this.translate = translate; 1687 | } 1688 | 1689 | public filenameline(string filename, string lang, bool translate) 1690 | { 1691 | this.filename = filename; 1692 | this.lang = lang; 1693 | this.translate = translate; 1694 | } 1695 | } 1696 | 1697 | public class durationrec 1698 | { 1699 | public TimeSpan duration; 1700 | public DateTime starttime; 1701 | public TimeSpan exectime; 1702 | 1703 | public durationrec(TimeSpan duration) 1704 | { 1705 | this.duration = duration; 1706 | } 1707 | } 1708 | 1709 | public enum ProgressBarDisplayText 1710 | { 1711 | Percentage, 1712 | CustomText 1713 | } 1714 | 1715 | public class CustomProgressBar : ProgressBar 1716 | { 1717 | private string _customText; 1718 | public string CustomText 1719 | { 1720 | get => _customText; 1721 | set 1722 | { 1723 | if (value != _customText) 1724 | { 1725 | _customText = value; 1726 | Invalidate(); 1727 | } 1728 | } 1729 | } 1730 | public ProgressBarDisplayText DisplayStyle { get; set; } 1731 | 1732 | public CustomProgressBar() 1733 | { 1734 | SetStyle(ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint, true); 1735 | } 1736 | 1737 | protected override void OnHandleCreated(EventArgs e) 1738 | { 1739 | SetWindowTheme(this.Handle, "", ""); 1740 | base.OnHandleCreated(e); 1741 | } 1742 | 1743 | protected override void OnPaint(PaintEventArgs e) 1744 | { 1745 | Rectangle rect = ClientRectangle; 1746 | Graphics g = e.Graphics; 1747 | ProgressBarRenderer.DrawHorizontalBar(g, rect); 1748 | rect.Inflate(-3, -3); 1749 | if (Value > 0) 1750 | { 1751 | Rectangle clip = new System.Drawing.Rectangle(rect.X, rect.Y, (int)Math.Round(((float)Value / Maximum) * rect.Width), rect.Height); 1752 | ProgressBarRenderer.DrawHorizontalChunks(g, clip); 1753 | } 1754 | 1755 | string text = DisplayStyle == ProgressBarDisplayText.Percentage ? Value.ToString() + '%' : CustomText; 1756 | 1757 | using (System.Drawing.Font f = new System.Drawing.Font("Calibri", 7.8f)) 1758 | { 1759 | SizeF len = g.MeasureString(text, f); 1760 | Point location = new Point(Convert.ToInt32((Width / 2) - len.Width / 2), Convert.ToInt32((Height / 2) - len.Height / 2)); 1761 | g.DrawString(text, f, Brushes.Black, location); 1762 | } 1763 | } 1764 | 1765 | [DllImportAttribute("uxtheme.dll")] 1766 | private static extern int SetWindowTheme(IntPtr hWnd, string appname, string idlist); 1767 | } 1768 | 1769 | public static class Extensions 1770 | { 1771 | public static bool MyContains(this ArrayList arrayList, string filename) 1772 | { 1773 | filename += ';'; 1774 | foreach (string s in arrayList) 1775 | if (s.StartsWith(filename)) 1776 | return true; 1777 | return false; 1778 | } 1779 | 1780 | public static string FindRow(this ArrayList arrayList, string filename) 1781 | { 1782 | filename += ';'; 1783 | foreach (string s in arrayList) 1784 | if (s.StartsWith(filename)) 1785 | return s; 1786 | return ""; 1787 | } 1788 | 1789 | public static string GetCommandLine(this Process process) 1790 | { 1791 | try 1792 | { 1793 | using (ManagementObjectSearcher searcher = new ManagementObjectSearcher("SELECT CommandLine FROM Win32_Process WHERE ProcessId = " + process.Id)) 1794 | { 1795 | using (ManagementObjectCollection objects = searcher.Get()) 1796 | { 1797 | return objects.Cast().SingleOrDefault()?["CommandLine"]?.ToString(); 1798 | } 1799 | } 1800 | } 1801 | catch 1802 | { 1803 | return ""; 1804 | } 1805 | } 1806 | } 1807 | } 1808 | -------------------------------------------------------------------------------- /whisperer/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO.Pipes; 3 | using System.Threading; 4 | using System.Windows.Forms; 5 | 6 | namespace whisperer 7 | { 8 | static class Program 9 | { 10 | public static bool iswatch = false; 11 | static Mutex gmutex = null; 12 | 13 | /// 14 | /// The main entry point for the application. 15 | /// 16 | [STAThread] 17 | static void Main(string[] args) 18 | { 19 | bool createdNew; 20 | gmutex = new Mutex(true, "whisperermutex", out createdNew); 21 | iswatch = args.Length > 0 && args[0].ToLower().Trim() == "/watch"; 22 | 23 | if (createdNew) 24 | { 25 | Application.EnableVisualStyles(); 26 | Application.SetCompatibleTextRenderingDefault(false); 27 | Application.Run(new Form1()); 28 | } 29 | else if (iswatch) 30 | { 31 | using (var pipe = new NamedPipeClientStream(".", "whispererwatchpipe", PipeDirection.InOut)) 32 | pipe.Connect(1000); 33 | } 34 | else 35 | BringTofront(); 36 | } 37 | 38 | static void BringTofront() 39 | { 40 | using (var stream = new NamedPipeClientStream(".", "whispererlaunchpipe", PipeDirection.InOut)) 41 | stream.Connect(1000); 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /whisperer/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("Whisperer")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("Whisperer")] 12 | [assembly: AssemblyCopyright("Copyright © 2025")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Setting ComVisible to false makes the types in this assembly not visible 17 | // to COM components. If you need to access a type in this assembly from 18 | // COM, set the ComVisible attribute to true on that type. 19 | [assembly: ComVisible(false)] 20 | 21 | // The following GUID is for the ID of the typelib if this project is exposed to COM 22 | [assembly: Guid("1fcb32ca-014b-4c4d-9b61-d8592f3c98b8")] 23 | 24 | // Version information for an assembly consists of the following four values: 25 | // 26 | // Major Version 27 | // Minor Version 28 | // Build Number 29 | // Revision 30 | // 31 | // You can specify all the values or you can default the Build and Revision Numbers 32 | // by using the '*' as shown below: 33 | // [assembly: AssemblyVersion("1.0.*")] 34 | [assembly: AssemblyVersion("3.7.0.0")] 35 | [assembly: AssemblyFileVersion("3.7.0.0")] 36 | -------------------------------------------------------------------------------- /whisperer/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace whisperer.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// Returns the cached ResourceManager instance used by this class. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("whisperer.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Overrides the current thread's CurrentUICulture property for all 51 | /// resource lookups using this strongly typed resource class. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | 63 | /// 64 | /// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream. 65 | /// 66 | internal static System.IO.UnmanagedMemoryStream tada { 67 | get { 68 | return ResourceManager.GetStream("tada", resourceCulture); 69 | } 70 | } 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /whisperer/Properties/Resources.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | 122 | ..\Resources\tada.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 123 | 124 | -------------------------------------------------------------------------------- /whisperer/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace whisperer.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /whisperer/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /whisperer/Resources/tada.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tigros/Whisperer/e6951916081cebbf22e1ed6d1d52ba69e20bfc29/whisperer/Resources/tada.wav -------------------------------------------------------------------------------- /whisperer/TaskScheduler.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tigros/Whisperer/e6951916081cebbf22e1ed6d1d52ba69e20bfc29/whisperer/TaskScheduler.dll -------------------------------------------------------------------------------- /whisperer/Whisper.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tigros/Whisperer/e6951916081cebbf22e1ed6d1d52ba69e20bfc29/whisperer/Whisper.dll -------------------------------------------------------------------------------- /whisperer/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tigros/Whisperer/e6951916081cebbf22e1ed6d1d52ba69e20bfc29/whisperer/favicon.ico -------------------------------------------------------------------------------- /whisperer/languageCodez.tsv: -------------------------------------------------------------------------------- 1 | en 0 english 2 | zh 1 chinese 3 | de 2 german 4 | es 3 spanish 5 | ru 4 russian 6 | ko 5 korean 7 | fr 6 french 8 | ja 7 japanese 9 | pt 8 portuguese 10 | tr 9 turkish 11 | pl 10 polish 12 | ca 11 catalan 13 | nl 12 dutch 14 | ar 13 arabic 15 | sv 14 swedish 16 | it 15 italian 17 | id 16 indonesian 18 | hi 17 hindi 19 | fi 18 finnish 20 | vi 19 vietnamese 21 | iw 20 hebrew 22 | uk 21 ukrainian 23 | el 22 greek 24 | ms 23 malay 25 | cs 24 czech 26 | ro 25 romanian 27 | da 26 danish 28 | hu 27 hungarian 29 | ta 28 tamil 30 | no 29 norwegian 31 | th 30 thai 32 | ur 31 urdu 33 | hr 32 croatian 34 | bg 33 bulgarian 35 | lt 34 lithuanian 36 | la 35 latin 37 | mi 36 maori 38 | ml 37 malayalam 39 | cy 38 welsh 40 | sk 39 slovak 41 | te 40 telugu 42 | fa 41 persian 43 | lv 42 latvian 44 | bn 43 bengali 45 | sr 44 serbian 46 | az 45 azerbaijani 47 | sl 46 slovenian 48 | kn 47 kannada 49 | et 48 estonian 50 | mk 49 macedonian 51 | br 50 breton 52 | eu 51 basque 53 | is 52 icelandic 54 | hy 53 armenian 55 | ne 54 nepali 56 | mn 55 mongolian 57 | bs 56 bosnian 58 | kk 57 kazakh 59 | sq 58 albanian 60 | sw 59 swahili 61 | gl 60 galician 62 | mr 61 marathi 63 | pa 62 punjabi 64 | si 63 sinhala 65 | km 64 khmer 66 | sn 65 shona 67 | yo 66 yoruba 68 | so 67 somali 69 | af 68 afrikaans 70 | oc 69 occitan 71 | ka 70 georgian 72 | be 71 belarusian 73 | tg 72 tajik 74 | sd 73 sindhi 75 | gu 74 gujarati 76 | am 75 amharic 77 | yi 76 yiddish 78 | lo 77 lao 79 | uz 78 uzbek 80 | fo 79 faroese 81 | ht 80 haitian creole 82 | ps 81 pashto 83 | tk 82 turkmen 84 | nn 83 nynorsk 85 | mt 84 maltese 86 | sa 85 sanskrit 87 | lb 86 luxembourgish 88 | my 87 myanmar 89 | bo 88 tibetan 90 | tl 89 tagalog 91 | mg 90 malagasy 92 | as 91 assamese 93 | tt 92 tatar 94 | haw 93 hawaiian 95 | ln 94 lingala 96 | ha 95 hausa 97 | ba 96 bashkir 98 | jw 97 javanese 99 | su 98 sundanese -------------------------------------------------------------------------------- /whisperer/main.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tigros/Whisperer/e6951916081cebbf22e1ed6d1d52ba69e20bfc29/whisperer/main.exe -------------------------------------------------------------------------------- /whisperer/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /whisperer/sound.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tigros/Whisperer/e6951916081cebbf22e1ed6d1d52ba69e20bfc29/whisperer/sound.wav -------------------------------------------------------------------------------- /whisperer/whisperer.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {1FCB32CA-014B-4C4D-9B61-D8592F3C98B8} 8 | WinExe 9 | whisperer 10 | whisperer 11 | v4.5.1 12 | 512 13 | true 14 | 15 | 16 | 17 | 18 | AnyCPU 19 | true 20 | full 21 | false 22 | bin\Debug\ 23 | DEBUG;TRACE 24 | prompt 25 | 4 26 | false 27 | 7.3 28 | 29 | 30 | AnyCPU 31 | pdbonly 32 | true 33 | bin\Release\ 34 | TRACE 35 | prompt 36 | 4 37 | false 38 | 7.3 39 | 40 | 41 | favicon.ico 42 | 43 | 44 | 45 | ..\packages\ObjectListView.Official.2.9.1\lib\net20\ObjectListView.dll 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | False 55 | .\TaskScheduler.dll 56 | 57 | 58 | 59 | 60 | Form 61 | 62 | 63 | Form1.cs 64 | 65 | 66 | 67 | 68 | Form1.cs 69 | 70 | 71 | ResXFileCodeGenerator 72 | Resources.Designer.cs 73 | Designer 74 | 75 | 76 | True 77 | Resources.resx 78 | True 79 | 80 | 81 | PreserveNewest 82 | 83 | 84 | 85 | SettingsSingleFileGenerator 86 | Settings.Designer.cs 87 | Designer 88 | 89 | 90 | True 91 | Settings.settings 92 | True 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | PreserveNewest 102 | 103 | 104 | PreserveNewest 105 | 106 | 107 | 108 | 109 | 110 | PreserveNewest 111 | 112 | 113 | 114 | 115 | 116 | This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. 117 | 118 | 119 | --------------------------------------------------------------------------------