Spaces:
Running
Running
Update index.js
Browse files
index.js
CHANGED
|
@@ -18,7 +18,7 @@ const errorMsg = document.getElementById('error-msg');
|
|
| 18 |
|
| 19 |
// State
|
| 20 |
let ttsPipeline = null;
|
| 21 |
-
let currentDevice = '
|
| 22 |
|
| 23 |
// Helper: Check WebGPU support
|
| 24 |
async function checkWebGPU() {
|
|
@@ -35,7 +35,7 @@ checkWebGPU();
|
|
| 35 |
// UI Event Listeners
|
| 36 |
gpuToggle.addEventListener('change', (e) => {
|
| 37 |
const useGPU = e.target.checked;
|
| 38 |
-
currentDevice = useGPU ? 'webgpu' : '
|
| 39 |
deviceLabel.innerText = useGPU ? 'Run on WebGPU' : 'Run on CPU';
|
| 40 |
|
| 41 |
// Reset pipeline to force reload with new device setting next time
|
|
|
|
| 18 |
|
| 19 |
// State
|
| 20 |
let ttsPipeline = null;
|
| 21 |
+
let currentDevice = 'wasm';
|
| 22 |
|
| 23 |
// Helper: Check WebGPU support
|
| 24 |
async function checkWebGPU() {
|
|
|
|
| 35 |
// UI Event Listeners
|
| 36 |
gpuToggle.addEventListener('change', (e) => {
|
| 37 |
const useGPU = e.target.checked;
|
| 38 |
+
currentDevice = useGPU ? 'webgpu' : 'wasm';
|
| 39 |
deviceLabel.innerText = useGPU ? 'Run on WebGPU' : 'Run on CPU';
|
| 40 |
|
| 41 |
// Reset pipeline to force reload with new device setting next time
|