diff options
| author | yum <yum.food.vr@gmail.com> | 2023-02-21 13:19:43 -0800 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2023-02-22 21:49:29 -0800 |
| commit | 9a97fbc3c583ccd518d838faaaa36ed9aa5558e1 (patch) | |
| tree | 92646de70fdd4971092de3d5cf76dce79978cd8e /GUI/Libraries | |
| parent | cece1ee8f1b985c2a89adb661dd02c6d44787f67 (diff) | |
Begin work on C++ implementation
Use Const-me/Whisper to perform transcription. This implementation is
vastly more efficient: CPU usage, memory usage, and VRAM usage are all
dramatically reduced. It's slightly less accurate when comparing the
same model (due to the lack of beam search decoding), but since you can
use larger models, the impact is largely a wash.
Diffstat (limited to 'GUI/Libraries')
| -rw-r--r-- | GUI/Libraries/.gitignore | 1 | ||||
| -rw-r--r-- | GUI/Libraries/fetch.ps1 | 57 |
2 files changed, 45 insertions, 13 deletions
diff --git a/GUI/Libraries/.gitignore b/GUI/Libraries/.gitignore index fb46029..0e14a69 100644 --- a/GUI/Libraries/.gitignore +++ b/GUI/Libraries/.gitignore @@ -1,4 +1,5 @@ # Don't check in anything we fetch wx rapidyaml +whisper diff --git a/GUI/Libraries/fetch.ps1 b/GUI/Libraries/fetch.ps1 index 78bf0d5..f13bad5 100644 --- a/GUI/Libraries/fetch.ps1 +++ b/GUI/Libraries/fetch.ps1 @@ -1,34 +1,65 @@ +param( + [switch]$overwrite = $false +) + Set-PSDebug -trace 0 $WX_3_2_1_URL = "https://github.com/wxWidgets/wxWidgets/releases/download/v3.2.1/wxWidgets-3.2.1.zip" $WX_URL = $WX_3_2_1_URL $WX_FILE = $(Split-Path -Path $WX_URL -Leaf) +$WHISPER_1_7_0_URL = "https://github.com/Const-me/Whisper/releases/download/1.7.0/Library.zip" +$WHISPER_URL = $WHISPER_1_7_0_URL +$WHISPER_FILE = $(Split-Path -Path $WHISPER_URL -Leaf) + pushd $PSScriptRoot # WX -if (Test-Path wx) { +if ((Test-Path wx) -And ($overwrite)) { rm -Recurse wx } -mkdir wx -pushd wx > $null -Invoke-WebRequest $WX_URL -OutFile $WX_FILE -Expand-Archive $WX_FILE -DestinationPath . -popd > $null +if (-Not (Test-Path wx)) { + mkdir wx + pushd wx > $null + Invoke-WebRequest $WX_URL -OutFile $WX_FILE + Expand-Archive $WX_FILE -DestinationPath . + popd > $null +} # RAPIDYAML -if (Test-Path rapidyaml) { +if ((Test-Path rapidyaml) -And ($overwrite)) { rm -Recurse rapidyaml } -git clone https://github.com/biojppm/rapidyaml -pushd rapidyaml > $null -git checkout v0.5.0 -git submodule update --init --recursive +if (-Not (Test-Path rapidyaml)) { + git clone https://github.com/biojppm/rapidyaml + pushd rapidyaml > $null + git checkout v0.5.0 + git submodule update --init --recursive + + python3 tools/amalgamate.py ryml.h + cp ryml.h ../../GUI/GUI/ryml.h +} + +if ((Test-Path whisper) -And ($overwrite)) { + rm -Recurse whisper +} -python3 tools/amalgamate.py ryml.h -cp ryml.h ../../GUI/GUI/ryml.h +if (-Not (Test-Path whisper)) { + mkdir whisper + pushd whisper > $null + Invoke-WebRequest $WHISPER_URL -OutFile $WHISPER_FILE + Expand-Archive $WHISPER_FILE -DestinationPath . + if (Test-Path ../../GUI/GUI/whisper/) { + rm -Recurse ../../GUI/GUI/whisper/ + } + mkdir ../../GUI/GUI/whisper/ + cp Include/*.h ../../GUI/GUI/whisper/ + cp Linker/*.lib ../../GUI/GUI/whisper/Whisper.lib + cp Binary/*.dll ../../GUI/GUI/whisper/Whisper.dll + popd > $null +} popd > $null # rapidyaml |
