microsoft/TypeAgent

Public

mirrored fromhttps://github.com/microsoft/TypeAgentAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
f46fff4e5103217703b51e27ba3f6405ac000e21

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

python/tts/speechT5/setup.cmd

46lines · modecode

1:: Copyright (c) Microsoft Corporation.
2:: Licensed under the MIT License.
3
4@echo off
5
6setlocal
7set RECREATE=0
8
9if "%1" == "--help" (
10 echo Usage: setup [^<directory^>] [--recreate]
11 echo Options:
12 echo ^<directory^>: The directory where the virtual environment will be created. Default is ./.venv
13 echo --recreate: If specified, the virtual environment will be recreated if it already exists.
14 exit /b -1
15)
16
17IF "%1" == "--recreate" (
18 set RECREATE=1
19 shift /1
20)
21
22IF "%1" == "" (
23 set DIR=%~dp0\.venv
24) else (
25 set DIR=%1\py\whisperService
26
27 IF "%2" == "--recreate" (
28 set RECREATE=1
29 )
30)
31
32IF "%RECREATE%" == "1" (
33 IF EXIST "%DIR%" (
34 rmdir /s /q %DIR%
35 )
36)
37
38
39IF NOT EXIST "%DIR%\Scripts\activate" (
40 py -m venv %DIR%
41 call %DIR%\Scripts\activate.bat
42 pip config --site set global.extra-index-url https://download.pytorch.org/whl/cu121
43 pip install -r requirements.txt
44)
45
46endlocal && %DIR%\Scripts\activate.bat
47