Update TTS providers and story markup
This commit is contained in:
@@ -17,7 +17,7 @@ class AnimationQueueModule extends BaseModule {
|
||||
|
||||
// Animation timing properties - use parent's config system
|
||||
this.updateConfig({
|
||||
speed: 1.0, // Speed multiplier for delays (1.0 = no scaling, delays are pre-calculated)
|
||||
speed: 1.0,
|
||||
fastForwardEnabled: false
|
||||
});
|
||||
|
||||
@@ -44,7 +44,9 @@ class AnimationQueueModule extends BaseModule {
|
||||
// Listen for speed changes from UI
|
||||
document.addEventListener('animation:speed:change', (event) => {
|
||||
if (event.detail && typeof event.detail.speed === 'number') {
|
||||
// Speed from UI is a rate multiplier (0.5-2.0 typically)
|
||||
// Word timings are already speed-scaled before they reach
|
||||
// the scheduler. Keep the value only for diagnostics/API
|
||||
// compatibility; do not apply it again in schedule().
|
||||
this.config.speed = event.detail.speed;
|
||||
console.log(`AnimationQueue: Speed updated to ${this.config.speed}`);
|
||||
}
|
||||
@@ -71,8 +73,9 @@ class AnimationQueueModule extends BaseModule {
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Adjust delay based on fast-forward or speed settings
|
||||
const actualDelay = this.config.fastForwardEnabled ? 0 : Math.max(0, delay * this.config.speed);
|
||||
// Delays are absolute timings calculated from the prepared sentence
|
||||
// duration. TTS/app speed has already been applied at that stage.
|
||||
const actualDelay = this.config.fastForwardEnabled ? 0 : Math.max(0, delay);
|
||||
|
||||
// Record the delay for tracking
|
||||
this.delay = Math.max(this.delay, delay);
|
||||
@@ -318,7 +321,7 @@ class AnimationQueueModule extends BaseModule {
|
||||
|
||||
/**
|
||||
* Set the animation speed
|
||||
* @param {number} speed - Animation speed factor (lower is faster)
|
||||
* @param {number} speed - Stored speed value for compatibility/diagnostics
|
||||
*/
|
||||
setSpeed(speed) {
|
||||
if (typeof speed !== 'number' || speed <= 0) {
|
||||
|
||||
Reference in New Issue
Block a user