Update TTS providers and story markup
This commit is contained in:
@@ -291,12 +291,13 @@ class SocketClientModule extends BaseModule {
|
||||
}
|
||||
}
|
||||
|
||||
await this.storeAndQueueBlocks(turnBlocks);
|
||||
|
||||
const choices = Array.isArray(data.choices) ? data.choices : [];
|
||||
const inputMode = data.inputMode || (choices.length > 0 ? 'choice' : 'none');
|
||||
this.dispatchChoices(choices);
|
||||
this.dispatchInputMode(inputMode);
|
||||
|
||||
await this.storeAndQueueBlocks(turnBlocks);
|
||||
|
||||
document.dispatchEvent(new CustomEvent('story:turn-complete', {
|
||||
detail: { turnId, turn: data, choices, inputMode }
|
||||
}));
|
||||
@@ -392,6 +393,9 @@ class SocketClientModule extends BaseModule {
|
||||
const glossaryEntries = markupParser && typeof markupParser.extractGlossaryTags === 'function'
|
||||
? markupParser.extractGlossaryTags(tags)
|
||||
: [];
|
||||
const ttsInstructions = markupParser && typeof markupParser.extractTtsInstructionTags === 'function'
|
||||
? markupParser.extractTtsInstructionTags(tags)
|
||||
: [];
|
||||
const cueTags = tags.filter(tag => this.isTimedCueTag(tag));
|
||||
const deferredTags = tags.filter(tag => this.isDeferredPopupTag(tag));
|
||||
const immediateTags = tags.filter(tag =>
|
||||
@@ -433,6 +437,7 @@ class SocketClientModule extends BaseModule {
|
||||
text,
|
||||
layoutText,
|
||||
glossaryEntries,
|
||||
ttsInstructions,
|
||||
cueMarkers,
|
||||
deferredTags: [
|
||||
...(Array.isArray(pending.deferredTags) ? pending.deferredTags : []),
|
||||
@@ -503,7 +508,7 @@ class SocketClientModule extends BaseModule {
|
||||
|
||||
isRenderMetadataTag(tag) {
|
||||
const key = String(tag?.key || '').toLowerCase();
|
||||
return ['gloss'].includes(key);
|
||||
return key === 'gloss' || key === 'tts' || key.startsWith('tts-');
|
||||
}
|
||||
|
||||
isDeferredPopupTag(tag) {
|
||||
|
||||
Reference in New Issue
Block a user