Checkpoint current interactive fiction state
This commit is contained in:
@@ -248,6 +248,9 @@ export class BrowserTTSModule extends TTSHandlerModule {
|
||||
this.utteranceHandlers = {
|
||||
start: () => {
|
||||
this.isSpeaking = true;
|
||||
document.dispatchEvent(new CustomEvent('tts:audio-started', {
|
||||
detail: { provider: this.id || this.name }
|
||||
}));
|
||||
},
|
||||
end: () => {
|
||||
this.isSpeaking = false;
|
||||
@@ -443,13 +446,8 @@ export class BrowserTTSModule extends TTSHandlerModule {
|
||||
}
|
||||
|
||||
if (typeof options.speed === 'number') {
|
||||
this.voiceOptions.speed = Math.max(0.5, Math.min(2.0, options.speed));
|
||||
|
||||
// Save speed preference
|
||||
const persistenceManager = this.getModule('persistence-manager');
|
||||
if (persistenceManager) {
|
||||
persistenceManager.updatePreference('tts', 'browser_speed', options.speed);
|
||||
}
|
||||
// Web Speech rate uses 1.0 as normal, matching the app-wide slider.
|
||||
this.voiceOptions.speed = Math.max(0.1, Math.min(10.0, options.speed));
|
||||
}
|
||||
|
||||
if (typeof options.pitch === 'number') {
|
||||
|
||||
Reference in New Issue
Block a user