@patterkit/model 0.24.0 → 0.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +4 -1
- package/dist/index.d.cts +12 -7
- package/dist/index.d.ts +12 -7
- package/dist/index.js +3 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -58,6 +58,7 @@ __export(index_exports, {
|
|
|
58
58
|
SPEECH_PAUSE_LONG_WEIGHT: () => SPEECH_PAUSE_LONG_WEIGHT,
|
|
59
59
|
SPEECH_PAUSE_SHORT_WEIGHT: () => SPEECH_PAUSE_SHORT_WEIGHT,
|
|
60
60
|
STRINGS_SCHEMA: () => STRINGS_SCHEMA,
|
|
61
|
+
SUBTITLE_READING_MIN: () => SUBTITLE_READING_MIN,
|
|
61
62
|
UNRESOLVED_KEY: () => UNRESOLVED_KEY,
|
|
62
63
|
castStringKey: () => castStringKey,
|
|
63
64
|
countSyllables: () => countSyllables,
|
|
@@ -2261,8 +2262,9 @@ var PAD_AFTER_MAX = 60;
|
|
|
2261
2262
|
var DEFAULT_ESTIMATE_SYLLABLES_PER_SECOND = 4;
|
|
2262
2263
|
var ESTIMATE_SYLLABLES_PER_SECOND_MIN = 2;
|
|
2263
2264
|
var ESTIMATE_SYLLABLES_PER_SECOND_MAX = 10;
|
|
2264
|
-
var LINE_DURATION_MIN =
|
|
2265
|
+
var LINE_DURATION_MIN = 0.5;
|
|
2265
2266
|
var LINE_DURATION_MAX = 18;
|
|
2267
|
+
var SUBTITLE_READING_MIN = 1.5;
|
|
2266
2268
|
function estimateLineDuration(text, locale, syllablesPerSecond) {
|
|
2267
2269
|
const rate = typeof syllablesPerSecond === "number" && Number.isFinite(syllablesPerSecond) && syllablesPerSecond > 0 ? syllablesPerSecond : DEFAULT_ESTIMATE_SYLLABLES_PER_SECOND;
|
|
2268
2270
|
let weight = 0;
|
|
@@ -2438,6 +2440,7 @@ var UNRESOLVED_KEY = "unresolved";
|
|
|
2438
2440
|
SPEECH_PAUSE_LONG_WEIGHT,
|
|
2439
2441
|
SPEECH_PAUSE_SHORT_WEIGHT,
|
|
2440
2442
|
STRINGS_SCHEMA,
|
|
2443
|
+
SUBTITLE_READING_MIN,
|
|
2441
2444
|
UNRESOLVED_KEY,
|
|
2442
2445
|
castStringKey,
|
|
2443
2446
|
countSyllables,
|
package/dist/index.d.cts
CHANGED
|
@@ -400,7 +400,7 @@ type GrammaticalGender = string;
|
|
|
400
400
|
* not enforced - a project may use any string (see `GrammaticalGender`). */
|
|
401
401
|
declare const COMMON_GENDERS: readonly ["male", "female", "neuter"];
|
|
402
402
|
interface CastMember {
|
|
403
|
-
/**
|
|
403
|
+
/** The character ID (matched by a beat's `character`); language-neutral key. */
|
|
404
404
|
name: string;
|
|
405
405
|
/** Localised player-facing name - a localisation id (project-level strings). */
|
|
406
406
|
displayName?: string;
|
|
@@ -424,7 +424,7 @@ interface CastMember {
|
|
|
424
424
|
}
|
|
425
425
|
/** A speaker qualifier (a screenplay's character extension): `V.O.`, `O.S.`, `RADIO`, or the project's own.
|
|
426
426
|
* A line stores the `gameId`; the `name` is what the cue, Play, and the scripts show, and is localised as a
|
|
427
|
-
*
|
|
427
|
+
* character name is (`qualifierStringKey`). */
|
|
428
428
|
interface SpeakerQualifier {
|
|
429
429
|
/** What code switches on, and what a line stores. Unique in the project; hyphen-slug form (`gameIdify`). */
|
|
430
430
|
gameId: string;
|
|
@@ -463,12 +463,17 @@ declare const PAD_AFTER_MAX = 60;
|
|
|
463
463
|
declare const DEFAULT_ESTIMATE_SYLLABLES_PER_SECOND = 4;
|
|
464
464
|
declare const ESTIMATE_SYLLABLES_PER_SECOND_MIN = 2;
|
|
465
465
|
declare const ESTIMATE_SYLLABLES_PER_SECOND_MAX = 10;
|
|
466
|
-
/** The shortest and longest a line with no recording lasts, in seconds (`estimateLineDuration`).
|
|
467
|
-
|
|
466
|
+
/** The shortest and longest a line with no recording lasts, in seconds (`estimateLineDuration`). The shortest is a
|
|
467
|
+
* speaking time, the least a spoken word plausibly takes, not a reading time: see SUBTITLE_READING_MIN. */
|
|
468
|
+
declare const LINE_DURATION_MIN = 0.5;
|
|
468
469
|
declare const LINE_DURATION_MAX = 18;
|
|
470
|
+
/** The least time a line's text should stay on screen to be read, in seconds, whether or not the line is that long:
|
|
471
|
+
* for a tool that shows a line as a subtitle or overhead text, which keeps it up at least this long after a shorter
|
|
472
|
+
* line ends, overlapping the next if it must. The line itself still ends when it's said (`estimateLineDuration`). */
|
|
473
|
+
declare const SUBTITLE_READING_MIN = 1.5;
|
|
469
474
|
/** How long a line with no recording lasts, in seconds: the total weight of its speech units (its syllables and its
|
|
470
475
|
* pauses, `speechUnits`) at `syllablesPerSecond` (default 4, the project's `estimateSyllablesPerSecond` when it
|
|
471
|
-
* sets one), clamped to
|
|
476
|
+
* sets one), clamped to 0.5 to 18 seconds. `text` and `locale` are the line as it's spoken, in the project's main
|
|
472
477
|
* language (a line result's `spokenText` and `spokenLocale`), never a translation being shown. This is the one
|
|
473
478
|
* rule every Patter tool and runtime times a line by: Patterpad's Play window, the playable HTML page, and the
|
|
474
479
|
* Unity, Unreal, and Godot runtimes, which the conformance corpus holds to the same numbers. A rate that isn't a
|
|
@@ -852,7 +857,7 @@ declare const PROJECT_LOCALE_SCENE = "@project";
|
|
|
852
857
|
* CastMember's `displayName`; the runtime resolves a character's shown name through this key. */
|
|
853
858
|
declare function castStringKey(name: string): string;
|
|
854
859
|
/** The project-level loc-string key for a speaker qualifier's shown name, e.g. `qualifier:vo`. Resolved as a
|
|
855
|
-
*
|
|
860
|
+
* character name is: the active locale, then the default locale, then the authored `name`. */
|
|
856
861
|
declare function qualifierStringKey(gameId: string): string;
|
|
857
862
|
/** The project-level loc-string key for one character's own label with one qualifier, e.g. `speaker:PLAYER:vo`:
|
|
858
863
|
* only for a pair someone has overridden (`CastMember.qualifierLabels`). Every other pair's label is built from
|
|
@@ -1499,4 +1504,4 @@ interface ExtensionFieldDecl {
|
|
|
1499
1504
|
/** A node's extension values in a bundle: extension id -> field -> value, raw. */
|
|
1500
1505
|
type NodeExtensions = Record<string, Record<string, unknown>>;
|
|
1501
1506
|
|
|
1502
|
-
export { AUTHORING_SCHEMA, type AuthoringFile, type Beat, type Block, type Bundle, type BundleCastMember, type BundleExtension, type BundleQualifier, COMMON_GENDERS, type CaptionDelimiters, type CastMember, type Comment, type CommentMessage, type CommentRange, type CompiledBlock, type CompiledEffect, type CompiledGroup, type CompiledScene, type CompiledSnippet, type CoverageDriver, DEFAULT_CAPTION_CHARACTER, DEFAULT_CAPTION_DELIMITERS, DEFAULT_DOCUMENTATION_CLASSES, DEFAULT_ESTIMATE_SYLLABLES_PER_SECOND, DEFAULT_LAYOUT, DEFAULT_PAD_AFTER, DEFAULT_QUALIFIERS, DEFAULT_RECORDING_STATUSES, DEFAULT_SPEAKER_PATTERN, DEFAULT_WRITING_STATUSES, type DocLine, type DocumentationClass, ESTIMATE_SYLLABLES_PER_SECOND_MAX, ESTIMATE_SYLLABLES_PER_SECOND_MIN, EXTENSIONS_DIR, EXTENSION_SCHEMA, EXTENSION_SHARD, type EditRecord, type Effect, type EngineSave, type EstimatingConfig, type Expression, type ExtensionFieldDecl, type ExtensionShard, FLOW_SCHEMA, type FlowCursor, type FlowFile, type FlowNode, type FlowSnapshot, type FlowState, type FlowValues, type GameData, type GameDataField, type GameDataFieldType, type GameDataFields, type GameDataNodeKind, type GameEventBeat, type GrammaticalGender, type Group, HANDOFF_SCHEMA, type HandoffFile, type HandoffImport, type HandoffLine, type HandoffRow, type HostScopeDecl, type HostScopeRegistry, type HostScopeSpec, type Jump, type JumpTarget, LINE_DURATION_MAX, LINE_DURATION_MIN, type LineBeat, type LocaleFile, MANIFEST_EXTENSION, type NodeExtensions, PAD_AFTER_MAX, PAD_AFTER_MIN, PROJECT_EXTENSION_STEM, PROJECT_LOCALE_SCENE, PROJECT_SCHEMA, type ProjectDictionary, type ProjectExtension, type ProjectFile, type ProjectLayout, type PromptBeat, type PropertyDecl, type PropertyType, RERECORD_STATUS, RERECORD_STATUS_DECL, type RecordingFolder, type RecordingStatusDecl, SAVE_SCHEMA, SAVE_VERSION, SPEAKER_PATTERN_KEY, SPEECH_DIGIT_WEIGHT, SPEECH_KANJI_WEIGHT, SPEECH_PAUSE_LONG_WEIGHT, SPEECH_PAUSE_SHORT_WEIGHT, STRINGS_SCHEMA, type SaveEnvelope, type SaveGame, type SaveGameV3, type SavedChoice, type SavedChoiceOption, type SavedChoicePrompt, type ScalarValue, type Scene, type SceneFolder, type SceneFolderLayout, type SceneNavRow, type Selector, type SelectorExhaust, type SelectorOrder, type SelectorSnapshot, type SequenceOptions, type Snippet, type SpeakerQualifier, type SpeechUnit, type SpeechUnitKind, type StackFrame, type Suggestion, type SuggestionSource, type TextBeat, UNRESOLVED_KEY, type VcsKind, type WritingStatusDecl, castStringKey, countSyllables, deriveRecordingFolders, effectiveGameId, estimateLineDuration, formatSpeakerLabel, isContentlessBeat, isDialogueScene, projectLayout, projectQualifiers, qualifierStringKey, resolveSceneRef, sceneAddressIndex, sceneFolderLayout, sceneFolderPath, speakerLabelKey, speechUnits, textIsAction, usedQualifiers, usedSpeakerPairs, walkNodes };
|
|
1507
|
+
export { AUTHORING_SCHEMA, type AuthoringFile, type Beat, type Block, type Bundle, type BundleCastMember, type BundleExtension, type BundleQualifier, COMMON_GENDERS, type CaptionDelimiters, type CastMember, type Comment, type CommentMessage, type CommentRange, type CompiledBlock, type CompiledEffect, type CompiledGroup, type CompiledScene, type CompiledSnippet, type CoverageDriver, DEFAULT_CAPTION_CHARACTER, DEFAULT_CAPTION_DELIMITERS, DEFAULT_DOCUMENTATION_CLASSES, DEFAULT_ESTIMATE_SYLLABLES_PER_SECOND, DEFAULT_LAYOUT, DEFAULT_PAD_AFTER, DEFAULT_QUALIFIERS, DEFAULT_RECORDING_STATUSES, DEFAULT_SPEAKER_PATTERN, DEFAULT_WRITING_STATUSES, type DocLine, type DocumentationClass, ESTIMATE_SYLLABLES_PER_SECOND_MAX, ESTIMATE_SYLLABLES_PER_SECOND_MIN, EXTENSIONS_DIR, EXTENSION_SCHEMA, EXTENSION_SHARD, type EditRecord, type Effect, type EngineSave, type EstimatingConfig, type Expression, type ExtensionFieldDecl, type ExtensionShard, FLOW_SCHEMA, type FlowCursor, type FlowFile, type FlowNode, type FlowSnapshot, type FlowState, type FlowValues, type GameData, type GameDataField, type GameDataFieldType, type GameDataFields, type GameDataNodeKind, type GameEventBeat, type GrammaticalGender, type Group, HANDOFF_SCHEMA, type HandoffFile, type HandoffImport, type HandoffLine, type HandoffRow, type HostScopeDecl, type HostScopeRegistry, type HostScopeSpec, type Jump, type JumpTarget, LINE_DURATION_MAX, LINE_DURATION_MIN, type LineBeat, type LocaleFile, MANIFEST_EXTENSION, type NodeExtensions, PAD_AFTER_MAX, PAD_AFTER_MIN, PROJECT_EXTENSION_STEM, PROJECT_LOCALE_SCENE, PROJECT_SCHEMA, type ProjectDictionary, type ProjectExtension, type ProjectFile, type ProjectLayout, type PromptBeat, type PropertyDecl, type PropertyType, RERECORD_STATUS, RERECORD_STATUS_DECL, type RecordingFolder, type RecordingStatusDecl, SAVE_SCHEMA, SAVE_VERSION, SPEAKER_PATTERN_KEY, SPEECH_DIGIT_WEIGHT, SPEECH_KANJI_WEIGHT, SPEECH_PAUSE_LONG_WEIGHT, SPEECH_PAUSE_SHORT_WEIGHT, STRINGS_SCHEMA, SUBTITLE_READING_MIN, type SaveEnvelope, type SaveGame, type SaveGameV3, type SavedChoice, type SavedChoiceOption, type SavedChoicePrompt, type ScalarValue, type Scene, type SceneFolder, type SceneFolderLayout, type SceneNavRow, type Selector, type SelectorExhaust, type SelectorOrder, type SelectorSnapshot, type SequenceOptions, type Snippet, type SpeakerQualifier, type SpeechUnit, type SpeechUnitKind, type StackFrame, type Suggestion, type SuggestionSource, type TextBeat, UNRESOLVED_KEY, type VcsKind, type WritingStatusDecl, castStringKey, countSyllables, deriveRecordingFolders, effectiveGameId, estimateLineDuration, formatSpeakerLabel, isContentlessBeat, isDialogueScene, projectLayout, projectQualifiers, qualifierStringKey, resolveSceneRef, sceneAddressIndex, sceneFolderLayout, sceneFolderPath, speakerLabelKey, speechUnits, textIsAction, usedQualifiers, usedSpeakerPairs, walkNodes };
|
package/dist/index.d.ts
CHANGED
|
@@ -400,7 +400,7 @@ type GrammaticalGender = string;
|
|
|
400
400
|
* not enforced - a project may use any string (see `GrammaticalGender`). */
|
|
401
401
|
declare const COMMON_GENDERS: readonly ["male", "female", "neuter"];
|
|
402
402
|
interface CastMember {
|
|
403
|
-
/**
|
|
403
|
+
/** The character ID (matched by a beat's `character`); language-neutral key. */
|
|
404
404
|
name: string;
|
|
405
405
|
/** Localised player-facing name - a localisation id (project-level strings). */
|
|
406
406
|
displayName?: string;
|
|
@@ -424,7 +424,7 @@ interface CastMember {
|
|
|
424
424
|
}
|
|
425
425
|
/** A speaker qualifier (a screenplay's character extension): `V.O.`, `O.S.`, `RADIO`, or the project's own.
|
|
426
426
|
* A line stores the `gameId`; the `name` is what the cue, Play, and the scripts show, and is localised as a
|
|
427
|
-
*
|
|
427
|
+
* character name is (`qualifierStringKey`). */
|
|
428
428
|
interface SpeakerQualifier {
|
|
429
429
|
/** What code switches on, and what a line stores. Unique in the project; hyphen-slug form (`gameIdify`). */
|
|
430
430
|
gameId: string;
|
|
@@ -463,12 +463,17 @@ declare const PAD_AFTER_MAX = 60;
|
|
|
463
463
|
declare const DEFAULT_ESTIMATE_SYLLABLES_PER_SECOND = 4;
|
|
464
464
|
declare const ESTIMATE_SYLLABLES_PER_SECOND_MIN = 2;
|
|
465
465
|
declare const ESTIMATE_SYLLABLES_PER_SECOND_MAX = 10;
|
|
466
|
-
/** The shortest and longest a line with no recording lasts, in seconds (`estimateLineDuration`).
|
|
467
|
-
|
|
466
|
+
/** The shortest and longest a line with no recording lasts, in seconds (`estimateLineDuration`). The shortest is a
|
|
467
|
+
* speaking time, the least a spoken word plausibly takes, not a reading time: see SUBTITLE_READING_MIN. */
|
|
468
|
+
declare const LINE_DURATION_MIN = 0.5;
|
|
468
469
|
declare const LINE_DURATION_MAX = 18;
|
|
470
|
+
/** The least time a line's text should stay on screen to be read, in seconds, whether or not the line is that long:
|
|
471
|
+
* for a tool that shows a line as a subtitle or overhead text, which keeps it up at least this long after a shorter
|
|
472
|
+
* line ends, overlapping the next if it must. The line itself still ends when it's said (`estimateLineDuration`). */
|
|
473
|
+
declare const SUBTITLE_READING_MIN = 1.5;
|
|
469
474
|
/** How long a line with no recording lasts, in seconds: the total weight of its speech units (its syllables and its
|
|
470
475
|
* pauses, `speechUnits`) at `syllablesPerSecond` (default 4, the project's `estimateSyllablesPerSecond` when it
|
|
471
|
-
* sets one), clamped to
|
|
476
|
+
* sets one), clamped to 0.5 to 18 seconds. `text` and `locale` are the line as it's spoken, in the project's main
|
|
472
477
|
* language (a line result's `spokenText` and `spokenLocale`), never a translation being shown. This is the one
|
|
473
478
|
* rule every Patter tool and runtime times a line by: Patterpad's Play window, the playable HTML page, and the
|
|
474
479
|
* Unity, Unreal, and Godot runtimes, which the conformance corpus holds to the same numbers. A rate that isn't a
|
|
@@ -852,7 +857,7 @@ declare const PROJECT_LOCALE_SCENE = "@project";
|
|
|
852
857
|
* CastMember's `displayName`; the runtime resolves a character's shown name through this key. */
|
|
853
858
|
declare function castStringKey(name: string): string;
|
|
854
859
|
/** The project-level loc-string key for a speaker qualifier's shown name, e.g. `qualifier:vo`. Resolved as a
|
|
855
|
-
*
|
|
860
|
+
* character name is: the active locale, then the default locale, then the authored `name`. */
|
|
856
861
|
declare function qualifierStringKey(gameId: string): string;
|
|
857
862
|
/** The project-level loc-string key for one character's own label with one qualifier, e.g. `speaker:PLAYER:vo`:
|
|
858
863
|
* only for a pair someone has overridden (`CastMember.qualifierLabels`). Every other pair's label is built from
|
|
@@ -1499,4 +1504,4 @@ interface ExtensionFieldDecl {
|
|
|
1499
1504
|
/** A node's extension values in a bundle: extension id -> field -> value, raw. */
|
|
1500
1505
|
type NodeExtensions = Record<string, Record<string, unknown>>;
|
|
1501
1506
|
|
|
1502
|
-
export { AUTHORING_SCHEMA, type AuthoringFile, type Beat, type Block, type Bundle, type BundleCastMember, type BundleExtension, type BundleQualifier, COMMON_GENDERS, type CaptionDelimiters, type CastMember, type Comment, type CommentMessage, type CommentRange, type CompiledBlock, type CompiledEffect, type CompiledGroup, type CompiledScene, type CompiledSnippet, type CoverageDriver, DEFAULT_CAPTION_CHARACTER, DEFAULT_CAPTION_DELIMITERS, DEFAULT_DOCUMENTATION_CLASSES, DEFAULT_ESTIMATE_SYLLABLES_PER_SECOND, DEFAULT_LAYOUT, DEFAULT_PAD_AFTER, DEFAULT_QUALIFIERS, DEFAULT_RECORDING_STATUSES, DEFAULT_SPEAKER_PATTERN, DEFAULT_WRITING_STATUSES, type DocLine, type DocumentationClass, ESTIMATE_SYLLABLES_PER_SECOND_MAX, ESTIMATE_SYLLABLES_PER_SECOND_MIN, EXTENSIONS_DIR, EXTENSION_SCHEMA, EXTENSION_SHARD, type EditRecord, type Effect, type EngineSave, type EstimatingConfig, type Expression, type ExtensionFieldDecl, type ExtensionShard, FLOW_SCHEMA, type FlowCursor, type FlowFile, type FlowNode, type FlowSnapshot, type FlowState, type FlowValues, type GameData, type GameDataField, type GameDataFieldType, type GameDataFields, type GameDataNodeKind, type GameEventBeat, type GrammaticalGender, type Group, HANDOFF_SCHEMA, type HandoffFile, type HandoffImport, type HandoffLine, type HandoffRow, type HostScopeDecl, type HostScopeRegistry, type HostScopeSpec, type Jump, type JumpTarget, LINE_DURATION_MAX, LINE_DURATION_MIN, type LineBeat, type LocaleFile, MANIFEST_EXTENSION, type NodeExtensions, PAD_AFTER_MAX, PAD_AFTER_MIN, PROJECT_EXTENSION_STEM, PROJECT_LOCALE_SCENE, PROJECT_SCHEMA, type ProjectDictionary, type ProjectExtension, type ProjectFile, type ProjectLayout, type PromptBeat, type PropertyDecl, type PropertyType, RERECORD_STATUS, RERECORD_STATUS_DECL, type RecordingFolder, type RecordingStatusDecl, SAVE_SCHEMA, SAVE_VERSION, SPEAKER_PATTERN_KEY, SPEECH_DIGIT_WEIGHT, SPEECH_KANJI_WEIGHT, SPEECH_PAUSE_LONG_WEIGHT, SPEECH_PAUSE_SHORT_WEIGHT, STRINGS_SCHEMA, type SaveEnvelope, type SaveGame, type SaveGameV3, type SavedChoice, type SavedChoiceOption, type SavedChoicePrompt, type ScalarValue, type Scene, type SceneFolder, type SceneFolderLayout, type SceneNavRow, type Selector, type SelectorExhaust, type SelectorOrder, type SelectorSnapshot, type SequenceOptions, type Snippet, type SpeakerQualifier, type SpeechUnit, type SpeechUnitKind, type StackFrame, type Suggestion, type SuggestionSource, type TextBeat, UNRESOLVED_KEY, type VcsKind, type WritingStatusDecl, castStringKey, countSyllables, deriveRecordingFolders, effectiveGameId, estimateLineDuration, formatSpeakerLabel, isContentlessBeat, isDialogueScene, projectLayout, projectQualifiers, qualifierStringKey, resolveSceneRef, sceneAddressIndex, sceneFolderLayout, sceneFolderPath, speakerLabelKey, speechUnits, textIsAction, usedQualifiers, usedSpeakerPairs, walkNodes };
|
|
1507
|
+
export { AUTHORING_SCHEMA, type AuthoringFile, type Beat, type Block, type Bundle, type BundleCastMember, type BundleExtension, type BundleQualifier, COMMON_GENDERS, type CaptionDelimiters, type CastMember, type Comment, type CommentMessage, type CommentRange, type CompiledBlock, type CompiledEffect, type CompiledGroup, type CompiledScene, type CompiledSnippet, type CoverageDriver, DEFAULT_CAPTION_CHARACTER, DEFAULT_CAPTION_DELIMITERS, DEFAULT_DOCUMENTATION_CLASSES, DEFAULT_ESTIMATE_SYLLABLES_PER_SECOND, DEFAULT_LAYOUT, DEFAULT_PAD_AFTER, DEFAULT_QUALIFIERS, DEFAULT_RECORDING_STATUSES, DEFAULT_SPEAKER_PATTERN, DEFAULT_WRITING_STATUSES, type DocLine, type DocumentationClass, ESTIMATE_SYLLABLES_PER_SECOND_MAX, ESTIMATE_SYLLABLES_PER_SECOND_MIN, EXTENSIONS_DIR, EXTENSION_SCHEMA, EXTENSION_SHARD, type EditRecord, type Effect, type EngineSave, type EstimatingConfig, type Expression, type ExtensionFieldDecl, type ExtensionShard, FLOW_SCHEMA, type FlowCursor, type FlowFile, type FlowNode, type FlowSnapshot, type FlowState, type FlowValues, type GameData, type GameDataField, type GameDataFieldType, type GameDataFields, type GameDataNodeKind, type GameEventBeat, type GrammaticalGender, type Group, HANDOFF_SCHEMA, type HandoffFile, type HandoffImport, type HandoffLine, type HandoffRow, type HostScopeDecl, type HostScopeRegistry, type HostScopeSpec, type Jump, type JumpTarget, LINE_DURATION_MAX, LINE_DURATION_MIN, type LineBeat, type LocaleFile, MANIFEST_EXTENSION, type NodeExtensions, PAD_AFTER_MAX, PAD_AFTER_MIN, PROJECT_EXTENSION_STEM, PROJECT_LOCALE_SCENE, PROJECT_SCHEMA, type ProjectDictionary, type ProjectExtension, type ProjectFile, type ProjectLayout, type PromptBeat, type PropertyDecl, type PropertyType, RERECORD_STATUS, RERECORD_STATUS_DECL, type RecordingFolder, type RecordingStatusDecl, SAVE_SCHEMA, SAVE_VERSION, SPEAKER_PATTERN_KEY, SPEECH_DIGIT_WEIGHT, SPEECH_KANJI_WEIGHT, SPEECH_PAUSE_LONG_WEIGHT, SPEECH_PAUSE_SHORT_WEIGHT, STRINGS_SCHEMA, SUBTITLE_READING_MIN, type SaveEnvelope, type SaveGame, type SaveGameV3, type SavedChoice, type SavedChoiceOption, type SavedChoicePrompt, type ScalarValue, type Scene, type SceneFolder, type SceneFolderLayout, type SceneNavRow, type Selector, type SelectorExhaust, type SelectorOrder, type SelectorSnapshot, type SequenceOptions, type Snippet, type SpeakerQualifier, type SpeechUnit, type SpeechUnitKind, type StackFrame, type Suggestion, type SuggestionSource, type TextBeat, UNRESOLVED_KEY, type VcsKind, type WritingStatusDecl, castStringKey, countSyllables, deriveRecordingFolders, effectiveGameId, estimateLineDuration, formatSpeakerLabel, isContentlessBeat, isDialogueScene, projectLayout, projectQualifiers, qualifierStringKey, resolveSceneRef, sceneAddressIndex, sceneFolderLayout, sceneFolderPath, speakerLabelKey, speechUnits, textIsAction, usedQualifiers, usedSpeakerPairs, walkNodes };
|
package/dist/index.js
CHANGED
|
@@ -2178,8 +2178,9 @@ var PAD_AFTER_MAX = 60;
|
|
|
2178
2178
|
var DEFAULT_ESTIMATE_SYLLABLES_PER_SECOND = 4;
|
|
2179
2179
|
var ESTIMATE_SYLLABLES_PER_SECOND_MIN = 2;
|
|
2180
2180
|
var ESTIMATE_SYLLABLES_PER_SECOND_MAX = 10;
|
|
2181
|
-
var LINE_DURATION_MIN =
|
|
2181
|
+
var LINE_DURATION_MIN = 0.5;
|
|
2182
2182
|
var LINE_DURATION_MAX = 18;
|
|
2183
|
+
var SUBTITLE_READING_MIN = 1.5;
|
|
2183
2184
|
function estimateLineDuration(text, locale, syllablesPerSecond) {
|
|
2184
2185
|
const rate = typeof syllablesPerSecond === "number" && Number.isFinite(syllablesPerSecond) && syllablesPerSecond > 0 ? syllablesPerSecond : DEFAULT_ESTIMATE_SYLLABLES_PER_SECOND;
|
|
2185
2186
|
let weight = 0;
|
|
@@ -2354,6 +2355,7 @@ export {
|
|
|
2354
2355
|
SPEECH_PAUSE_LONG_WEIGHT,
|
|
2355
2356
|
SPEECH_PAUSE_SHORT_WEIGHT,
|
|
2356
2357
|
STRINGS_SCHEMA,
|
|
2358
|
+
SUBTITLE_READING_MIN,
|
|
2357
2359
|
UNRESOLVED_KEY,
|
|
2358
2360
|
castStringKey,
|
|
2359
2361
|
countSyllables,
|
package/package.json
CHANGED