INNER CODE UNIT · JavaScript

trimmed

remsky/Kokoro-FastAPI · web/src/App.js:178

                        const trimmed = samples.subarray(0, sampleRate * 30);
                        this.setTuneClip(encodeWav(trimmed, sampleRate), file.name, trimmed, sampleRate);
                    })
                    .catch(() => {
                        if (file.size > 10 << 20) {
                            this.showStatus('Reference clip exceeds 10 MB', 'error');
                            return;
                        }
                        this.setTuneClip(file, file.name);
                    });
            }
        });
        tuneRecordBtn.addEventListener('click', () => {
            this.toggleRecording().catch((error) => this.showStatus(error.message, 'error'));
        });
        tuneDownloadBtn.addEventListener('click', () => {
            this.downloadVoicePack().catch((error) => this.showStatus(error.message, 'error'));
        });

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…