mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-26 13:12:39 +01:00
parent
914343ab6a
commit
81007c3084
@ -10,21 +10,25 @@ namespace Nikse.SubtitleEdit.Forms.AudioToText
|
||||
{
|
||||
public sealed partial class WhisperDownload : Form
|
||||
{
|
||||
private const string DownloadUrlAvx2 = "https://github.com/SubtitleEdit/support-files/raw/master/whisper/whisper.cpp-64-AVX2-2023-01-28.zip";
|
||||
private const string DownloadUrlSse2 = "https://github.com/SubtitleEdit/support-files/raw/master/whisper/whisper.cpp-64-SSE2-2023-01-28.zip";
|
||||
private const string DownloadUrl32BitAvx2 = "https://github.com/SubtitleEdit/support-files/raw/master/whisper/whisper.cpp-32-AVX2-2023-01-28.zip";
|
||||
private const string DownloadUrl32BitSse2 = "https://github.com/SubtitleEdit/support-files/raw/master/whisper/whisper.cpp-32-SSE2-2023-01-28.zip";
|
||||
private const string DownloadUrlAvx2 = "https://github.com/ggerganov/whisper.cpp/releases/download/v1.2.0/whisper-blas-bin-x64.zip";
|
||||
private const string DownloadUrlSse2 = "https://github.com/ggerganov/whisper.cpp/releases/download/v1.2.0/whisper-bin-x64.zip";
|
||||
private const string DownloadUrl32BitAvx2 = "https://github.com/ggerganov/whisper.cpp/releases/download/v1.2.0/whisper-blas-bin-Win32.zip";
|
||||
private const string DownloadUrl32BitSse2 = "https://github.com/ggerganov/whisper.cpp/releases/download/v1.2.0/whisper-bin-Win32.zip";
|
||||
private readonly CancellationTokenSource _cancellationTokenSource;
|
||||
private static readonly string[] Sha512Hashes =
|
||||
{
|
||||
"a6a75a5d63b933c3529a500b7dd8b330530894b09461bb0a715dbedb31bf2e3493238e86af6d7cc64f3af196a6d61d96bb23853f98d21c8172d5d53d7aad33d9", // 64-bit OpenBLAS
|
||||
// "", // SSE2 64-bit
|
||||
"92f64f207c400c7c0f1fc27006bf2a1e4170fdc63d045dfdf0a0848b3d727f2763eccfb55e10b6e745e9d39892d24cb9b4c471594011d041458c1ff8722e1ffc", // 32-bit OpenBLAS
|
||||
// "", // SSE2 32-bit
|
||||
};
|
||||
|
||||
private static readonly string[] OldSha512Hashes =
|
||||
{
|
||||
"f2073d5ce928e59f7717a82f0330e4d628c81e6cb421b934b4792ac16fb9a33fb9482812874f39d4c7ca02a47a9739d5dd46ddc2e0abc0eb1097dc60bb0616b2", // AVX2 64-bit
|
||||
"0d65839e3b05274b3edeef7bbb123c9a6ba04b89729011b758210a80f74563a1e58ca7da0a25e63e42229a2d3dd57a2cb6ce993474b13381871f343b75c3140f", // SSE2 64-bit
|
||||
"9f9ce1b39610109bc597b296cb4c1573fa61d33eeaef2a38af44bb2d696fa7c1da297520630ada2470d740edb18a17fe3cca922ad12a307476e27862906450e5", // AVX2 32-bit
|
||||
"aab8e7349a7051fb35f2294da3c4993731f47ce2d45ba4c6d4b2b106d0e3236a0082b68e67eb612fec1540e60ae9994183bd41f7fee31c23ec192cbd4155e3c2", // SSE2 32-bit
|
||||
};
|
||||
|
||||
private static readonly string[] OldSha512Hashes =
|
||||
{
|
||||
"b69bd16bd4d11191b7b1980157d09cb1e489c804219cd336cd0b58182d357b5fff491b29ab8796d1991a9c8f6c8537f475592400b7f4e1244fdfdda8c970a80c", // AVX2 64-bit
|
||||
"8e45e147397b688e0ff814f6ef87fd6703748a4f9170fa6498b9428db47bbf9140c7479d016b8e201340ac6627e3f9632c70aa36e7a883355b9abf30e6796ae9", // SSE2 64-bit
|
||||
"87799433a5a29b3beaa5a58dfc22471e2c1eb1c9821b6a337b40d8e3c1b4dae9118e10d3a278664fe0f36ba6543ac554108593045640f62711b95f4c2a113b74", // SSE2 32-bit
|
||||
@ -114,13 +118,17 @@ namespace Nikse.SubtitleEdit.Forms.AudioToText
|
||||
Directory.CreateDirectory(folder);
|
||||
}
|
||||
|
||||
var skipFileNames = new[] { "command.exe", "stream.exe", "talk.exe", "bench.exe" };
|
||||
using (var zip = ZipExtractor.Open(downloadStream))
|
||||
{
|
||||
var dir = zip.ReadCentralDir();
|
||||
foreach (var entry in dir)
|
||||
{
|
||||
var path = Path.Combine(folder, entry.FilenameInZip);
|
||||
zip.ExtractFile(entry, path);
|
||||
if (!skipFileNames.Contains(entry.FilenameInZip))
|
||||
{
|
||||
zip.ExtractFile(entry, path);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user