Skip to content

Commit 717c4e0

Browse files
authored
Merge pull request rhulha#4 from ghabiger/patch-1
Fixed Save-To-Disk Voice Selection
2 parents ec1dd54 + d35a9ce commit 717c4e0

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

ButtonHandler.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,10 @@ export class ButtonHandler {
159159
// Set estimated chunks based on text length
160160
this.audioDiskSaver.setTotalChunks(text.length / 100); // rough estimate based on chunk size
161161
updateProgress(0, "Processing audio for saving...");
162-
this.worker.postMessage({ type: "generate", text: text, voice: "af" });
162+
163+
// Get the selected voice
164+
const selectedVoice = document.getElementById("voiceSelector").value;
165+
this.worker.postMessage({ type: "generate", text: text, voice: selectedVoice });
163166
} catch (error) {
164167
console.error("Error initializing disk save:", error);
165168
updateProgress(100, "Error initializing file save!");

0 commit comments

Comments
 (0)