yum-slop/TaSTT
Free self-hosted STT for VRChat.
git clone https://git.yummers.dev/yum-slop/TaSTT
673d701
v0.21.0
1param ( 2[ switch ] $skip_zip = $false , 3[ string ] $release = "Release" , 4[ string ] $install_pip = $true 5) 6 7echo "Skip zip: $skip_zip " 8echo "Release: $release " 9echo "Install pip: $install_pip " 10 11$PSDefaultParameterValues [ 'Out-File:Encoding' ] = 'utf8' 12 13$install_dir = "TaSTT" 14 15if ( Test-Path $install_dir ) { 16rm -Recurse -Force $install_dir 17} 18 19$py_dir = "Python" 20 21if ( Test-Path $py_dir ) { 22rm -Recurse $py_dir 23} 24if ( -Not ( Test-Path $py_dir )) { 25echo "Fetching python" 26 27$PYTHON_3_10_9_URL = "https://www.python.org/ftp/python/3.10.9/python-3.10.9-embed-amd64.zip" 28$PYTHON_URL = $PYTHON_3_10_9_URL 29$PYTHON_FILE = $( Split-Path -Path $PYTHON_URL -Leaf ) 30 31if ( -Not ( Test-Path $PYTHON_FILE )) { 32Invoke-WebRequest $PYTHON_URL -OutFile $PYTHON_FILE 33} 34 35mkdir Python 36Expand-Archive $PYTHON_FILE -DestinationPath Python 37 38echo "../Scripts" >> Python/ python310. _pth 39echo "import site" >> Python/ python310. _pth 40} 41 42$pip_path = " $py_dir /get-pip.py" 43 44if ( Test-Path $pip_path ) { 45rm -Force $pip_path 46} 47 48if ( -Not ( Test-Path $pip_path )) { 49echo "Fetching pip" 50 51$PIP_URL = "https://bootstrap.pypa.io/get-pip.py" 52$PIP_FILE = $( Split-Path -Path $PIP_URL -Leaf ) 53 54if ( -Not ( Test-Path $PIP_FILE )) { 55Invoke-WebRequest $PIP_URL -OutFile $PIP_FILE 56} 57 58mv $PIP_FILE $pip_path 59} 60 61if ( $install_pip ) { 62. / Python / python. exe Python/ get-pip. py 63 64echo "Installing future" 65echo "Assuming host has python 3.10.9 installed" # TODO test for this 66python -m pip install future== 0.18 . 2 - -target Python / Lib/ site-packages 67} 68 69$git_dir = "PortableGit" 70 71if ( -Not ( Test-Path $git_dir )) { 72echo "Fetching PortableGit" 73 74# When it's time to update this, get the latest version from here: 75# https://git-scm.com/download/win 76$GIT_2_39_0_URL = "https://github.com/git-for-windows/git/releases/download/v2.39.0.windows.2/PortableGit-2.39.0.2-64-bit.7z.exe" 77$GIT_URL = $GIT_2_39_0_URL 78$GIT_FILE = $( Split-Path -Path $GIT_URL -Leaf ) 79 80if ( -Not ( Test-Path $GIT_FILE )) { 81Invoke-WebRequest $GIT_URL -OutFile $GIT_FILE 82} 83& "./ $GIT_FILE " 84 85Read-Host -Prompt "Press enter once PortableGit is installed at $pwd \PortableGit" 86} 87 88if ( -Not ( Test-Path UwwwuPP)) { 89git clone https:// github. com / yum-food/ UwwwuPP 90pushd UwwwuPP> $null 91git submodule update- -init - -recursive 92 93mkdir build 94pushd build> $null 95 96cmake . exe .. 97cmake . exe - -build . 98 99popd > $null 100popd > $null 101} 102 103if ( -Not ( Test-Path Profanity)) { 104mkdir Profanity 105pushd Profanity> $null 106 107$repo = "List-of-Dirty-Naughty-Obscene-and-Otherwise-Bad-Words" 108git clone https:// github. com / LDNOOBW/ $repo 109 110mkdir Profanity 111cp $repo / LICENSE Profanity/ 112cp $repo / en Profanity/ 113 114echo "Source: https://github.com/LDNOOBW/List-of-Dirty-Naughty-Obscene-and-Otherwise-Bad-Words" > Profanity/ AUTHOR 115 116popd > $null 117} 118 119if ( -Not ( Test-Path "silero-vad" )) { 120git clone"https://github.com/snakers4/silero-vad" 121} 122 123mkdir $install_dir > $null 124mkdir $install_dir / Resources> $null 125cp -Recurse .. / Animations TaSTT/ Resources/ Animations 126mkdir TaSTT/ Resources/ Fonts 127cp -Recurse .. / Fonts/ Bitmaps TaSTT/ Resources/ Fonts/ Bitmaps 128cp -Recurse .. / Fonts/ Emotes TaSTT/ Resources/ Fonts/ Emotes 129cp -Recurse Python TaSTT/ Resources/ Python 130cp -Recurse PortableGit TaSTT/ Resources/ PortableGit 131cp -Recurse .. / Scripts TaSTT/ Resources/ Scripts 132mkdir TaSTT/ Resources/ Images 133cp .. / Images/ logo* . png TaSTT/ Resources/ Images/ 134cp -Recurse .. / Shaders TaSTT/ Resources/ Shaders 135cp -Recurse .. / Sounds TaSTT/ Resources/ Sounds 136cp -Recurse .. / UnityAssets TaSTT/ Resources/ UnityAssets 137cp -Recurse .. / BrowserSource TaSTT/ Resources/ BrowserSource 138cp GUI/ x64/ $release / GUI. exe TaSTT/ TaSTT. exe 139mkdir TaSTT/ Resources/ Models 140cp "silero-vad/files/silero_vad.onnx" TaSTT/ Resources/ Models/ 141cp "silero-vad/LICENSE" TaSTT/ Resources/ Models/ silero_vad. onnx . LICENSE 142mkdir TaSTT/ Resources/ Uwu 143cp UwwwuPP/ build/ Src/ Debug/ Uwwwu. exe TaSTT/ Resources/ Uwu/ 144cp UwwwuPP/ LICENSE TaSTT/ Resources/ Uwu/ 145cp -r Profanity/ Profanity TaSTT/ Resources/ Profanity 146 147if ( -Not $skip_zip ) { 148Compress-Archive -Path " $install_dir " -DestinationPath " $install_dir .zip" -Force 149} 150