VoiceGenerator
This commit is contained in:
parent
53702c581f
commit
3d69749caf
4
VoiceGenerator/.gitignore
vendored
4
VoiceGenerator/.gitignore
vendored
@ -1,7 +1,9 @@
|
||||
*
|
||||
!.gitignore
|
||||
!.gitattributes
|
||||
!README.md
|
||||
!GenerateDialogue.py
|
||||
!install.ps1
|
||||
!Install.ps1
|
||||
!Uninstall.ps1
|
||||
!voices/
|
||||
!voices/**
|
@ -54,12 +54,12 @@ function Setup-Python-Environment {
|
||||
function Install-Espeakng {
|
||||
Write-Output "Installing eSpeak-ng $espeakngVersion..."
|
||||
Invoke-WebRequest -Uri $espeakngInstallerUrl -OutFile $espeakngInstallerPath
|
||||
Start-Process -FilePath "msiexec.exe" -ArgumentList "/i `"$espeakngInstallerPath`" /passive" -Wait
|
||||
Start-Process -FilePath "msiexec.exe" -ArgumentList "/i `"$espeakngInstallerPath`" /passive /norestart" -Wait
|
||||
Remove-Item $espeakngInstallerPath -Force
|
||||
}
|
||||
|
||||
function Install-MsBuildTools {
|
||||
Write-Output "Installing MS Build Tools $msBuildToolsVersion..."
|
||||
Write-Output "Installing Visual Studio Build Tools $msBuildToolsVersion..."
|
||||
Invoke-WebRequest -Uri $msBuildToolsInstallerUrl -OutFile $msBuildToolsInstallerPath
|
||||
Start-Process -FilePath $msBuildToolsInstallerPath -ArgumentList `
|
||||
"--passive --wait --norestart --add Microsoft.VisualStudio.Workload.VCTools --includeRecommended" -Wait
|
||||
@ -107,5 +107,5 @@ Install-CUDA
|
||||
Install-PyTorch
|
||||
Install-Coqui
|
||||
mkdir output
|
||||
Write-Output "Setup finished. Please restart your machine before first startup."
|
||||
Write-Output "Install finished. Please restart your machine before first startup."
|
||||
Write-Output "To generate dialogue type in PS terminal in VoiceGenerator directory:`n 1] .\Scripts\Activate.ps1`n 2] py GenerateDialogue.py."
|
||||
|
31
VoiceGenerator/README.md
Normal file
31
VoiceGenerator/README.md
Normal file
@ -0,0 +1,31 @@
|
||||
# Voice Generator
|
||||
Before using the installation is needed. \
|
||||
For generation type within directory in PowerShell:
|
||||
- `.\Scripts\Activate.ps1`
|
||||
- `py GenerateDialogue.py`
|
||||
For your own voices create a directory with custom name containing a voice line with the same name. \
|
||||
Edit voice name in `GenerateDialogue.py` script.
|
||||
|
||||
# System requirements
|
||||
OS: Windows 10 or 11
|
||||
GPU: NVIDIA
|
||||
Storage: ~15GB
|
||||
|
||||
# Install.ps1
|
||||
By executing the PowerShell script `Install.ps1` the following packages are installed:
|
||||
- [Python](https://www.python.org/downloads/) 3.11.9
|
||||
- [eSpeak-ng](https://github.com/espeak-ng/espeak-ng) 1.51
|
||||
- [Visual Studio Build Tools](https://visualstudio.microsoft.com/cs/downloads/?q=build+tools) 17 module "Desktop development with C++"
|
||||
- [CUDA Toolkit](https://developer.nvidia.com/cuda-downloads) 12.4.1
|
||||
- [PyTorch CUDA](https://pytorch.org/get-started/locally/) 12.4
|
||||
- [Coqui TTS](https://github.com/idiap/coqui-ai-TTS) 0.25.1
|
||||
- [Suno-ai/bark](https://github.com/suno-ai/bark)
|
||||
It's recommended to run installation script as administrator and restart machine after install completion.
|
||||
|
||||
# Uninstall.ps1
|
||||
The uninstall script will try to remove most of the files created during installation. \
|
||||
The following packages/data aren't removed:
|
||||
- Python
|
||||
- Visual Studio Installer
|
||||
- voices/
|
||||
It's recommended to run uninstallat script as administrator and restart machine after uninstall completion.
|
44
VoiceGenerator/Uninstall.ps1
Normal file
44
VoiceGenerator/Uninstall.ps1
Normal file
@ -0,0 +1,44 @@
|
||||
$msBuildToolsVersion = "17"
|
||||
$msBuildToolsInstallerUrl = "https://aka.ms/vs/${msBuildToolsVersion}/release/vs_BuildTools.exe"
|
||||
$msBuildToolsInstallerPath = "$env:TEMP\vs_BuildTools${msBuildToolsVersion}.exe"
|
||||
|
||||
function Uninstall-Espeakng {
|
||||
Write-Output "Uninstalling eSpeak NG..."
|
||||
$app = (Get-WmiObject -Class Win32_Product | Where-Object{$_.Name -like "*eSpeak NG*"})
|
||||
Start-Process -FilePath "msiexec.exe" -ArgumentList "/x ${app.IdentifyingNumber} /passive /norestart"
|
||||
}
|
||||
|
||||
function Uninstall-MsBuildTools {
|
||||
Write-Output "Uninstalling Visual Studio Build Tools..."
|
||||
Invoke-WebRequest -Uri $msBuildToolsInstallerUrl -OutFile $msBuildToolsInstallerPath
|
||||
Start-Process -FilePath $msBuildToolsInstallerPath -ArgumentList `
|
||||
"--remove Microsoft.VisualStudio.Workload.VCTools --passive --wait" -Wait
|
||||
Remove-Item $msBuildToolsInstallerPath -Force
|
||||
}
|
||||
|
||||
function Uninstall-CUDA {
|
||||
Write-Output "Uninstalling CUDA Toolkit..."
|
||||
$uninstall = (gci "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" `
|
||||
| foreach { gp $_.PSPath } | ? { $_ -like "*CUDA Toolkit*" } | select UninstallString)
|
||||
$uninstall = ($uninstall.UninstallString -Replace '^"[^"]+"\s+', '')
|
||||
Start-Process -FilePath "rundll32.exe" -ArgumentList "$uninstall -silent -deviceinitiated"
|
||||
}
|
||||
|
||||
function Remove-Local-Files {
|
||||
Write-Output "Removing local files..."
|
||||
$ExcludeFiles = @(".gitattributes", ".gitignore", "README.md", "GenerateDialogue.py", `
|
||||
"Install.ps1", "Uninstall.ps1", "voices")
|
||||
$FilesToDelete = Get-ChildItem -Path . -File | Where-Object { $_.Name -notin $ExcludeFiles }
|
||||
foreach ($File in $FilesToDelete) {
|
||||
Remove-Item -Path $File.FullName -Force
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Write-Output "Starting voice environment uninstall process."
|
||||
Uninstall-Espeakng
|
||||
Uninstall-MsBuildTools
|
||||
Uninstall-CUDA
|
||||
Remove-Local-Files
|
||||
Write-Output "Uninstall finished. Please restart your machine to clear temp files."
|
Loading…
Reference in New Issue
Block a user