yum-slop/TaSTT

Free self-hosted STT for VRChat.

git clone https://git.yummers.dev/yum-slop/TaSTT

yumEnforce clean venv on build8368883

master
1.1 KiB34 linesraw
1const { execSync } = require('child_process');
2const path = require('path');
3const fs = require('fs');
4
5const projectRoot = path.join(__dirname, '..', '..');
6const venvPath = path.join(projectRoot, 'venv_clean');
7const dllPath = path.join(projectRoot, 'dll_empty');
8
9console.log('Creating empty virtual environment and dll directory...');
10
11// Delete dll & venv if they already exist
12if (fs.existsSync(dllPath)) {
13    fs.rmSync(dllPath, { recursive: true, force: true });
14    console.log('Deleted existing dll directory');
15}
16if (fs.existsSync(venvPath)) {
17    fs.rmSync(venvPath, { recursive: true, force: true });
18    console.log('Deleted existing venv directory');
19}
20
21// Create empty dll folder
22fs.mkdirSync(dllPath, { recursive: true });
23console.log('Created empty dll directory');
24
25// Create hermitic python venv
26try {
27    console.log('Creating new venv...');
28    execSync(`python -m venv "${venvPath}"`, { stdio: 'inherit' });
29    console.log('Empty venv created successfully!');
30} catch (error) {
31    console.error('Failed to create venv:', error);
32    process.exit(1);
33}
34