Consolidate engine docs and naming

This commit is contained in:
2026-05-19 11:09:37 +02:00
parent 121b174f2c
commit dbcb8f4284
47 changed files with 826 additions and 1992 deletions
+2 -2
View File
@@ -13,9 +13,9 @@ Image block markup:
Sizes:
- `landscape`/`widescreen`: 16:9, centered, near full page width, height snapped to whole line heights.
- `landscape`/`widescreen`: 16:9, centered, near full page width, height snapped to whole line heights, with half a line of reserved space above and below.
- `portrait`: 16:9, half page width, height snapped to whole line heights, with following prose flowing beside it.
- `square`: 1:1, centered, near full page width, height snapped to whole line heights.
- `square`: 1:1, centered, near full page width, height snapped to whole line heights, with half a line of reserved space above and below.
Images are inserted as story blocks, saved in browser history, restored on load/history scrolling, and revealed after the page scrolls to their line-snapped position. Optional `pause=`, `delay=`, `lead=`, or bare seconds such as `2s` delay the next spoken paragraph; the pause is skippable and does not block background TTS preparation.
+1 -1
View File
@@ -753,7 +753,7 @@ class SentenceQueueModule extends BaseModule {
if (this.lastContinueAt >= (sentence.playbackStartedAt || 0)) {
return false;
}
if (this.sentenceQueue.length <= 1 && this.inputMode === 'choice') {
if (this.inputMode === 'choice') {
return false;
}
return this.sentenceQueue.length > 1;
+9 -4
View File
@@ -700,18 +700,23 @@ class TTSFactoryModule extends BaseModule {
const persistenceManager = this.getModule('persistence-manager');
if (persistenceManager) {
persistenceManager.updatePreference('tts', 'preferred_handler', id);
this.voice = persistenceManager.getPreference('tts', 'voice', this.voice || '');
const providerVoice = persistenceManager.getPreference('tts', `${id}_voice`, '');
const genericVoice = persistenceManager.getPreference('tts', 'voice', this.voice || '');
this.voice = providerVoice || genericVoice || '';
this.language = String(this.getModule('game-config')?.getLocale?.() || this.language || 'en_US').replace('_', '-').toLowerCase();
this.speed = persistenceManager.getPreference('tts', 'speed', this.speed || 1.0);
}
const handler = this.handlers[id];
if (handler && typeof handler.setVoiceOptions === 'function') {
handler.setVoiceOptions({
voice: this.voice,
const voiceOptions = {
speed: this.speed,
language: this.language
});
};
if (this.voice) {
voiceOptions.voice = this.voice;
}
handler.setVoiceOptions(voiceOptions);
}
// Dispatch events
+1 -1
View File
@@ -21,7 +21,7 @@ Supported playback flags:
- `once`: play the track one time.
- `lead=<seconds>`: for block music, let the music play alone for this many seconds before the next text/TTS paragraph starts.
Music volume is controlled by master volume and music volume in the options menu. While TTS is playing, music is ducked to 70% of its configured volume and restored when TTS playback is idle.
Music volume is controlled by master volume and music volume in the options menu. While TTS is playing, music is ducked by the persisted ducking percentage and restored when TTS playback is idle.
The ducking amount is configurable in the options menu and can be disabled with the music-ducking mute toggle. Music state is saved with browser savegames when a track is active, including the current playback position, and restored with a fade-in on load.