@happyvertical/smrt-voice 0.38.24 → 0.38.25

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/AGENTS.md CHANGED
@@ -10,7 +10,7 @@ TTS voice profiles with two creation modes: AI design or audio cloning. Word-lev
10
10
 
11
11
  ## Gotchas
12
12
 
13
- - **Default provider hardcoded**: 'qwen3-tts' no provider abstraction layer
13
+ - **Runtime providers live in `@happyvertical/speech`**: this package persists voice profiles, samples, and outputs. Use `VoiceProfile.toSpeechVoice()` and `VoiceOutput.fromSynthesizedSpeech()` at the adapter boundary.
14
14
  - **Sample minimum not enforced in constructor**: 3-sec minimum documented but not validated on create
15
15
  - **WordTiming from external provider**: framework doesn't generate timings — populated by TTS service
16
16
  - **Status transitions not enforced**: can manually set status without triggering generation workflow
package/README.md CHANGED
@@ -65,6 +65,36 @@ const output = new VoiceOutput({
65
65
  output.getWordAtTime(0.7); // { word: 'evening', start: 0.6, end: 1.0 }
66
66
  ```
67
67
 
68
+ ### Runtime speech adapters
69
+
70
+ `@happyvertical/smrt-voice` stores voice domain records. Runtime STT/TTS provider
71
+ calls are owned by `@happyvertical/speech`.
72
+
73
+ ```typescript
74
+ import { getSpeech } from '@happyvertical/speech';
75
+ import { VoiceOutput, VoiceProfile } from '@happyvertical/smrt-voice';
76
+
77
+ const speech = await getSpeech({
78
+ synthesizer: {
79
+ type: 'qwen3-tts',
80
+ baseUrl: 'http://qwen3-tts.qwen3-tts.svc.cluster.local',
81
+ },
82
+ });
83
+
84
+ const profile = await VoiceProfile.find('voice-123');
85
+ const spoken = await speech.synthesize({
86
+ text: 'Welcome to the evening news.',
87
+ voice: profile.toSpeechVoice(),
88
+ });
89
+
90
+ const output = VoiceOutput.fromSynthesizedSpeech({
91
+ sourceText: 'Welcome to the evening news.',
92
+ voiceProfileId: profile.id,
93
+ audioAssetId: 'asset-created-by-your-asset-store',
94
+ speech: spoken,
95
+ });
96
+ ```
97
+
68
98
  ## API
69
99
 
70
100
  ### Models
@@ -84,6 +114,7 @@ output.getWordAtTime(0.7); // { word: 'evening', start: 0.6, end: 1.0 }
84
114
  | `SampleQuality` | Audio quality rating: `low`, `medium`, `high` |
85
115
  | `WordTiming` | Per-word timing entry: `{ word, start, end }` (seconds) |
86
116
  | `VoiceOutputMetadata` | Audio metadata: sampleRate, format, channels, bitDepth, provider, model |
117
+ | `SpeechVoice`, `SynthesizedSpeech`, `TranscriptResult` | Runtime contracts re-exported from `@happyvertical/speech` |
87
118
  | `VoiceProfileOptions` | Profile creation options |
88
119
  | `VoiceSampleOptions` | Sample creation options |
89
120
  | `VoiceOutputOptions` | Output creation options |
@@ -92,10 +123,12 @@ output.getWordAtTime(0.7); // { word: 'evening', start: 0.6, end: 1.0 }
92
123
 
93
124
  - `VoiceProfile.isCloned` / `isDesigned` -- which creation mode is active
94
125
  - `VoiceProfile.isReady` -- status equals `ready`
126
+ - `VoiceProfile.toSpeechVoice()` -- runtime voice contract for `@happyvertical/speech`
95
127
  - `VoiceSample.meetsMinDuration` -- duration >= 3 seconds
96
128
  - `VoiceSample.isSuitableForCloning` -- meets min duration AND quality != low
97
129
  - `VoiceOutput.wordCount` / `wordsPerSecond` -- computed from sourceText and duration
98
130
  - `VoiceOutput.getWordAtTime(seconds)` -- look up word being spoken at a timestamp
131
+ - `VoiceOutput.fromSynthesizedSpeech()` -- normalize speech adapter output metadata/timings
99
132
 
100
133
  ## Dependencies
101
134
 
@@ -104,3 +137,4 @@ output.getWordAtTime(0.7); // { word: 'evening', start: 0.6, end: 1.0 }
104
137
  - `@happyvertical/smrt-config` -- configuration loading
105
138
  - `@happyvertical/smrt-content` -- content models (VoiceOutput extends Content)
106
139
  - `@happyvertical/smrt-tenancy` -- multi-tenant scoping
140
+ - `@happyvertical/speech` -- runtime STT/TTS adapter contracts
package/dist/index.d.ts CHANGED
@@ -1,13 +1,60 @@
1
+ import { AudioInput } from '@happyvertical/speech';
1
2
  import { Content } from '@happyvertical/smrt-content';
2
3
  import { ContentOptions } from '@happyvertical/smrt-content';
3
4
  import { SmrtObject } from '@happyvertical/smrt-core';
4
5
  import { SmrtObjectOptions } from '@happyvertical/smrt-core';
6
+ import { Speech } from '@happyvertical/speech';
7
+ import { SpeechAdapterAvailability } from '@happyvertical/speech';
8
+ import { SpeechSynthesizer } from '@happyvertical/speech';
9
+ import { SpeechSynthesizerType } from '@happyvertical/speech';
10
+ import { SpeechVoice } from '@happyvertical/speech';
11
+ import { SpeechVoiceInput } from '@happyvertical/speech';
12
+ import { WordTiming as SpeechWordTiming } from '@happyvertical/speech';
13
+ import { SynthesisRequest } from '@happyvertical/speech';
14
+ import { SynthesizedSpeech } from '@happyvertical/speech';
15
+ import { Transcriber } from '@happyvertical/speech';
16
+ import { TranscriberType } from '@happyvertical/speech';
17
+ import { TranscriptionRequest } from '@happyvertical/speech';
18
+ import { TranscriptResult } from '@happyvertical/speech';
19
+ import { TranscriptSegment } from '@happyvertical/speech';
20
+
21
+ export { AudioInput }
22
+
23
+ export declare function metadataFromSynthesizedSpeech(speech: SynthesizedSpeech): VoiceOutputMetadata;
5
24
 
6
25
  /**
7
26
  * Audio sample quality rating
8
27
  */
9
28
  export declare type SampleQuality = 'low' | 'medium' | 'high';
10
29
 
30
+ export { Speech }
31
+
32
+ export { SpeechAdapterAvailability }
33
+
34
+ export { SpeechSynthesizer }
35
+
36
+ export { SpeechSynthesizerType }
37
+
38
+ export { SpeechVoice }
39
+
40
+ export { SpeechVoiceInput }
41
+
42
+ export { SpeechWordTiming }
43
+
44
+ export { SynthesisRequest }
45
+
46
+ export { SynthesizedSpeech }
47
+
48
+ export { Transcriber }
49
+
50
+ export { TranscriberType }
51
+
52
+ export { TranscriptionRequest }
53
+
54
+ export { TranscriptResult }
55
+
56
+ export { TranscriptSegment }
57
+
11
58
  /**
12
59
  * Voice gender classification
13
60
  */
@@ -88,6 +135,23 @@ export declare class VoiceOutput extends Content {
88
135
  * Get the word at a specific timestamp
89
136
  */
90
137
  getWordAtTime(seconds: number): WordTiming | null;
138
+ /**
139
+ * Build a persisted output model from a provider-neutral speech result.
140
+ *
141
+ * The binary audio remains in the caller-owned asset pipeline; this helper
142
+ * only normalizes metadata and timing fields onto the SMRT model.
143
+ */
144
+ static fromSynthesizedSpeech(options: VoiceOutputFromSynthesizedSpeechOptions): VoiceOutput;
145
+ }
146
+
147
+ /**
148
+ * Create a VoiceOutput from a runtime @happyvertical/speech synthesis result.
149
+ */
150
+ export declare interface VoiceOutputFromSynthesizedSpeechOptions extends VoiceOutputOptions {
151
+ /**
152
+ * Runtime synthesis result from @happyvertical/speech.
153
+ */
154
+ speech: SynthesizedSpeech;
91
155
  }
92
156
 
93
157
  /**
@@ -102,6 +166,10 @@ export declare interface VoiceOutputMetadata {
102
166
  * Audio format (e.g., 'wav', 'mp3', 'ogg')
103
167
  */
104
168
  format?: string;
169
+ /**
170
+ * MIME type returned by the speech provider
171
+ */
172
+ contentType?: string;
105
173
  /**
106
174
  * Number of audio channels
107
175
  */
@@ -274,6 +342,11 @@ export declare class VoiceProfile extends SmrtObject {
274
342
  * Check if this is a global (default) voice
275
343
  */
276
344
  get isGlobal(): boolean;
345
+ /**
346
+ * Convert this persisted profile into the runtime voice shape consumed by
347
+ * @happyvertical/speech adapters.
348
+ */
349
+ toSpeechVoice(): SpeechVoice;
277
350
  }
278
351
 
279
352
  /**
@@ -499,6 +572,16 @@ export declare interface WordTiming {
499
572
  * End time in seconds
500
573
  */
501
574
  end: number;
575
+ /**
576
+ * Provider confidence score, when available
577
+ */
578
+ confidence?: number;
579
+ /**
580
+ * Speaker identifier, when diarization is available
581
+ */
582
+ speakerId?: string;
502
583
  }
503
584
 
585
+ export declare function wordTimingsFromSpeech(words: readonly SpeechWordTiming[] | null | undefined): WordTiming[] | null;
586
+
504
587
  export { }
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@ import { ObjectRegistry, SmrtObject, crossPackageRef, foreignKey, smrt } from "@
2
2
  import { Content } from "@happyvertical/smrt-content";
3
3
  import { TenantScoped, tenantId } from "@happyvertical/smrt-tenancy";
4
4
  //#region src/__smrt-register__.ts
5
- ObjectRegistry.registerPackageManifest(JSON.parse("{\"version\":\"1.0.0\",\"timestamp\":1783637934698,\"packageName\":\"@happyvertical/smrt-voice\",\"packageVersion\":\"0.38.24\",\"objects\":{\"@happyvertical/smrt-voice:VoiceOutput\":{\"name\":\"voiceoutput\",\"className\":\"VoiceOutput\",\"qualifiedName\":\"@happyvertical/smrt-voice:VoiceOutput\",\"collection\":\"contents\",\"filePath\":\"/home/runner/_work/smrt/smrt/packages/voice/src/voice-output.ts\",\"packageName\":\"@happyvertical/smrt-voice\",\"fields\":{\"created_at\":{\"type\":\"datetime\",\"required\":false},\"updated_at\":{\"type\":\"datetime\",\"required\":false},\"tenantId\":{\"type\":\"text\",\"required\":false,\"_meta\":{\"generated\":true,\"source\":\"tenantScoped_decorator\",\"sqlType\":\"UUID\",\"__tenancy\":{\"isTenantIdField\":true,\"mode\":\"optional\",\"field\":\"tenantId\",\"autoFilter\":true,\"autoPopulate\":true,\"allowSuperAdminBypass\":false}}},\"type\":{\"type\":\"text\",\"required\":false},\"variant\":{\"type\":\"text\",\"required\":false},\"fileKey\":{\"type\":\"text\",\"required\":false},\"author\":{\"type\":\"text\",\"required\":false},\"name\":{\"type\":\"text\",\"required\":true,\"default\":\"\",\"_meta\":{\"required\":true}},\"title\":{\"type\":\"text\",\"required\":false},\"description\":{\"type\":\"text\",\"required\":false},\"body\":{\"type\":\"text\",\"required\":false},\"bodyFormat\":{\"type\":\"text\",\"required\":false},\"publish_date\":{\"type\":\"datetime\",\"required\":false},\"url\":{\"type\":\"text\",\"required\":false},\"source\":{\"type\":\"text\",\"required\":false},\"original_url\":{\"type\":\"text\",\"required\":false},\"language\":{\"type\":\"text\",\"required\":false},\"tags\":{\"type\":\"json\",\"required\":false,\"default\":[]},\"category\":{\"type\":\"text\",\"required\":false},\"status\":{\"type\":\"text\",\"required\":false,\"default\":\"draft\"},\"state\":{\"type\":\"text\",\"required\":false,\"default\":\"active\"},\"metadata\":{\"type\":\"json\",\"required\":false,\"default\":{}},\"thumbnailAssetId\":{\"type\":\"crossPackageRef\",\"required\":false,\"related\":\"@happyvertical/smrt-assets:Asset\"},\"voiceProfileId\":{\"type\":\"foreignKey\",\"required\":false,\"related\":\"() => VoiceProfile\"},\"sourceText\":{\"type\":\"text\",\"required\":false,\"default\":\"\"},\"audioAssetId\":{\"type\":\"crossPackageRef\",\"required\":false,\"related\":\"@happyvertical/smrt-assets:Asset\"},\"duration\":{\"type\":\"integer\",\"required\":false,\"default\":0},\"wordTimings\":{\"type\":\"json\",\"required\":false,\"default\":[]},\"audioMetadata\":{\"type\":\"json\",\"required\":false}},\"methods\":{\"getAiUsageSnapshot\":{\"name\":\"getAiUsageSnapshot\",\"async\":false,\"parameters\":[],\"returnType\":\"AiUsageSnapshot | undefined\",\"isStatic\":false,\"isPublic\":true},\"resetAiUsage\":{\"name\":\"resetAiUsage\",\"async\":false,\"parameters\":[],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"listAiUsage\":{\"name\":\"listAiUsage\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"AiUsageListOptions\",\"optional\":true}],\"returnType\":\"Promise<SmrtAiUsageRecord[]>\",\"isStatic\":false,\"isPublic\":true},\"summarizeAiUsage\":{\"name\":\"summarizeAiUsage\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"AiUsageSummaryOptions\",\"optional\":true}],\"returnType\":\"Promise<Record<string, AiUsageStats>>\",\"isStatic\":false,\"isPublic\":true},\"destroy\":{\"name\":\"destroy\",\"async\":false,\"parameters\":[],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"markAsPersisted\":{\"name\":\"markAsPersisted\",\"async\":false,\"parameters\":[],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"requireInsertOnSave\":{\"name\":\"requireInsertOnSave\",\"async\":false,\"parameters\":[],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"initialize\":{\"name\":\"initialize\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise\",\"isStatic\":false,\"isPublic\":true},\"loadDataFromDb\":{\"name\":\"loadDataFromDb\",\"async\":true,\"parameters\":[{\"name\":\"data\",\"type\":\"Record<string>\",\"optional\":false}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"getFields\":{\"name\":\"getFields\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<any>\",\"isStatic\":false,\"isPublic\":true},\"toJSON\":{\"name\":\"toJSON\",\"async\":false,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"toPlainObject\":{\"name\":\"toPlainObject\",\"async\":false,\"parameters\":[],\"returnType\":\"Record<string>\",\"isStatic\":false,\"isPublic\":true},\"toPublicJSON\":{\"name\":\"toPublicJSON\",\"async\":false,\"parameters\":[{\"name\":\"options\",\"type\":\"PublicJsonOptions\",\"optional\":true}],\"returnType\":\"Record<string>\",\"isStatic\":false,\"isPublic\":true},\"getId\":{\"name\":\"getId\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"getSlug\":{\"name\":\"getSlug\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"getSavedId\":{\"name\":\"getSavedId\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"isSaved\":{\"name\":\"isSaved\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"save\":{\"name\":\"save\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"classifyConstraintError\":{\"name\":\"classifyConstraintError\",\"async\":false,\"parameters\":[{\"name\":\"message\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"'unique' | 'not_null' | null\",\"isStatic\":true,\"isPublic\":true},\"loadFromId\":{\"name\":\"loadFromId\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"loadFromSlug\":{\"name\":\"loadFromSlug\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"is\":{\"name\":\"is\",\"async\":true,\"parameters\":[{\"name\":\"criteria\",\"type\":\"string\",\"optional\":false},{\"name\":\"options\",\"type\":\"AiOperationOptions\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"do\":{\"name\":\"do\",\"async\":true,\"parameters\":[{\"name\":\"instructions\",\"type\":\"string\",\"optional\":false},{\"name\":\"options\",\"type\":\"AiOperationOptions\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"describe\":{\"name\":\"describe\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"AiOperationOptions\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"delete\":{\"name\":\"delete\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"isRelatedLoaded\":{\"name\":\"isRelatedLoaded\",\"async\":false,\"parameters\":[{\"name\":\"fieldName\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"boolean\",\"isStatic\":false,\"isPublic\":true},\"_setLoadedRelationship\":{\"name\":\"_setLoadedRelationship\",\"async\":false,\"parameters\":[{\"name\":\"fieldName\",\"type\":\"string\",\"optional\":false},{\"name\":\"value\",\"type\":\"any\",\"optional\":false}],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"loadRelated\":{\"name\":\"loadRelated\",\"async\":true,\"parameters\":[{\"name\":\"fieldName\",\"type\":\"string\",\"optional\":false},{\"name\":\"opts\",\"type\":\"LoadRelatedOptions\",\"optional\":true}],\"returnType\":\"Promise<any>\",\"isStatic\":false,\"isPublic\":true},\"loadRelatedMany\":{\"name\":\"loadRelatedMany\",\"async\":true,\"parameters\":[{\"name\":\"fieldName\",\"type\":\"string\",\"optional\":false},{\"name\":\"opts\",\"type\":\"LoadRelatedOptions\",\"optional\":true}],\"returnType\":\"Promise<any[]>\",\"isStatic\":false,\"isPublic\":true},\"getRelated\":{\"name\":\"getRelated\",\"async\":true,\"parameters\":[{\"name\":\"fieldName\",\"type\":\"string\",\"optional\":false},{\"name\":\"opts\",\"type\":\"LoadRelatedOptions\",\"optional\":true}],\"returnType\":\"Promise<any>\",\"isStatic\":false,\"isPublic\":true},\"getAvailableTools\":{\"name\":\"getAvailableTools\",\"async\":false,\"parameters\":[],\"returnType\":\"AITool[]\",\"isStatic\":false,\"isPublic\":true},\"executeToolCall\":{\"name\":\"executeToolCall\",\"async\":true,\"parameters\":[{\"name\":\"toolCall\",\"type\":\"ToolCall\",\"optional\":false}],\"returnType\":\"Promise<ToolCallResult>\",\"isStatic\":false,\"isPublic\":true},\"remember\":{\"name\":\"remember\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"object\",\"optional\":false}],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"recall\":{\"name\":\"recall\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"object\",\"optional\":false}],\"returnType\":\"Promise\",\"isStatic\":false,\"isPublic\":true},\"recallAll\":{\"name\":\"recallAll\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"object\",\"optional\":true}],\"returnType\":\"Promise<Map<string>>\",\"isStatic\":false,\"isPublic\":true},\"forget\":{\"name\":\"forget\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"object\",\"optional\":false}],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"forgetScope\":{\"name\":\"forgetScope\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"object\",\"optional\":false}],\"returnType\":\"Promise<number>\",\"isStatic\":false,\"isPublic\":true},\"generateEmbeddings\":{\"name\":\"generateEmbeddings\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"GenerateEmbeddingsOptions\",\"optional\":true}],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"getEmbedding\":{\"name\":\"getEmbedding\",\"async\":true,\"parameters\":[{\"name\":\"fieldName\",\"type\":\"string\",\"optional\":false},{\"name\":\"model\",\"type\":\"string\",\"optional\":true}],\"returnType\":\"Promise<number[] | null>\",\"isStatic\":false,\"isPublic\":true},\"hasStaleEmbeddings\":{\"name\":\"hasStaleEmbeddings\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<boolean>\",\"isStatic\":false,\"isPublic\":true},\"clearEmbeddings\":{\"name\":\"clearEmbeddings\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"resolveGovernance\":{\"name\":\"resolveGovernance\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<ResolvedContentGovernance>\",\"isStatic\":false,\"isPublic\":true},\"loadReferences\":{\"name\":\"loadReferences\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"addReference\":{\"name\":\"addReference\",\"async\":true,\"parameters\":[{\"name\":\"content\",\"type\":\"Content | string\",\"optional\":false},{\"name\":\"options\",\"type\":\"object\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"removeReference\":{\"name\":\"removeReference\",\"async\":true,\"parameters\":[{\"name\":\"targetId\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"getReferences\":{\"name\":\"getReferences\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"getReferenceEdges\":{\"name\":\"getReferenceEdges\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<Array<object>>\",\"isStatic\":false,\"isPublic\":true},\"getReferenceDrift\":{\"name\":\"getReferenceDrift\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<Array<object>>\",\"isStatic\":false,\"isPublic\":true},\"isGoverned\":{\"name\":\"isGoverned\",\"async\":false,\"parameters\":[],\"returnType\":\"boolean\",\"isStatic\":false,\"isPublic\":true},\"getFactLinks\":{\"name\":\"getFactLinks\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"object\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"getFacts\":{\"name\":\"getFacts\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"object\",\"optional\":true}],\"returnType\":\"Promise<Fact[]>\",\"isStatic\":false,\"isPublic\":true},\"addFact\":{\"name\":\"addFact\",\"async\":true,\"parameters\":[{\"name\":\"fact\",\"type\":\"Fact | string\",\"optional\":false},{\"name\":\"relationship\",\"type\":\"FactContentRelationship\",\"optional\":true},{\"name\":\"metadata\",\"type\":\"Record<string>\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"removeFact\":{\"name\":\"removeFact\",\"async\":true,\"parameters\":[{\"name\":\"factId\",\"type\":\"string\",\"optional\":false},{\"name\":\"relationship\",\"type\":\"FactContentRelationship\",\"optional\":true}],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"syncFacts\":{\"name\":\"syncFacts\",\"async\":true,\"parameters\":[{\"name\":\"factIds\",\"type\":\"string[]\",\"optional\":false},{\"name\":\"relationship\",\"type\":\"FactContentRelationship\",\"optional\":true}],\"returnType\":\"Promise<object>\",\"isStatic\":false,\"isPublic\":true},\"browseFacts\":{\"name\":\"browseFacts\",\"async\":true,\"parameters\":[{\"name\":\"query\",\"type\":\"any\",\"optional\":true,\"default\":\"\"},{\"name\":\"options\",\"type\":\"object\",\"optional\":true}],\"returnType\":\"Promise<Fact[]>\",\"isStatic\":false,\"isPublic\":true},\"repairFactAudit\":{\"name\":\"repairFactAudit\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"object\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"repairFactAuditAction\":{\"name\":\"repairFactAuditAction\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"object\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"repairFactEvidence\":{\"name\":\"repairFactEvidence\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"FactAuditResourceRepairOptions\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"repairFactEvidenceAction\":{\"name\":\"repairFactEvidenceAction\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"FactAuditResourceRepairOptions\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"recheckFactClaims\":{\"name\":\"recheckFactClaims\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"FactAuditClaimRecheckOptions\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"recheckFactClaimsAction\":{\"name\":\"recheckFactClaimsAction\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"FactAuditClaimRecheckOptions\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"updateFactEvidenceStatus\":{\"name\":\"updateFactEvidenceStatus\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"FactEvidenceStatusUpdateOptions\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"updateFactEvidenceStatusAction\":{\"name\":\"updateFactEvidenceStatusAction\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"FactEvidenceStatusUpdateOptions\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"getFactAuditState\":{\"name\":\"getFactAuditState\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<FactAuditState>\",\"isStatic\":false,\"isPublic\":true},\"getFactAuditStateAction\":{\"name\":\"getFactAuditStateAction\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"getFactsState\":{\"name\":\"getFactsState\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"object\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"syncFactsState\":{\"name\":\"syncFactsState\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"object\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"createVersion\":{\"name\":\"createVersion\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"CreateContentVersionOptions\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"getVersions\":{\"name\":\"getVersions\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"restoreFromVersion\":{\"name\":\"restoreFromVersion\",\"async\":true,\"parameters\":[{\"name\":\"versionNumber\",\"type\":\"number\",\"optional\":false}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"getReviews\":{\"name\":\"getReviews\",\"async\":true,\"parameters\":[{\"name\":\"kind\",\"type\":\"any\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"listReviews\":{\"name\":\"listReviews\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"object\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"getReviewRequirements\":{\"name\":\"getReviewRequirements\",\"async\":true,\"parameters\":[{\"name\":\"profileKey\",\"type\":\"string\",\"optional\":false},{\"name\":\"governance\",\"type\":\"ResolvedContentGovernance\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"getGovernanceState\":{\"name\":\"getGovernanceState\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<ContentGovernanceState>\",\"isStatic\":false,\"isPublic\":true},\"getGovernanceStateAction\":{\"name\":\"getGovernanceStateAction\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"listReviewProfilesAction\":{\"name\":\"listReviewProfilesAction\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"evaluateReviewProfile\":{\"name\":\"evaluateReviewProfile\",\"async\":true,\"parameters\":[{\"name\":\"profileKey\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<ContentReviewProfileEvaluation>\",\"isStatic\":false,\"isPublic\":true},\"evaluateReviewProfileAction\":{\"name\":\"evaluateReviewProfileAction\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"object\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"isReadyForReviewProfile\":{\"name\":\"isReadyForReviewProfile\",\"async\":true,\"parameters\":[{\"name\":\"profileKey\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<boolean>\",\"isStatic\":false,\"isPublic\":true},\"getPublishedTransparency\":{\"name\":\"getPublishedTransparency\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"getPublishedTransparencyAction\":{\"name\":\"getPublishedTransparencyAction\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"previewTransparency\":{\"name\":\"previewTransparency\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"previewTransparencyAction\":{\"name\":\"previewTransparencyAction\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"runReview\":{\"name\":\"runReview\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"RunContentReviewOptions\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"runReviewAction\":{\"name\":\"runReviewAction\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"RunContentReviewOptions\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"reviewFacts\":{\"name\":\"reviewFacts\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"Omit<RunContentReviewOptions, 'kind'>\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"reviewSafety\":{\"name\":\"reviewSafety\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"Omit<RunContentReviewOptions, 'kind'>\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"getCorrections\":{\"name\":\"getCorrections\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"listCorrections\":{\"name\":\"listCorrections\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"issueCorrection\":{\"name\":\"issueCorrection\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"IssueContentCorrectionOptions\",\"optional\":false}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"issueCorrectionAction\":{\"name\":\"issueCorrectionAction\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"IssueContentCorrectionOptions\",\"optional\":false}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"listVersions\":{\"name\":\"listVersions\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"mutateVersionAction\":{\"name\":\"mutateVersionAction\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"any\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"getCategorySegments\":{\"name\":\"getCategorySegments\",\"async\":false,\"parameters\":[],\"returnType\":\"string[]\",\"isStatic\":false,\"isPublic\":true},\"getParentCategory\":{\"name\":\"getParentCategory\",\"async\":false,\"parameters\":[],\"returnType\":\"string | null\",\"isStatic\":false,\"isPublic\":true},\"getRootCategory\":{\"name\":\"getRootCategory\",\"async\":false,\"parameters\":[],\"returnType\":\"string | null\",\"isStatic\":false,\"isPublic\":true},\"getAncestorPaths\":{\"name\":\"getAncestorPaths\",\"async\":false,\"parameters\":[],\"returnType\":\"string[]\",\"isStatic\":false,\"isPublic\":true},\"isInCategory\":{\"name\":\"isInCategory\",\"async\":false,\"parameters\":[{\"name\":\"categoryPath\",\"type\":\"string\",\"optional\":false},{\"name\":\"includeChildren\",\"type\":\"any\",\"optional\":true}],\"returnType\":\"boolean\",\"isStatic\":false,\"isPublic\":true},\"getAssets\":{\"name\":\"getAssets\",\"async\":true,\"parameters\":[{\"name\":\"relationship\",\"type\":\"string\",\"optional\":true}],\"returnType\":\"Promise<Asset[]>\",\"isStatic\":false,\"isPublic\":true},\"addAsset\":{\"name\":\"addAsset\",\"async\":true,\"parameters\":[{\"name\":\"asset\",\"type\":\"Asset\",\"optional\":false},{\"name\":\"relationship\",\"type\":\"any\",\"optional\":true,\"default\":\"attachment\"},{\"name\":\"sortOrder\",\"type\":\"any\",\"optional\":true}],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"removeAsset\":{\"name\":\"removeAsset\",\"async\":true,\"parameters\":[{\"name\":\"assetId\",\"type\":\"string\",\"optional\":false},{\"name\":\"relationship\",\"type\":\"string\",\"optional\":true}],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"getMetadata\":{\"name\":\"getMetadata\",\"async\":false,\"parameters\":[],\"returnType\":\"Record<string>\",\"isStatic\":false,\"isPublic\":true},\"setMetadata\":{\"name\":\"setMetadata\",\"async\":false,\"parameters\":[{\"name\":\"metadata\",\"type\":\"Record<string> | null | undefined\",\"optional\":false}],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"updateMetadata\":{\"name\":\"updateMetadata\",\"async\":false,\"parameters\":[{\"name\":\"patch\",\"type\":\"Partial<Record<string>>\",\"optional\":false}],\"returnType\":\"Record<string>\",\"isStatic\":false,\"isPublic\":true},\"getThumbnail\":{\"name\":\"getThumbnail\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<Image | null>\",\"isStatic\":false,\"isPublic\":true},\"setThumbnail\":{\"name\":\"setThumbnail\",\"async\":true,\"parameters\":[{\"name\":\"image\",\"type\":\"Image\",\"optional\":false}],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"generateThumbnail\":{\"name\":\"generateThumbnail\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"ThumbnailOptions\",\"optional\":false}],\"returnType\":\"Promise<Image>\",\"isStatic\":false,\"isPublic\":true},\"getWordAtTime\":{\"name\":\"getWordAtTime\",\"async\":false,\"parameters\":[{\"name\":\"seconds\",\"type\":\"number\",\"optional\":false}],\"returnType\":\"WordTiming | null\",\"isStatic\":false,\"isPublic\":true}},\"decoratorConfig\":{\"tableStrategy\":\"sti\",\"api\":{\"include\":[\"list\",\"get\",\"create\",\"delete\"]},\"mcp\":{\"include\":[\"list\",\"get\"]},\"cli\":true,\"tenantScoped\":{\"mode\":\"optional\"},\"tableName\":\"contents\"},\"extends\":\"Content\",\"exportName\":\"VoiceOutput\",\"collectionExportName\":\"VoiceOutputCollection\",\"validationRules\":[{\"field\":\"name\",\"rule\":\"required\",\"fieldType\":\"text\"}],\"schema\":{\"tableName\":\"contents\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"contents\\\" (\\n \\\"id\\\" UUID PRIMARY KEY NOT NULL,\\n \\\"slug\\\" TEXT NOT NULL,\\n \\\"context\\\" TEXT NOT NULL DEFAULT '',\\n \\\"_meta_type\\\" TEXT NOT NULL,\\n \\\"_meta_data\\\" JSON,\\n \\\"created_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"updated_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"tenant_id\\\" UUID,\\n \\\"type\\\" TEXT,\\n \\\"variant\\\" TEXT,\\n \\\"file_key\\\" TEXT,\\n \\\"author\\\" TEXT,\\n \\\"name\\\" TEXT DEFAULT '',\\n \\\"title\\\" TEXT,\\n \\\"description\\\" TEXT,\\n \\\"body\\\" TEXT,\\n \\\"body_format\\\" TEXT,\\n \\\"publish_date\\\" TIMESTAMP,\\n \\\"url\\\" TEXT,\\n \\\"source\\\" TEXT,\\n \\\"original_url\\\" TEXT,\\n \\\"language\\\" TEXT,\\n \\\"tags\\\" JSON DEFAULT '[]',\\n \\\"category\\\" TEXT,\\n \\\"status\\\" TEXT DEFAULT 'draft',\\n \\\"state\\\" TEXT DEFAULT 'active',\\n \\\"metadata\\\" JSON DEFAULT '{}',\\n \\\"thumbnail_asset_id\\\" UUID,\\n \\\"voice_profile_id\\\" UUID,\\n \\\"source_text\\\" TEXT DEFAULT '',\\n \\\"audio_asset_id\\\" UUID,\\n \\\"duration\\\" INTEGER DEFAULT 0,\\n \\\"word_timings\\\" JSON DEFAULT '[]',\\n \\\"audio_metadata\\\" JSON\\n);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"_meta_type\":{\"type\":\"TEXT\",\"notNull\":true},\"_meta_data\":{\"type\":\"JSON\",\"notNull\":false},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"tenantId\",\"notNull\":false},\"type\":{\"type\":\"TEXT\",\"notNull\":false},\"variant\":{\"type\":\"TEXT\",\"notNull\":false},\"file_key\":{\"type\":\"TEXT\",\"notNull\":false},\"author\":{\"type\":\"TEXT\",\"notNull\":false},\"name\":{\"type\":\"TEXT\",\"notNull\":false,\"default\":\"\"},\"title\":{\"type\":\"TEXT\",\"notNull\":false},\"description\":{\"type\":\"TEXT\",\"notNull\":false},\"body\":{\"type\":\"TEXT\",\"notNull\":false},\"body_format\":{\"type\":\"TEXT\",\"notNull\":false},\"publish_date\":{\"type\":\"TIMESTAMP\",\"notNull\":false},\"url\":{\"type\":\"TEXT\",\"notNull\":false},\"source\":{\"type\":\"TEXT\",\"notNull\":false},\"original_url\":{\"type\":\"TEXT\",\"notNull\":false},\"language\":{\"type\":\"TEXT\",\"notNull\":false},\"tags\":{\"type\":\"JSON\",\"notNull\":false,\"default\":[]},\"category\":{\"type\":\"TEXT\",\"notNull\":false},\"status\":{\"type\":\"TEXT\",\"notNull\":false,\"default\":\"draft\"},\"state\":{\"type\":\"TEXT\",\"notNull\":false,\"default\":\"active\"},\"metadata\":{\"type\":\"JSON\",\"notNull\":false,\"default\":{}},\"thumbnail_asset_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":false},\"voice_profile_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":false},\"source_text\":{\"type\":\"TEXT\",\"notNull\":false,\"default\":\"\"},\"audio_asset_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":false},\"duration\":{\"type\":\"INTEGER\",\"notNull\":false,\"default\":0},\"word_timings\":{\"type\":\"JSON\",\"notNull\":false,\"default\":[]},\"audio_metadata\":{\"type\":\"JSON\",\"notNull\":false}},\"indexes\":[{\"name\":\"contents_id_idx\",\"columns\":[\"id\"]},{\"name\":\"contents_slug_context_meta_type_idx\",\"columns\":[\"slug\",\"context\",\"_meta_type\"],\"unique\":true},{\"name\":\"contents_meta_type_idx\",\"columns\":[\"_meta_type\"]}],\"version\":\"2bba46d6\"}},\"@happyvertical/smrt-voice:VoiceProfile\":{\"name\":\"voiceprofile\",\"className\":\"VoiceProfile\",\"qualifiedName\":\"@happyvertical/smrt-voice:VoiceProfile\",\"collection\":\"voiceprofiles\",\"filePath\":\"/home/runner/_work/smrt/smrt/packages/voice/src/voice-profile.ts\",\"packageName\":\"@happyvertical/smrt-voice\",\"fields\":{\"created_at\":{\"type\":\"datetime\",\"required\":false},\"updated_at\":{\"type\":\"datetime\",\"required\":false},\"tenantId\":{\"type\":\"text\",\"required\":false,\"_meta\":{\"sqlType\":\"UUID\",\"nullable\":true,\"__tenancy\":{\"isTenantIdField\":true,\"autoFilter\":true,\"required\":false,\"autoPopulate\":true,\"nullable\":true,\"mode\":\"optional\",\"field\":\"tenantId\",\"allowSuperAdminBypass\":false}}},\"name\":{\"type\":\"text\",\"required\":false,\"default\":\"\"},\"description\":{\"type\":\"text\",\"required\":false},\"language\":{\"type\":\"text\",\"required\":false,\"default\":\"en-US\"},\"gender\":{\"type\":\"text\",\"required\":false,\"default\":\"neutral\"},\"designPrompt\":{\"type\":\"text\",\"required\":false},\"sampleAssetId\":{\"type\":\"crossPackageRef\",\"required\":false,\"related\":\"@happyvertical/smrt-assets:Asset\"},\"voiceData\":{\"type\":\"json\",\"required\":false,\"default\":{}},\"defaultSpeed\":{\"type\":\"decimal\",\"required\":false,\"default\":1},\"defaultPitch\":{\"type\":\"integer\",\"required\":false,\"default\":0},\"status\":{\"type\":\"text\",\"required\":false,\"default\":\"pending\"},\"provider\":{\"type\":\"text\",\"required\":false,\"default\":\"qwen3-tts\"},\"errorMessage\":{\"type\":\"text\",\"required\":false}},\"methods\":{\"getAiUsageSnapshot\":{\"name\":\"getAiUsageSnapshot\",\"async\":false,\"parameters\":[],\"returnType\":\"AiUsageSnapshot | undefined\",\"isStatic\":false,\"isPublic\":true},\"resetAiUsage\":{\"name\":\"resetAiUsage\",\"async\":false,\"parameters\":[],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"listAiUsage\":{\"name\":\"listAiUsage\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"AiUsageListOptions\",\"optional\":true}],\"returnType\":\"Promise<SmrtAiUsageRecord[]>\",\"isStatic\":false,\"isPublic\":true},\"summarizeAiUsage\":{\"name\":\"summarizeAiUsage\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"AiUsageSummaryOptions\",\"optional\":true}],\"returnType\":\"Promise<Record<string, AiUsageStats>>\",\"isStatic\":false,\"isPublic\":true},\"destroy\":{\"name\":\"destroy\",\"async\":false,\"parameters\":[],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"markAsPersisted\":{\"name\":\"markAsPersisted\",\"async\":false,\"parameters\":[],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"requireInsertOnSave\":{\"name\":\"requireInsertOnSave\",\"async\":false,\"parameters\":[],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"initialize\":{\"name\":\"initialize\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise\",\"isStatic\":false,\"isPublic\":true},\"loadDataFromDb\":{\"name\":\"loadDataFromDb\",\"async\":true,\"parameters\":[{\"name\":\"data\",\"type\":\"Record<string>\",\"optional\":false}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"getFields\":{\"name\":\"getFields\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<any>\",\"isStatic\":false,\"isPublic\":true},\"toJSON\":{\"name\":\"toJSON\",\"async\":false,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"toPlainObject\":{\"name\":\"toPlainObject\",\"async\":false,\"parameters\":[],\"returnType\":\"Record<string>\",\"isStatic\":false,\"isPublic\":true},\"toPublicJSON\":{\"name\":\"toPublicJSON\",\"async\":false,\"parameters\":[{\"name\":\"options\",\"type\":\"PublicJsonOptions\",\"optional\":true}],\"returnType\":\"Record<string>\",\"isStatic\":false,\"isPublic\":true},\"getId\":{\"name\":\"getId\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"getSlug\":{\"name\":\"getSlug\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"getSavedId\":{\"name\":\"getSavedId\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"isSaved\":{\"name\":\"isSaved\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"save\":{\"name\":\"save\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"classifyConstraintError\":{\"name\":\"classifyConstraintError\",\"async\":false,\"parameters\":[{\"name\":\"message\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"'unique' | 'not_null' | null\",\"isStatic\":true,\"isPublic\":true},\"loadFromId\":{\"name\":\"loadFromId\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"loadFromSlug\":{\"name\":\"loadFromSlug\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"is\":{\"name\":\"is\",\"async\":true,\"parameters\":[{\"name\":\"criteria\",\"type\":\"string\",\"optional\":false},{\"name\":\"options\",\"type\":\"AiOperationOptions\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"do\":{\"name\":\"do\",\"async\":true,\"parameters\":[{\"name\":\"instructions\",\"type\":\"string\",\"optional\":false},{\"name\":\"options\",\"type\":\"AiOperationOptions\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"describe\":{\"name\":\"describe\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"AiOperationOptions\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"delete\":{\"name\":\"delete\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"isRelatedLoaded\":{\"name\":\"isRelatedLoaded\",\"async\":false,\"parameters\":[{\"name\":\"fieldName\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"boolean\",\"isStatic\":false,\"isPublic\":true},\"_setLoadedRelationship\":{\"name\":\"_setLoadedRelationship\",\"async\":false,\"parameters\":[{\"name\":\"fieldName\",\"type\":\"string\",\"optional\":false},{\"name\":\"value\",\"type\":\"any\",\"optional\":false}],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"loadRelated\":{\"name\":\"loadRelated\",\"async\":true,\"parameters\":[{\"name\":\"fieldName\",\"type\":\"string\",\"optional\":false},{\"name\":\"opts\",\"type\":\"LoadRelatedOptions\",\"optional\":true}],\"returnType\":\"Promise<any>\",\"isStatic\":false,\"isPublic\":true},\"loadRelatedMany\":{\"name\":\"loadRelatedMany\",\"async\":true,\"parameters\":[{\"name\":\"fieldName\",\"type\":\"string\",\"optional\":false},{\"name\":\"opts\",\"type\":\"LoadRelatedOptions\",\"optional\":true}],\"returnType\":\"Promise<any[]>\",\"isStatic\":false,\"isPublic\":true},\"getRelated\":{\"name\":\"getRelated\",\"async\":true,\"parameters\":[{\"name\":\"fieldName\",\"type\":\"string\",\"optional\":false},{\"name\":\"opts\",\"type\":\"LoadRelatedOptions\",\"optional\":true}],\"returnType\":\"Promise<any>\",\"isStatic\":false,\"isPublic\":true},\"getAvailableTools\":{\"name\":\"getAvailableTools\",\"async\":false,\"parameters\":[],\"returnType\":\"AITool[]\",\"isStatic\":false,\"isPublic\":true},\"executeToolCall\":{\"name\":\"executeToolCall\",\"async\":true,\"parameters\":[{\"name\":\"toolCall\",\"type\":\"ToolCall\",\"optional\":false}],\"returnType\":\"Promise<ToolCallResult>\",\"isStatic\":false,\"isPublic\":true},\"remember\":{\"name\":\"remember\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"object\",\"optional\":false}],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"recall\":{\"name\":\"recall\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"object\",\"optional\":false}],\"returnType\":\"Promise\",\"isStatic\":false,\"isPublic\":true},\"recallAll\":{\"name\":\"recallAll\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"object\",\"optional\":true}],\"returnType\":\"Promise<Map<string>>\",\"isStatic\":false,\"isPublic\":true},\"forget\":{\"name\":\"forget\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"object\",\"optional\":false}],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"forgetScope\":{\"name\":\"forgetScope\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"object\",\"optional\":false}],\"returnType\":\"Promise<number>\",\"isStatic\":false,\"isPublic\":true},\"generateEmbeddings\":{\"name\":\"generateEmbeddings\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"GenerateEmbeddingsOptions\",\"optional\":true}],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"getEmbedding\":{\"name\":\"getEmbedding\",\"async\":true,\"parameters\":[{\"name\":\"fieldName\",\"type\":\"string\",\"optional\":false},{\"name\":\"model\",\"type\":\"string\",\"optional\":true}],\"returnType\":\"Promise<number[] | null>\",\"isStatic\":false,\"isPublic\":true},\"hasStaleEmbeddings\":{\"name\":\"hasStaleEmbeddings\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<boolean>\",\"isStatic\":false,\"isPublic\":true},\"clearEmbeddings\":{\"name\":\"clearEmbeddings\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true}},\"decoratorConfig\":{\"tableStrategy\":\"sti\",\"api\":{\"include\":[\"list\",\"get\",\"create\",\"update\",\"delete\"]},\"mcp\":{\"include\":[\"list\",\"get\"]},\"cli\":true,\"tenantScoped\":{\"mode\":\"optional\"}},\"extends\":\"SmrtObject\",\"exportName\":\"VoiceProfile\",\"collectionExportName\":\"VoiceProfileCollection\",\"schema\":{\"tableName\":\"voice_profiles\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"voice_profiles\\\" (\\n \\\"id\\\" UUID PRIMARY KEY NOT NULL,\\n \\\"slug\\\" TEXT NOT NULL,\\n \\\"context\\\" TEXT NOT NULL DEFAULT '',\\n \\\"_meta_type\\\" TEXT NOT NULL,\\n \\\"_meta_data\\\" JSON,\\n \\\"created_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"updated_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"tenant_id\\\" UUID,\\n \\\"name\\\" TEXT DEFAULT '',\\n \\\"description\\\" TEXT,\\n \\\"language\\\" TEXT DEFAULT 'en-US',\\n \\\"gender\\\" TEXT DEFAULT 'neutral',\\n \\\"design_prompt\\\" TEXT,\\n \\\"sample_asset_id\\\" UUID,\\n \\\"voice_data\\\" JSON DEFAULT '{}',\\n \\\"default_speed\\\" REAL DEFAULT 1,\\n \\\"default_pitch\\\" INTEGER DEFAULT 0,\\n \\\"status\\\" TEXT DEFAULT 'pending',\\n \\\"provider\\\" TEXT DEFAULT 'qwen3-tts',\\n \\\"error_message\\\" TEXT\\n);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"_meta_type\":{\"type\":\"TEXT\",\"notNull\":true},\"_meta_data\":{\"type\":\"JSON\",\"notNull\":false},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"tenantId\",\"notNull\":false},\"name\":{\"type\":\"TEXT\",\"notNull\":false,\"default\":\"\"},\"description\":{\"type\":\"TEXT\",\"notNull\":false},\"language\":{\"type\":\"TEXT\",\"notNull\":false,\"default\":\"en-US\"},\"gender\":{\"type\":\"TEXT\",\"notNull\":false,\"default\":\"neutral\"},\"design_prompt\":{\"type\":\"TEXT\",\"notNull\":false},\"sample_asset_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":false},\"voice_data\":{\"type\":\"JSON\",\"notNull\":false,\"default\":{}},\"default_speed\":{\"type\":\"REAL\",\"notNull\":false,\"default\":1},\"default_pitch\":{\"type\":\"INTEGER\",\"notNull\":false,\"default\":0},\"status\":{\"type\":\"TEXT\",\"notNull\":false,\"default\":\"pending\"},\"provider\":{\"type\":\"TEXT\",\"notNull\":false,\"default\":\"qwen3-tts\"},\"error_message\":{\"type\":\"TEXT\",\"notNull\":false}},\"indexes\":[{\"name\":\"voice_profiles_id_idx\",\"columns\":[\"id\"]},{\"name\":\"voice_profiles_slug_context_meta_type_idx\",\"columns\":[\"slug\",\"context\",\"_meta_type\"],\"unique\":true},{\"name\":\"voice_profiles_meta_type_idx\",\"columns\":[\"_meta_type\"]}],\"version\":\"b3717c47\"}},\"@happyvertical/smrt-voice:VoiceSample\":{\"name\":\"voicesample\",\"className\":\"VoiceSample\",\"qualifiedName\":\"@happyvertical/smrt-voice:VoiceSample\",\"collection\":\"voicesamples\",\"filePath\":\"/home/runner/_work/smrt/smrt/packages/voice/src/voice-sample.ts\",\"packageName\":\"@happyvertical/smrt-voice\",\"fields\":{\"created_at\":{\"type\":\"datetime\",\"required\":false},\"updated_at\":{\"type\":\"datetime\",\"required\":false},\"tenantId\":{\"type\":\"text\",\"required\":false,\"_meta\":{\"sqlType\":\"UUID\",\"nullable\":true,\"__tenancy\":{\"isTenantIdField\":true,\"autoFilter\":true,\"required\":false,\"autoPopulate\":true,\"nullable\":true,\"mode\":\"optional\",\"field\":\"tenantId\",\"allowSuperAdminBypass\":false}}},\"voiceProfileId\":{\"type\":\"foreignKey\",\"required\":false,\"related\":\"() => VoiceProfile\"},\"assetId\":{\"type\":\"crossPackageRef\",\"required\":false,\"related\":\"@happyvertical/smrt-assets:Asset\"},\"duration\":{\"type\":\"integer\",\"required\":false,\"default\":0},\"transcription\":{\"type\":\"text\",\"required\":false},\"quality\":{\"type\":\"text\",\"required\":false,\"default\":\"medium\"},\"sampleRate\":{\"type\":\"integer\",\"required\":false},\"channels\":{\"type\":\"integer\",\"required\":false},\"format\":{\"type\":\"text\",\"required\":false},\"isPrimary\":{\"type\":\"boolean\",\"required\":false,\"default\":false}},\"methods\":{\"getAiUsageSnapshot\":{\"name\":\"getAiUsageSnapshot\",\"async\":false,\"parameters\":[],\"returnType\":\"AiUsageSnapshot | undefined\",\"isStatic\":false,\"isPublic\":true},\"resetAiUsage\":{\"name\":\"resetAiUsage\",\"async\":false,\"parameters\":[],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"listAiUsage\":{\"name\":\"listAiUsage\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"AiUsageListOptions\",\"optional\":true}],\"returnType\":\"Promise<SmrtAiUsageRecord[]>\",\"isStatic\":false,\"isPublic\":true},\"summarizeAiUsage\":{\"name\":\"summarizeAiUsage\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"AiUsageSummaryOptions\",\"optional\":true}],\"returnType\":\"Promise<Record<string, AiUsageStats>>\",\"isStatic\":false,\"isPublic\":true},\"destroy\":{\"name\":\"destroy\",\"async\":false,\"parameters\":[],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"markAsPersisted\":{\"name\":\"markAsPersisted\",\"async\":false,\"parameters\":[],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"requireInsertOnSave\":{\"name\":\"requireInsertOnSave\",\"async\":false,\"parameters\":[],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"initialize\":{\"name\":\"initialize\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise\",\"isStatic\":false,\"isPublic\":true},\"loadDataFromDb\":{\"name\":\"loadDataFromDb\",\"async\":true,\"parameters\":[{\"name\":\"data\",\"type\":\"Record<string>\",\"optional\":false}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"getFields\":{\"name\":\"getFields\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<any>\",\"isStatic\":false,\"isPublic\":true},\"toJSON\":{\"name\":\"toJSON\",\"async\":false,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"toPlainObject\":{\"name\":\"toPlainObject\",\"async\":false,\"parameters\":[],\"returnType\":\"Record<string>\",\"isStatic\":false,\"isPublic\":true},\"toPublicJSON\":{\"name\":\"toPublicJSON\",\"async\":false,\"parameters\":[{\"name\":\"options\",\"type\":\"PublicJsonOptions\",\"optional\":true}],\"returnType\":\"Record<string>\",\"isStatic\":false,\"isPublic\":true},\"getId\":{\"name\":\"getId\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"getSlug\":{\"name\":\"getSlug\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"getSavedId\":{\"name\":\"getSavedId\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"isSaved\":{\"name\":\"isSaved\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"save\":{\"name\":\"save\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"classifyConstraintError\":{\"name\":\"classifyConstraintError\",\"async\":false,\"parameters\":[{\"name\":\"message\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"'unique' | 'not_null' | null\",\"isStatic\":true,\"isPublic\":true},\"loadFromId\":{\"name\":\"loadFromId\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"loadFromSlug\":{\"name\":\"loadFromSlug\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"is\":{\"name\":\"is\",\"async\":true,\"parameters\":[{\"name\":\"criteria\",\"type\":\"string\",\"optional\":false},{\"name\":\"options\",\"type\":\"AiOperationOptions\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"do\":{\"name\":\"do\",\"async\":true,\"parameters\":[{\"name\":\"instructions\",\"type\":\"string\",\"optional\":false},{\"name\":\"options\",\"type\":\"AiOperationOptions\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"describe\":{\"name\":\"describe\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"AiOperationOptions\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"delete\":{\"name\":\"delete\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"isRelatedLoaded\":{\"name\":\"isRelatedLoaded\",\"async\":false,\"parameters\":[{\"name\":\"fieldName\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"boolean\",\"isStatic\":false,\"isPublic\":true},\"_setLoadedRelationship\":{\"name\":\"_setLoadedRelationship\",\"async\":false,\"parameters\":[{\"name\":\"fieldName\",\"type\":\"string\",\"optional\":false},{\"name\":\"value\",\"type\":\"any\",\"optional\":false}],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"loadRelated\":{\"name\":\"loadRelated\",\"async\":true,\"parameters\":[{\"name\":\"fieldName\",\"type\":\"string\",\"optional\":false},{\"name\":\"opts\",\"type\":\"LoadRelatedOptions\",\"optional\":true}],\"returnType\":\"Promise<any>\",\"isStatic\":false,\"isPublic\":true},\"loadRelatedMany\":{\"name\":\"loadRelatedMany\",\"async\":true,\"parameters\":[{\"name\":\"fieldName\",\"type\":\"string\",\"optional\":false},{\"name\":\"opts\",\"type\":\"LoadRelatedOptions\",\"optional\":true}],\"returnType\":\"Promise<any[]>\",\"isStatic\":false,\"isPublic\":true},\"getRelated\":{\"name\":\"getRelated\",\"async\":true,\"parameters\":[{\"name\":\"fieldName\",\"type\":\"string\",\"optional\":false},{\"name\":\"opts\",\"type\":\"LoadRelatedOptions\",\"optional\":true}],\"returnType\":\"Promise<any>\",\"isStatic\":false,\"isPublic\":true},\"getAvailableTools\":{\"name\":\"getAvailableTools\",\"async\":false,\"parameters\":[],\"returnType\":\"AITool[]\",\"isStatic\":false,\"isPublic\":true},\"executeToolCall\":{\"name\":\"executeToolCall\",\"async\":true,\"parameters\":[{\"name\":\"toolCall\",\"type\":\"ToolCall\",\"optional\":false}],\"returnType\":\"Promise<ToolCallResult>\",\"isStatic\":false,\"isPublic\":true},\"remember\":{\"name\":\"remember\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"object\",\"optional\":false}],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"recall\":{\"name\":\"recall\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"object\",\"optional\":false}],\"returnType\":\"Promise\",\"isStatic\":false,\"isPublic\":true},\"recallAll\":{\"name\":\"recallAll\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"object\",\"optional\":true}],\"returnType\":\"Promise<Map<string>>\",\"isStatic\":false,\"isPublic\":true},\"forget\":{\"name\":\"forget\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"object\",\"optional\":false}],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"forgetScope\":{\"name\":\"forgetScope\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"object\",\"optional\":false}],\"returnType\":\"Promise<number>\",\"isStatic\":false,\"isPublic\":true},\"generateEmbeddings\":{\"name\":\"generateEmbeddings\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"GenerateEmbeddingsOptions\",\"optional\":true}],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"getEmbedding\":{\"name\":\"getEmbedding\",\"async\":true,\"parameters\":[{\"name\":\"fieldName\",\"type\":\"string\",\"optional\":false},{\"name\":\"model\",\"type\":\"string\",\"optional\":true}],\"returnType\":\"Promise<number[] | null>\",\"isStatic\":false,\"isPublic\":true},\"hasStaleEmbeddings\":{\"name\":\"hasStaleEmbeddings\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<boolean>\",\"isStatic\":false,\"isPublic\":true},\"clearEmbeddings\":{\"name\":\"clearEmbeddings\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true}},\"decoratorConfig\":{\"tableStrategy\":\"sti\",\"api\":{\"include\":[\"list\",\"get\",\"create\",\"delete\"]},\"mcp\":{\"include\":[\"list\",\"get\"]},\"cli\":true,\"tenantScoped\":{\"mode\":\"optional\"}},\"extends\":\"SmrtObject\",\"exportName\":\"VoiceSample\",\"collectionExportName\":\"VoiceSampleCollection\",\"schema\":{\"tableName\":\"voice_samples\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"voice_samples\\\" (\\n \\\"id\\\" UUID PRIMARY KEY NOT NULL,\\n \\\"slug\\\" TEXT NOT NULL,\\n \\\"context\\\" TEXT NOT NULL DEFAULT '',\\n \\\"_meta_type\\\" TEXT NOT NULL,\\n \\\"_meta_data\\\" JSON,\\n \\\"created_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"updated_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"tenant_id\\\" UUID,\\n \\\"voice_profile_id\\\" UUID,\\n \\\"asset_id\\\" UUID,\\n \\\"duration\\\" INTEGER DEFAULT 0,\\n \\\"transcription\\\" TEXT,\\n \\\"quality\\\" TEXT DEFAULT 'medium',\\n \\\"sample_rate\\\" INTEGER,\\n \\\"channels\\\" INTEGER,\\n \\\"format\\\" TEXT,\\n \\\"is_primary\\\" BOOLEAN DEFAULT FALSE\\n);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"_meta_type\":{\"type\":\"TEXT\",\"notNull\":true},\"_meta_data\":{\"type\":\"JSON\",\"notNull\":false},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"tenantId\",\"notNull\":false},\"voice_profile_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":false},\"asset_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":false},\"duration\":{\"type\":\"INTEGER\",\"notNull\":false,\"default\":0},\"transcription\":{\"type\":\"TEXT\",\"notNull\":false},\"quality\":{\"type\":\"TEXT\",\"notNull\":false,\"default\":\"medium\"},\"sample_rate\":{\"type\":\"INTEGER\",\"notNull\":false},\"channels\":{\"type\":\"INTEGER\",\"notNull\":false},\"format\":{\"type\":\"TEXT\",\"notNull\":false},\"is_primary\":{\"type\":\"BOOLEAN\",\"notNull\":false,\"default\":false}},\"indexes\":[{\"name\":\"voice_samples_id_idx\",\"columns\":[\"id\"]},{\"name\":\"voice_samples_slug_context_meta_type_idx\",\"columns\":[\"slug\",\"context\",\"_meta_type\"],\"unique\":true},{\"name\":\"voice_samples_meta_type_idx\",\"columns\":[\"_meta_type\"]}],\"version\":\"f593a3a1\"}}},\"moduleType\":\"smrt\",\"smrtDependencies\":[\"@happyvertical/smrt-assets\",\"@happyvertical/smrt-content\",\"@happyvertical/smrt-core\",\"@happyvertical/smrt-tenancy\"]}"));
5
+ ObjectRegistry.registerPackageManifest(JSON.parse("{\"version\":\"1.0.0\",\"timestamp\":1783646499813,\"packageName\":\"@happyvertical/smrt-voice\",\"packageVersion\":\"0.38.25\",\"objects\":{\"@happyvertical/smrt-voice:VoiceOutput\":{\"name\":\"voiceoutput\",\"className\":\"VoiceOutput\",\"qualifiedName\":\"@happyvertical/smrt-voice:VoiceOutput\",\"collection\":\"contents\",\"filePath\":\"/home/runner/_work/smrt/smrt/packages/voice/src/voice-output.ts\",\"packageName\":\"@happyvertical/smrt-voice\",\"fields\":{\"created_at\":{\"type\":\"datetime\",\"required\":false},\"updated_at\":{\"type\":\"datetime\",\"required\":false},\"tenantId\":{\"type\":\"text\",\"required\":false,\"_meta\":{\"generated\":true,\"source\":\"tenantScoped_decorator\",\"sqlType\":\"UUID\",\"__tenancy\":{\"isTenantIdField\":true,\"mode\":\"optional\",\"field\":\"tenantId\",\"autoFilter\":true,\"autoPopulate\":true,\"allowSuperAdminBypass\":false}}},\"type\":{\"type\":\"text\",\"required\":false},\"variant\":{\"type\":\"text\",\"required\":false},\"fileKey\":{\"type\":\"text\",\"required\":false},\"author\":{\"type\":\"text\",\"required\":false},\"name\":{\"type\":\"text\",\"required\":true,\"default\":\"\",\"_meta\":{\"required\":true}},\"title\":{\"type\":\"text\",\"required\":false},\"description\":{\"type\":\"text\",\"required\":false},\"body\":{\"type\":\"text\",\"required\":false},\"bodyFormat\":{\"type\":\"text\",\"required\":false},\"publish_date\":{\"type\":\"datetime\",\"required\":false},\"url\":{\"type\":\"text\",\"required\":false},\"source\":{\"type\":\"text\",\"required\":false},\"original_url\":{\"type\":\"text\",\"required\":false},\"language\":{\"type\":\"text\",\"required\":false},\"tags\":{\"type\":\"json\",\"required\":false,\"default\":[]},\"category\":{\"type\":\"text\",\"required\":false},\"status\":{\"type\":\"text\",\"required\":false,\"default\":\"draft\"},\"state\":{\"type\":\"text\",\"required\":false,\"default\":\"active\"},\"metadata\":{\"type\":\"json\",\"required\":false,\"default\":{}},\"thumbnailAssetId\":{\"type\":\"crossPackageRef\",\"required\":false,\"related\":\"@happyvertical/smrt-assets:Asset\"},\"voiceProfileId\":{\"type\":\"foreignKey\",\"required\":false,\"related\":\"() => VoiceProfile\"},\"sourceText\":{\"type\":\"text\",\"required\":false,\"default\":\"\"},\"audioAssetId\":{\"type\":\"crossPackageRef\",\"required\":false,\"related\":\"@happyvertical/smrt-assets:Asset\"},\"duration\":{\"type\":\"integer\",\"required\":false,\"default\":0},\"wordTimings\":{\"type\":\"json\",\"required\":false,\"default\":[]},\"audioMetadata\":{\"type\":\"json\",\"required\":false}},\"methods\":{\"getAiUsageSnapshot\":{\"name\":\"getAiUsageSnapshot\",\"async\":false,\"parameters\":[],\"returnType\":\"AiUsageSnapshot | undefined\",\"isStatic\":false,\"isPublic\":true},\"resetAiUsage\":{\"name\":\"resetAiUsage\",\"async\":false,\"parameters\":[],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"listAiUsage\":{\"name\":\"listAiUsage\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"AiUsageListOptions\",\"optional\":true}],\"returnType\":\"Promise<SmrtAiUsageRecord[]>\",\"isStatic\":false,\"isPublic\":true},\"summarizeAiUsage\":{\"name\":\"summarizeAiUsage\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"AiUsageSummaryOptions\",\"optional\":true}],\"returnType\":\"Promise<Record<string, AiUsageStats>>\",\"isStatic\":false,\"isPublic\":true},\"destroy\":{\"name\":\"destroy\",\"async\":false,\"parameters\":[],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"markAsPersisted\":{\"name\":\"markAsPersisted\",\"async\":false,\"parameters\":[],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"requireInsertOnSave\":{\"name\":\"requireInsertOnSave\",\"async\":false,\"parameters\":[],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"initialize\":{\"name\":\"initialize\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise\",\"isStatic\":false,\"isPublic\":true},\"loadDataFromDb\":{\"name\":\"loadDataFromDb\",\"async\":true,\"parameters\":[{\"name\":\"data\",\"type\":\"Record<string>\",\"optional\":false}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"getFields\":{\"name\":\"getFields\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<any>\",\"isStatic\":false,\"isPublic\":true},\"toJSON\":{\"name\":\"toJSON\",\"async\":false,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"toPlainObject\":{\"name\":\"toPlainObject\",\"async\":false,\"parameters\":[],\"returnType\":\"Record<string>\",\"isStatic\":false,\"isPublic\":true},\"toPublicJSON\":{\"name\":\"toPublicJSON\",\"async\":false,\"parameters\":[{\"name\":\"options\",\"type\":\"PublicJsonOptions\",\"optional\":true}],\"returnType\":\"Record<string>\",\"isStatic\":false,\"isPublic\":true},\"getId\":{\"name\":\"getId\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"getSlug\":{\"name\":\"getSlug\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"getSavedId\":{\"name\":\"getSavedId\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"isSaved\":{\"name\":\"isSaved\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"save\":{\"name\":\"save\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"classifyConstraintError\":{\"name\":\"classifyConstraintError\",\"async\":false,\"parameters\":[{\"name\":\"message\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"'unique' | 'not_null' | null\",\"isStatic\":true,\"isPublic\":true},\"loadFromId\":{\"name\":\"loadFromId\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"loadFromSlug\":{\"name\":\"loadFromSlug\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"is\":{\"name\":\"is\",\"async\":true,\"parameters\":[{\"name\":\"criteria\",\"type\":\"string\",\"optional\":false},{\"name\":\"options\",\"type\":\"AiOperationOptions\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"do\":{\"name\":\"do\",\"async\":true,\"parameters\":[{\"name\":\"instructions\",\"type\":\"string\",\"optional\":false},{\"name\":\"options\",\"type\":\"AiOperationOptions\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"describe\":{\"name\":\"describe\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"AiOperationOptions\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"delete\":{\"name\":\"delete\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"isRelatedLoaded\":{\"name\":\"isRelatedLoaded\",\"async\":false,\"parameters\":[{\"name\":\"fieldName\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"boolean\",\"isStatic\":false,\"isPublic\":true},\"_setLoadedRelationship\":{\"name\":\"_setLoadedRelationship\",\"async\":false,\"parameters\":[{\"name\":\"fieldName\",\"type\":\"string\",\"optional\":false},{\"name\":\"value\",\"type\":\"any\",\"optional\":false}],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"loadRelated\":{\"name\":\"loadRelated\",\"async\":true,\"parameters\":[{\"name\":\"fieldName\",\"type\":\"string\",\"optional\":false},{\"name\":\"opts\",\"type\":\"LoadRelatedOptions\",\"optional\":true}],\"returnType\":\"Promise<any>\",\"isStatic\":false,\"isPublic\":true},\"loadRelatedMany\":{\"name\":\"loadRelatedMany\",\"async\":true,\"parameters\":[{\"name\":\"fieldName\",\"type\":\"string\",\"optional\":false},{\"name\":\"opts\",\"type\":\"LoadRelatedOptions\",\"optional\":true}],\"returnType\":\"Promise<any[]>\",\"isStatic\":false,\"isPublic\":true},\"getRelated\":{\"name\":\"getRelated\",\"async\":true,\"parameters\":[{\"name\":\"fieldName\",\"type\":\"string\",\"optional\":false},{\"name\":\"opts\",\"type\":\"LoadRelatedOptions\",\"optional\":true}],\"returnType\":\"Promise<any>\",\"isStatic\":false,\"isPublic\":true},\"getAvailableTools\":{\"name\":\"getAvailableTools\",\"async\":false,\"parameters\":[],\"returnType\":\"AITool[]\",\"isStatic\":false,\"isPublic\":true},\"executeToolCall\":{\"name\":\"executeToolCall\",\"async\":true,\"parameters\":[{\"name\":\"toolCall\",\"type\":\"ToolCall\",\"optional\":false}],\"returnType\":\"Promise<ToolCallResult>\",\"isStatic\":false,\"isPublic\":true},\"remember\":{\"name\":\"remember\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"object\",\"optional\":false}],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"recall\":{\"name\":\"recall\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"object\",\"optional\":false}],\"returnType\":\"Promise\",\"isStatic\":false,\"isPublic\":true},\"recallAll\":{\"name\":\"recallAll\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"object\",\"optional\":true}],\"returnType\":\"Promise<Map<string>>\",\"isStatic\":false,\"isPublic\":true},\"forget\":{\"name\":\"forget\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"object\",\"optional\":false}],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"forgetScope\":{\"name\":\"forgetScope\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"object\",\"optional\":false}],\"returnType\":\"Promise<number>\",\"isStatic\":false,\"isPublic\":true},\"generateEmbeddings\":{\"name\":\"generateEmbeddings\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"GenerateEmbeddingsOptions\",\"optional\":true}],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"getEmbedding\":{\"name\":\"getEmbedding\",\"async\":true,\"parameters\":[{\"name\":\"fieldName\",\"type\":\"string\",\"optional\":false},{\"name\":\"model\",\"type\":\"string\",\"optional\":true}],\"returnType\":\"Promise<number[] | null>\",\"isStatic\":false,\"isPublic\":true},\"hasStaleEmbeddings\":{\"name\":\"hasStaleEmbeddings\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<boolean>\",\"isStatic\":false,\"isPublic\":true},\"clearEmbeddings\":{\"name\":\"clearEmbeddings\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"resolveGovernance\":{\"name\":\"resolveGovernance\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<ResolvedContentGovernance>\",\"isStatic\":false,\"isPublic\":true},\"loadReferences\":{\"name\":\"loadReferences\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"addReference\":{\"name\":\"addReference\",\"async\":true,\"parameters\":[{\"name\":\"content\",\"type\":\"Content | string\",\"optional\":false},{\"name\":\"options\",\"type\":\"object\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"removeReference\":{\"name\":\"removeReference\",\"async\":true,\"parameters\":[{\"name\":\"targetId\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"getReferences\":{\"name\":\"getReferences\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"getReferenceEdges\":{\"name\":\"getReferenceEdges\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<Array<object>>\",\"isStatic\":false,\"isPublic\":true},\"getReferenceDrift\":{\"name\":\"getReferenceDrift\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<Array<object>>\",\"isStatic\":false,\"isPublic\":true},\"isGoverned\":{\"name\":\"isGoverned\",\"async\":false,\"parameters\":[],\"returnType\":\"boolean\",\"isStatic\":false,\"isPublic\":true},\"getFactLinks\":{\"name\":\"getFactLinks\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"object\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"getFacts\":{\"name\":\"getFacts\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"object\",\"optional\":true}],\"returnType\":\"Promise<Fact[]>\",\"isStatic\":false,\"isPublic\":true},\"addFact\":{\"name\":\"addFact\",\"async\":true,\"parameters\":[{\"name\":\"fact\",\"type\":\"Fact | string\",\"optional\":false},{\"name\":\"relationship\",\"type\":\"FactContentRelationship\",\"optional\":true},{\"name\":\"metadata\",\"type\":\"Record<string>\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"removeFact\":{\"name\":\"removeFact\",\"async\":true,\"parameters\":[{\"name\":\"factId\",\"type\":\"string\",\"optional\":false},{\"name\":\"relationship\",\"type\":\"FactContentRelationship\",\"optional\":true}],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"syncFacts\":{\"name\":\"syncFacts\",\"async\":true,\"parameters\":[{\"name\":\"factIds\",\"type\":\"string[]\",\"optional\":false},{\"name\":\"relationship\",\"type\":\"FactContentRelationship\",\"optional\":true}],\"returnType\":\"Promise<object>\",\"isStatic\":false,\"isPublic\":true},\"browseFacts\":{\"name\":\"browseFacts\",\"async\":true,\"parameters\":[{\"name\":\"query\",\"type\":\"any\",\"optional\":true,\"default\":\"\"},{\"name\":\"options\",\"type\":\"object\",\"optional\":true}],\"returnType\":\"Promise<Fact[]>\",\"isStatic\":false,\"isPublic\":true},\"repairFactAudit\":{\"name\":\"repairFactAudit\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"object\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"repairFactAuditAction\":{\"name\":\"repairFactAuditAction\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"object\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"repairFactEvidence\":{\"name\":\"repairFactEvidence\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"FactAuditResourceRepairOptions\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"repairFactEvidenceAction\":{\"name\":\"repairFactEvidenceAction\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"FactAuditResourceRepairOptions\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"recheckFactClaims\":{\"name\":\"recheckFactClaims\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"FactAuditClaimRecheckOptions\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"recheckFactClaimsAction\":{\"name\":\"recheckFactClaimsAction\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"FactAuditClaimRecheckOptions\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"updateFactEvidenceStatus\":{\"name\":\"updateFactEvidenceStatus\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"FactEvidenceStatusUpdateOptions\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"updateFactEvidenceStatusAction\":{\"name\":\"updateFactEvidenceStatusAction\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"FactEvidenceStatusUpdateOptions\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"getFactAuditState\":{\"name\":\"getFactAuditState\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<FactAuditState>\",\"isStatic\":false,\"isPublic\":true},\"getFactAuditStateAction\":{\"name\":\"getFactAuditStateAction\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"getFactsState\":{\"name\":\"getFactsState\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"object\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"syncFactsState\":{\"name\":\"syncFactsState\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"object\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"createVersion\":{\"name\":\"createVersion\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"CreateContentVersionOptions\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"getVersions\":{\"name\":\"getVersions\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"restoreFromVersion\":{\"name\":\"restoreFromVersion\",\"async\":true,\"parameters\":[{\"name\":\"versionNumber\",\"type\":\"number\",\"optional\":false}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"getReviews\":{\"name\":\"getReviews\",\"async\":true,\"parameters\":[{\"name\":\"kind\",\"type\":\"any\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"listReviews\":{\"name\":\"listReviews\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"object\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"getReviewRequirements\":{\"name\":\"getReviewRequirements\",\"async\":true,\"parameters\":[{\"name\":\"profileKey\",\"type\":\"string\",\"optional\":false},{\"name\":\"governance\",\"type\":\"ResolvedContentGovernance\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"getGovernanceState\":{\"name\":\"getGovernanceState\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<ContentGovernanceState>\",\"isStatic\":false,\"isPublic\":true},\"getGovernanceStateAction\":{\"name\":\"getGovernanceStateAction\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"listReviewProfilesAction\":{\"name\":\"listReviewProfilesAction\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"evaluateReviewProfile\":{\"name\":\"evaluateReviewProfile\",\"async\":true,\"parameters\":[{\"name\":\"profileKey\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<ContentReviewProfileEvaluation>\",\"isStatic\":false,\"isPublic\":true},\"evaluateReviewProfileAction\":{\"name\":\"evaluateReviewProfileAction\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"object\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"isReadyForReviewProfile\":{\"name\":\"isReadyForReviewProfile\",\"async\":true,\"parameters\":[{\"name\":\"profileKey\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<boolean>\",\"isStatic\":false,\"isPublic\":true},\"getPublishedTransparency\":{\"name\":\"getPublishedTransparency\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"getPublishedTransparencyAction\":{\"name\":\"getPublishedTransparencyAction\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"previewTransparency\":{\"name\":\"previewTransparency\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"previewTransparencyAction\":{\"name\":\"previewTransparencyAction\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"runReview\":{\"name\":\"runReview\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"RunContentReviewOptions\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"runReviewAction\":{\"name\":\"runReviewAction\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"RunContentReviewOptions\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"reviewFacts\":{\"name\":\"reviewFacts\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"Omit<RunContentReviewOptions, 'kind'>\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"reviewSafety\":{\"name\":\"reviewSafety\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"Omit<RunContentReviewOptions, 'kind'>\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"getCorrections\":{\"name\":\"getCorrections\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"listCorrections\":{\"name\":\"listCorrections\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"issueCorrection\":{\"name\":\"issueCorrection\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"IssueContentCorrectionOptions\",\"optional\":false}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"issueCorrectionAction\":{\"name\":\"issueCorrectionAction\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"IssueContentCorrectionOptions\",\"optional\":false}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"listVersions\":{\"name\":\"listVersions\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"mutateVersionAction\":{\"name\":\"mutateVersionAction\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"any\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"getCategorySegments\":{\"name\":\"getCategorySegments\",\"async\":false,\"parameters\":[],\"returnType\":\"string[]\",\"isStatic\":false,\"isPublic\":true},\"getParentCategory\":{\"name\":\"getParentCategory\",\"async\":false,\"parameters\":[],\"returnType\":\"string | null\",\"isStatic\":false,\"isPublic\":true},\"getRootCategory\":{\"name\":\"getRootCategory\",\"async\":false,\"parameters\":[],\"returnType\":\"string | null\",\"isStatic\":false,\"isPublic\":true},\"getAncestorPaths\":{\"name\":\"getAncestorPaths\",\"async\":false,\"parameters\":[],\"returnType\":\"string[]\",\"isStatic\":false,\"isPublic\":true},\"isInCategory\":{\"name\":\"isInCategory\",\"async\":false,\"parameters\":[{\"name\":\"categoryPath\",\"type\":\"string\",\"optional\":false},{\"name\":\"includeChildren\",\"type\":\"any\",\"optional\":true}],\"returnType\":\"boolean\",\"isStatic\":false,\"isPublic\":true},\"getAssets\":{\"name\":\"getAssets\",\"async\":true,\"parameters\":[{\"name\":\"relationship\",\"type\":\"string\",\"optional\":true}],\"returnType\":\"Promise<Asset[]>\",\"isStatic\":false,\"isPublic\":true},\"addAsset\":{\"name\":\"addAsset\",\"async\":true,\"parameters\":[{\"name\":\"asset\",\"type\":\"Asset\",\"optional\":false},{\"name\":\"relationship\",\"type\":\"any\",\"optional\":true,\"default\":\"attachment\"},{\"name\":\"sortOrder\",\"type\":\"any\",\"optional\":true}],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"removeAsset\":{\"name\":\"removeAsset\",\"async\":true,\"parameters\":[{\"name\":\"assetId\",\"type\":\"string\",\"optional\":false},{\"name\":\"relationship\",\"type\":\"string\",\"optional\":true}],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"getMetadata\":{\"name\":\"getMetadata\",\"async\":false,\"parameters\":[],\"returnType\":\"Record<string>\",\"isStatic\":false,\"isPublic\":true},\"setMetadata\":{\"name\":\"setMetadata\",\"async\":false,\"parameters\":[{\"name\":\"metadata\",\"type\":\"Record<string> | null | undefined\",\"optional\":false}],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"updateMetadata\":{\"name\":\"updateMetadata\",\"async\":false,\"parameters\":[{\"name\":\"patch\",\"type\":\"Partial<Record<string>>\",\"optional\":false}],\"returnType\":\"Record<string>\",\"isStatic\":false,\"isPublic\":true},\"getThumbnail\":{\"name\":\"getThumbnail\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<Image | null>\",\"isStatic\":false,\"isPublic\":true},\"setThumbnail\":{\"name\":\"setThumbnail\",\"async\":true,\"parameters\":[{\"name\":\"image\",\"type\":\"Image\",\"optional\":false}],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"generateThumbnail\":{\"name\":\"generateThumbnail\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"ThumbnailOptions\",\"optional\":false}],\"returnType\":\"Promise<Image>\",\"isStatic\":false,\"isPublic\":true},\"getWordAtTime\":{\"name\":\"getWordAtTime\",\"async\":false,\"parameters\":[{\"name\":\"seconds\",\"type\":\"number\",\"optional\":false}],\"returnType\":\"WordTiming | null\",\"isStatic\":false,\"isPublic\":true},\"fromSynthesizedSpeech\":{\"name\":\"fromSynthesizedSpeech\",\"async\":false,\"parameters\":[{\"name\":\"options\",\"type\":\"VoiceOutputFromSynthesizedSpeechOptions\",\"optional\":false}],\"returnType\":\"VoiceOutput\",\"isStatic\":true,\"isPublic\":true}},\"decoratorConfig\":{\"tableStrategy\":\"sti\",\"api\":{\"include\":[\"list\",\"get\",\"create\",\"delete\"]},\"mcp\":{\"include\":[\"list\",\"get\"]},\"cli\":true,\"tenantScoped\":{\"mode\":\"optional\"},\"tableName\":\"contents\"},\"extends\":\"Content\",\"exportName\":\"VoiceOutput\",\"collectionExportName\":\"VoiceOutputCollection\",\"validationRules\":[{\"field\":\"name\",\"rule\":\"required\",\"fieldType\":\"text\"}],\"schema\":{\"tableName\":\"contents\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"contents\\\" (\\n \\\"id\\\" UUID PRIMARY KEY NOT NULL,\\n \\\"slug\\\" TEXT NOT NULL,\\n \\\"context\\\" TEXT NOT NULL DEFAULT '',\\n \\\"_meta_type\\\" TEXT NOT NULL,\\n \\\"_meta_data\\\" JSON,\\n \\\"created_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"updated_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"tenant_id\\\" UUID,\\n \\\"type\\\" TEXT,\\n \\\"variant\\\" TEXT,\\n \\\"file_key\\\" TEXT,\\n \\\"author\\\" TEXT,\\n \\\"name\\\" TEXT DEFAULT '',\\n \\\"title\\\" TEXT,\\n \\\"description\\\" TEXT,\\n \\\"body\\\" TEXT,\\n \\\"body_format\\\" TEXT,\\n \\\"publish_date\\\" TIMESTAMP,\\n \\\"url\\\" TEXT,\\n \\\"source\\\" TEXT,\\n \\\"original_url\\\" TEXT,\\n \\\"language\\\" TEXT,\\n \\\"tags\\\" JSON DEFAULT '[]',\\n \\\"category\\\" TEXT,\\n \\\"status\\\" TEXT DEFAULT 'draft',\\n \\\"state\\\" TEXT DEFAULT 'active',\\n \\\"metadata\\\" JSON DEFAULT '{}',\\n \\\"thumbnail_asset_id\\\" UUID,\\n \\\"voice_profile_id\\\" UUID,\\n \\\"source_text\\\" TEXT DEFAULT '',\\n \\\"audio_asset_id\\\" UUID,\\n \\\"duration\\\" INTEGER DEFAULT 0,\\n \\\"word_timings\\\" JSON DEFAULT '[]',\\n \\\"audio_metadata\\\" JSON\\n);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"_meta_type\":{\"type\":\"TEXT\",\"notNull\":true},\"_meta_data\":{\"type\":\"JSON\",\"notNull\":false},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"tenantId\",\"notNull\":false},\"type\":{\"type\":\"TEXT\",\"notNull\":false},\"variant\":{\"type\":\"TEXT\",\"notNull\":false},\"file_key\":{\"type\":\"TEXT\",\"notNull\":false},\"author\":{\"type\":\"TEXT\",\"notNull\":false},\"name\":{\"type\":\"TEXT\",\"notNull\":false,\"default\":\"\"},\"title\":{\"type\":\"TEXT\",\"notNull\":false},\"description\":{\"type\":\"TEXT\",\"notNull\":false},\"body\":{\"type\":\"TEXT\",\"notNull\":false},\"body_format\":{\"type\":\"TEXT\",\"notNull\":false},\"publish_date\":{\"type\":\"TIMESTAMP\",\"notNull\":false},\"url\":{\"type\":\"TEXT\",\"notNull\":false},\"source\":{\"type\":\"TEXT\",\"notNull\":false},\"original_url\":{\"type\":\"TEXT\",\"notNull\":false},\"language\":{\"type\":\"TEXT\",\"notNull\":false},\"tags\":{\"type\":\"JSON\",\"notNull\":false,\"default\":[]},\"category\":{\"type\":\"TEXT\",\"notNull\":false},\"status\":{\"type\":\"TEXT\",\"notNull\":false,\"default\":\"draft\"},\"state\":{\"type\":\"TEXT\",\"notNull\":false,\"default\":\"active\"},\"metadata\":{\"type\":\"JSON\",\"notNull\":false,\"default\":{}},\"thumbnail_asset_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":false},\"voice_profile_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":false},\"source_text\":{\"type\":\"TEXT\",\"notNull\":false,\"default\":\"\"},\"audio_asset_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":false},\"duration\":{\"type\":\"INTEGER\",\"notNull\":false,\"default\":0},\"word_timings\":{\"type\":\"JSON\",\"notNull\":false,\"default\":[]},\"audio_metadata\":{\"type\":\"JSON\",\"notNull\":false}},\"indexes\":[{\"name\":\"contents_id_idx\",\"columns\":[\"id\"]},{\"name\":\"contents_slug_context_meta_type_idx\",\"columns\":[\"slug\",\"context\",\"_meta_type\"],\"unique\":true},{\"name\":\"contents_meta_type_idx\",\"columns\":[\"_meta_type\"]}],\"version\":\"2bba46d6\"}},\"@happyvertical/smrt-voice:VoiceProfile\":{\"name\":\"voiceprofile\",\"className\":\"VoiceProfile\",\"qualifiedName\":\"@happyvertical/smrt-voice:VoiceProfile\",\"collection\":\"voiceprofiles\",\"filePath\":\"/home/runner/_work/smrt/smrt/packages/voice/src/voice-profile.ts\",\"packageName\":\"@happyvertical/smrt-voice\",\"fields\":{\"created_at\":{\"type\":\"datetime\",\"required\":false},\"updated_at\":{\"type\":\"datetime\",\"required\":false},\"tenantId\":{\"type\":\"text\",\"required\":false,\"_meta\":{\"sqlType\":\"UUID\",\"nullable\":true,\"__tenancy\":{\"isTenantIdField\":true,\"autoFilter\":true,\"required\":false,\"autoPopulate\":true,\"nullable\":true,\"mode\":\"optional\",\"field\":\"tenantId\",\"allowSuperAdminBypass\":false}}},\"name\":{\"type\":\"text\",\"required\":false,\"default\":\"\"},\"description\":{\"type\":\"text\",\"required\":false},\"language\":{\"type\":\"text\",\"required\":false,\"default\":\"en-US\"},\"gender\":{\"type\":\"text\",\"required\":false,\"default\":\"neutral\"},\"designPrompt\":{\"type\":\"text\",\"required\":false},\"sampleAssetId\":{\"type\":\"crossPackageRef\",\"required\":false,\"related\":\"@happyvertical/smrt-assets:Asset\"},\"voiceData\":{\"type\":\"json\",\"required\":false,\"default\":{}},\"defaultSpeed\":{\"type\":\"decimal\",\"required\":false,\"default\":1},\"defaultPitch\":{\"type\":\"integer\",\"required\":false,\"default\":0},\"status\":{\"type\":\"text\",\"required\":false,\"default\":\"pending\"},\"provider\":{\"type\":\"text\",\"required\":false,\"default\":\"qwen3-tts\"},\"errorMessage\":{\"type\":\"text\",\"required\":false}},\"methods\":{\"getAiUsageSnapshot\":{\"name\":\"getAiUsageSnapshot\",\"async\":false,\"parameters\":[],\"returnType\":\"AiUsageSnapshot | undefined\",\"isStatic\":false,\"isPublic\":true},\"resetAiUsage\":{\"name\":\"resetAiUsage\",\"async\":false,\"parameters\":[],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"listAiUsage\":{\"name\":\"listAiUsage\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"AiUsageListOptions\",\"optional\":true}],\"returnType\":\"Promise<SmrtAiUsageRecord[]>\",\"isStatic\":false,\"isPublic\":true},\"summarizeAiUsage\":{\"name\":\"summarizeAiUsage\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"AiUsageSummaryOptions\",\"optional\":true}],\"returnType\":\"Promise<Record<string, AiUsageStats>>\",\"isStatic\":false,\"isPublic\":true},\"destroy\":{\"name\":\"destroy\",\"async\":false,\"parameters\":[],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"markAsPersisted\":{\"name\":\"markAsPersisted\",\"async\":false,\"parameters\":[],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"requireInsertOnSave\":{\"name\":\"requireInsertOnSave\",\"async\":false,\"parameters\":[],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"initialize\":{\"name\":\"initialize\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise\",\"isStatic\":false,\"isPublic\":true},\"loadDataFromDb\":{\"name\":\"loadDataFromDb\",\"async\":true,\"parameters\":[{\"name\":\"data\",\"type\":\"Record<string>\",\"optional\":false}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"getFields\":{\"name\":\"getFields\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<any>\",\"isStatic\":false,\"isPublic\":true},\"toJSON\":{\"name\":\"toJSON\",\"async\":false,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"toPlainObject\":{\"name\":\"toPlainObject\",\"async\":false,\"parameters\":[],\"returnType\":\"Record<string>\",\"isStatic\":false,\"isPublic\":true},\"toPublicJSON\":{\"name\":\"toPublicJSON\",\"async\":false,\"parameters\":[{\"name\":\"options\",\"type\":\"PublicJsonOptions\",\"optional\":true}],\"returnType\":\"Record<string>\",\"isStatic\":false,\"isPublic\":true},\"getId\":{\"name\":\"getId\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"getSlug\":{\"name\":\"getSlug\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"getSavedId\":{\"name\":\"getSavedId\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"isSaved\":{\"name\":\"isSaved\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"save\":{\"name\":\"save\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"classifyConstraintError\":{\"name\":\"classifyConstraintError\",\"async\":false,\"parameters\":[{\"name\":\"message\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"'unique' | 'not_null' | null\",\"isStatic\":true,\"isPublic\":true},\"loadFromId\":{\"name\":\"loadFromId\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"loadFromSlug\":{\"name\":\"loadFromSlug\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"is\":{\"name\":\"is\",\"async\":true,\"parameters\":[{\"name\":\"criteria\",\"type\":\"string\",\"optional\":false},{\"name\":\"options\",\"type\":\"AiOperationOptions\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"do\":{\"name\":\"do\",\"async\":true,\"parameters\":[{\"name\":\"instructions\",\"type\":\"string\",\"optional\":false},{\"name\":\"options\",\"type\":\"AiOperationOptions\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"describe\":{\"name\":\"describe\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"AiOperationOptions\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"delete\":{\"name\":\"delete\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"isRelatedLoaded\":{\"name\":\"isRelatedLoaded\",\"async\":false,\"parameters\":[{\"name\":\"fieldName\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"boolean\",\"isStatic\":false,\"isPublic\":true},\"_setLoadedRelationship\":{\"name\":\"_setLoadedRelationship\",\"async\":false,\"parameters\":[{\"name\":\"fieldName\",\"type\":\"string\",\"optional\":false},{\"name\":\"value\",\"type\":\"any\",\"optional\":false}],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"loadRelated\":{\"name\":\"loadRelated\",\"async\":true,\"parameters\":[{\"name\":\"fieldName\",\"type\":\"string\",\"optional\":false},{\"name\":\"opts\",\"type\":\"LoadRelatedOptions\",\"optional\":true}],\"returnType\":\"Promise<any>\",\"isStatic\":false,\"isPublic\":true},\"loadRelatedMany\":{\"name\":\"loadRelatedMany\",\"async\":true,\"parameters\":[{\"name\":\"fieldName\",\"type\":\"string\",\"optional\":false},{\"name\":\"opts\",\"type\":\"LoadRelatedOptions\",\"optional\":true}],\"returnType\":\"Promise<any[]>\",\"isStatic\":false,\"isPublic\":true},\"getRelated\":{\"name\":\"getRelated\",\"async\":true,\"parameters\":[{\"name\":\"fieldName\",\"type\":\"string\",\"optional\":false},{\"name\":\"opts\",\"type\":\"LoadRelatedOptions\",\"optional\":true}],\"returnType\":\"Promise<any>\",\"isStatic\":false,\"isPublic\":true},\"getAvailableTools\":{\"name\":\"getAvailableTools\",\"async\":false,\"parameters\":[],\"returnType\":\"AITool[]\",\"isStatic\":false,\"isPublic\":true},\"executeToolCall\":{\"name\":\"executeToolCall\",\"async\":true,\"parameters\":[{\"name\":\"toolCall\",\"type\":\"ToolCall\",\"optional\":false}],\"returnType\":\"Promise<ToolCallResult>\",\"isStatic\":false,\"isPublic\":true},\"remember\":{\"name\":\"remember\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"object\",\"optional\":false}],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"recall\":{\"name\":\"recall\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"object\",\"optional\":false}],\"returnType\":\"Promise\",\"isStatic\":false,\"isPublic\":true},\"recallAll\":{\"name\":\"recallAll\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"object\",\"optional\":true}],\"returnType\":\"Promise<Map<string>>\",\"isStatic\":false,\"isPublic\":true},\"forget\":{\"name\":\"forget\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"object\",\"optional\":false}],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"forgetScope\":{\"name\":\"forgetScope\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"object\",\"optional\":false}],\"returnType\":\"Promise<number>\",\"isStatic\":false,\"isPublic\":true},\"generateEmbeddings\":{\"name\":\"generateEmbeddings\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"GenerateEmbeddingsOptions\",\"optional\":true}],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"getEmbedding\":{\"name\":\"getEmbedding\",\"async\":true,\"parameters\":[{\"name\":\"fieldName\",\"type\":\"string\",\"optional\":false},{\"name\":\"model\",\"type\":\"string\",\"optional\":true}],\"returnType\":\"Promise<number[] | null>\",\"isStatic\":false,\"isPublic\":true},\"hasStaleEmbeddings\":{\"name\":\"hasStaleEmbeddings\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<boolean>\",\"isStatic\":false,\"isPublic\":true},\"clearEmbeddings\":{\"name\":\"clearEmbeddings\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"toSpeechVoice\":{\"name\":\"toSpeechVoice\",\"async\":false,\"parameters\":[],\"returnType\":\"SpeechVoice\",\"isStatic\":false,\"isPublic\":true}},\"decoratorConfig\":{\"tableStrategy\":\"sti\",\"api\":{\"include\":[\"list\",\"get\",\"create\",\"update\",\"delete\"]},\"mcp\":{\"include\":[\"list\",\"get\"]},\"cli\":true,\"tenantScoped\":{\"mode\":\"optional\"}},\"extends\":\"SmrtObject\",\"exportName\":\"VoiceProfile\",\"collectionExportName\":\"VoiceProfileCollection\",\"schema\":{\"tableName\":\"voice_profiles\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"voice_profiles\\\" (\\n \\\"id\\\" UUID PRIMARY KEY NOT NULL,\\n \\\"slug\\\" TEXT NOT NULL,\\n \\\"context\\\" TEXT NOT NULL DEFAULT '',\\n \\\"_meta_type\\\" TEXT NOT NULL,\\n \\\"_meta_data\\\" JSON,\\n \\\"created_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"updated_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"tenant_id\\\" UUID,\\n \\\"name\\\" TEXT DEFAULT '',\\n \\\"description\\\" TEXT,\\n \\\"language\\\" TEXT DEFAULT 'en-US',\\n \\\"gender\\\" TEXT DEFAULT 'neutral',\\n \\\"design_prompt\\\" TEXT,\\n \\\"sample_asset_id\\\" UUID,\\n \\\"voice_data\\\" JSON DEFAULT '{}',\\n \\\"default_speed\\\" REAL DEFAULT 1,\\n \\\"default_pitch\\\" INTEGER DEFAULT 0,\\n \\\"status\\\" TEXT DEFAULT 'pending',\\n \\\"provider\\\" TEXT DEFAULT 'qwen3-tts',\\n \\\"error_message\\\" TEXT\\n);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"_meta_type\":{\"type\":\"TEXT\",\"notNull\":true},\"_meta_data\":{\"type\":\"JSON\",\"notNull\":false},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"tenantId\",\"notNull\":false},\"name\":{\"type\":\"TEXT\",\"notNull\":false,\"default\":\"\"},\"description\":{\"type\":\"TEXT\",\"notNull\":false},\"language\":{\"type\":\"TEXT\",\"notNull\":false,\"default\":\"en-US\"},\"gender\":{\"type\":\"TEXT\",\"notNull\":false,\"default\":\"neutral\"},\"design_prompt\":{\"type\":\"TEXT\",\"notNull\":false},\"sample_asset_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":false},\"voice_data\":{\"type\":\"JSON\",\"notNull\":false,\"default\":{}},\"default_speed\":{\"type\":\"REAL\",\"notNull\":false,\"default\":1},\"default_pitch\":{\"type\":\"INTEGER\",\"notNull\":false,\"default\":0},\"status\":{\"type\":\"TEXT\",\"notNull\":false,\"default\":\"pending\"},\"provider\":{\"type\":\"TEXT\",\"notNull\":false,\"default\":\"qwen3-tts\"},\"error_message\":{\"type\":\"TEXT\",\"notNull\":false}},\"indexes\":[{\"name\":\"voice_profiles_id_idx\",\"columns\":[\"id\"]},{\"name\":\"voice_profiles_slug_context_meta_type_idx\",\"columns\":[\"slug\",\"context\",\"_meta_type\"],\"unique\":true},{\"name\":\"voice_profiles_meta_type_idx\",\"columns\":[\"_meta_type\"]}],\"version\":\"b3717c47\"}},\"@happyvertical/smrt-voice:VoiceSample\":{\"name\":\"voicesample\",\"className\":\"VoiceSample\",\"qualifiedName\":\"@happyvertical/smrt-voice:VoiceSample\",\"collection\":\"voicesamples\",\"filePath\":\"/home/runner/_work/smrt/smrt/packages/voice/src/voice-sample.ts\",\"packageName\":\"@happyvertical/smrt-voice\",\"fields\":{\"created_at\":{\"type\":\"datetime\",\"required\":false},\"updated_at\":{\"type\":\"datetime\",\"required\":false},\"tenantId\":{\"type\":\"text\",\"required\":false,\"_meta\":{\"sqlType\":\"UUID\",\"nullable\":true,\"__tenancy\":{\"isTenantIdField\":true,\"autoFilter\":true,\"required\":false,\"autoPopulate\":true,\"nullable\":true,\"mode\":\"optional\",\"field\":\"tenantId\",\"allowSuperAdminBypass\":false}}},\"voiceProfileId\":{\"type\":\"foreignKey\",\"required\":false,\"related\":\"() => VoiceProfile\"},\"assetId\":{\"type\":\"crossPackageRef\",\"required\":false,\"related\":\"@happyvertical/smrt-assets:Asset\"},\"duration\":{\"type\":\"integer\",\"required\":false,\"default\":0},\"transcription\":{\"type\":\"text\",\"required\":false},\"quality\":{\"type\":\"text\",\"required\":false,\"default\":\"medium\"},\"sampleRate\":{\"type\":\"integer\",\"required\":false},\"channels\":{\"type\":\"integer\",\"required\":false},\"format\":{\"type\":\"text\",\"required\":false},\"isPrimary\":{\"type\":\"boolean\",\"required\":false,\"default\":false}},\"methods\":{\"getAiUsageSnapshot\":{\"name\":\"getAiUsageSnapshot\",\"async\":false,\"parameters\":[],\"returnType\":\"AiUsageSnapshot | undefined\",\"isStatic\":false,\"isPublic\":true},\"resetAiUsage\":{\"name\":\"resetAiUsage\",\"async\":false,\"parameters\":[],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"listAiUsage\":{\"name\":\"listAiUsage\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"AiUsageListOptions\",\"optional\":true}],\"returnType\":\"Promise<SmrtAiUsageRecord[]>\",\"isStatic\":false,\"isPublic\":true},\"summarizeAiUsage\":{\"name\":\"summarizeAiUsage\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"AiUsageSummaryOptions\",\"optional\":true}],\"returnType\":\"Promise<Record<string, AiUsageStats>>\",\"isStatic\":false,\"isPublic\":true},\"destroy\":{\"name\":\"destroy\",\"async\":false,\"parameters\":[],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"markAsPersisted\":{\"name\":\"markAsPersisted\",\"async\":false,\"parameters\":[],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"requireInsertOnSave\":{\"name\":\"requireInsertOnSave\",\"async\":false,\"parameters\":[],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"initialize\":{\"name\":\"initialize\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise\",\"isStatic\":false,\"isPublic\":true},\"loadDataFromDb\":{\"name\":\"loadDataFromDb\",\"async\":true,\"parameters\":[{\"name\":\"data\",\"type\":\"Record<string>\",\"optional\":false}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"getFields\":{\"name\":\"getFields\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<any>\",\"isStatic\":false,\"isPublic\":true},\"toJSON\":{\"name\":\"toJSON\",\"async\":false,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"toPlainObject\":{\"name\":\"toPlainObject\",\"async\":false,\"parameters\":[],\"returnType\":\"Record<string>\",\"isStatic\":false,\"isPublic\":true},\"toPublicJSON\":{\"name\":\"toPublicJSON\",\"async\":false,\"parameters\":[{\"name\":\"options\",\"type\":\"PublicJsonOptions\",\"optional\":true}],\"returnType\":\"Record<string>\",\"isStatic\":false,\"isPublic\":true},\"getId\":{\"name\":\"getId\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"getSlug\":{\"name\":\"getSlug\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"getSavedId\":{\"name\":\"getSavedId\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"isSaved\":{\"name\":\"isSaved\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"save\":{\"name\":\"save\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"classifyConstraintError\":{\"name\":\"classifyConstraintError\",\"async\":false,\"parameters\":[{\"name\":\"message\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"'unique' | 'not_null' | null\",\"isStatic\":true,\"isPublic\":true},\"loadFromId\":{\"name\":\"loadFromId\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"loadFromSlug\":{\"name\":\"loadFromSlug\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"is\":{\"name\":\"is\",\"async\":true,\"parameters\":[{\"name\":\"criteria\",\"type\":\"string\",\"optional\":false},{\"name\":\"options\",\"type\":\"AiOperationOptions\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"do\":{\"name\":\"do\",\"async\":true,\"parameters\":[{\"name\":\"instructions\",\"type\":\"string\",\"optional\":false},{\"name\":\"options\",\"type\":\"AiOperationOptions\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"describe\":{\"name\":\"describe\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"AiOperationOptions\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"delete\":{\"name\":\"delete\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"isRelatedLoaded\":{\"name\":\"isRelatedLoaded\",\"async\":false,\"parameters\":[{\"name\":\"fieldName\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"boolean\",\"isStatic\":false,\"isPublic\":true},\"_setLoadedRelationship\":{\"name\":\"_setLoadedRelationship\",\"async\":false,\"parameters\":[{\"name\":\"fieldName\",\"type\":\"string\",\"optional\":false},{\"name\":\"value\",\"type\":\"any\",\"optional\":false}],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"loadRelated\":{\"name\":\"loadRelated\",\"async\":true,\"parameters\":[{\"name\":\"fieldName\",\"type\":\"string\",\"optional\":false},{\"name\":\"opts\",\"type\":\"LoadRelatedOptions\",\"optional\":true}],\"returnType\":\"Promise<any>\",\"isStatic\":false,\"isPublic\":true},\"loadRelatedMany\":{\"name\":\"loadRelatedMany\",\"async\":true,\"parameters\":[{\"name\":\"fieldName\",\"type\":\"string\",\"optional\":false},{\"name\":\"opts\",\"type\":\"LoadRelatedOptions\",\"optional\":true}],\"returnType\":\"Promise<any[]>\",\"isStatic\":false,\"isPublic\":true},\"getRelated\":{\"name\":\"getRelated\",\"async\":true,\"parameters\":[{\"name\":\"fieldName\",\"type\":\"string\",\"optional\":false},{\"name\":\"opts\",\"type\":\"LoadRelatedOptions\",\"optional\":true}],\"returnType\":\"Promise<any>\",\"isStatic\":false,\"isPublic\":true},\"getAvailableTools\":{\"name\":\"getAvailableTools\",\"async\":false,\"parameters\":[],\"returnType\":\"AITool[]\",\"isStatic\":false,\"isPublic\":true},\"executeToolCall\":{\"name\":\"executeToolCall\",\"async\":true,\"parameters\":[{\"name\":\"toolCall\",\"type\":\"ToolCall\",\"optional\":false}],\"returnType\":\"Promise<ToolCallResult>\",\"isStatic\":false,\"isPublic\":true},\"remember\":{\"name\":\"remember\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"object\",\"optional\":false}],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"recall\":{\"name\":\"recall\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"object\",\"optional\":false}],\"returnType\":\"Promise\",\"isStatic\":false,\"isPublic\":true},\"recallAll\":{\"name\":\"recallAll\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"object\",\"optional\":true}],\"returnType\":\"Promise<Map<string>>\",\"isStatic\":false,\"isPublic\":true},\"forget\":{\"name\":\"forget\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"object\",\"optional\":false}],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"forgetScope\":{\"name\":\"forgetScope\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"object\",\"optional\":false}],\"returnType\":\"Promise<number>\",\"isStatic\":false,\"isPublic\":true},\"generateEmbeddings\":{\"name\":\"generateEmbeddings\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"GenerateEmbeddingsOptions\",\"optional\":true}],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"getEmbedding\":{\"name\":\"getEmbedding\",\"async\":true,\"parameters\":[{\"name\":\"fieldName\",\"type\":\"string\",\"optional\":false},{\"name\":\"model\",\"type\":\"string\",\"optional\":true}],\"returnType\":\"Promise<number[] | null>\",\"isStatic\":false,\"isPublic\":true},\"hasStaleEmbeddings\":{\"name\":\"hasStaleEmbeddings\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<boolean>\",\"isStatic\":false,\"isPublic\":true},\"clearEmbeddings\":{\"name\":\"clearEmbeddings\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true}},\"decoratorConfig\":{\"tableStrategy\":\"sti\",\"api\":{\"include\":[\"list\",\"get\",\"create\",\"delete\"]},\"mcp\":{\"include\":[\"list\",\"get\"]},\"cli\":true,\"tenantScoped\":{\"mode\":\"optional\"}},\"extends\":\"SmrtObject\",\"exportName\":\"VoiceSample\",\"collectionExportName\":\"VoiceSampleCollection\",\"schema\":{\"tableName\":\"voice_samples\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"voice_samples\\\" (\\n \\\"id\\\" UUID PRIMARY KEY NOT NULL,\\n \\\"slug\\\" TEXT NOT NULL,\\n \\\"context\\\" TEXT NOT NULL DEFAULT '',\\n \\\"_meta_type\\\" TEXT NOT NULL,\\n \\\"_meta_data\\\" JSON,\\n \\\"created_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"updated_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"tenant_id\\\" UUID,\\n \\\"voice_profile_id\\\" UUID,\\n \\\"asset_id\\\" UUID,\\n \\\"duration\\\" INTEGER DEFAULT 0,\\n \\\"transcription\\\" TEXT,\\n \\\"quality\\\" TEXT DEFAULT 'medium',\\n \\\"sample_rate\\\" INTEGER,\\n \\\"channels\\\" INTEGER,\\n \\\"format\\\" TEXT,\\n \\\"is_primary\\\" BOOLEAN DEFAULT FALSE\\n);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"_meta_type\":{\"type\":\"TEXT\",\"notNull\":true},\"_meta_data\":{\"type\":\"JSON\",\"notNull\":false},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"tenantId\",\"notNull\":false},\"voice_profile_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":false},\"asset_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":false},\"duration\":{\"type\":\"INTEGER\",\"notNull\":false,\"default\":0},\"transcription\":{\"type\":\"TEXT\",\"notNull\":false},\"quality\":{\"type\":\"TEXT\",\"notNull\":false,\"default\":\"medium\"},\"sample_rate\":{\"type\":\"INTEGER\",\"notNull\":false},\"channels\":{\"type\":\"INTEGER\",\"notNull\":false},\"format\":{\"type\":\"TEXT\",\"notNull\":false},\"is_primary\":{\"type\":\"BOOLEAN\",\"notNull\":false,\"default\":false}},\"indexes\":[{\"name\":\"voice_samples_id_idx\",\"columns\":[\"id\"]},{\"name\":\"voice_samples_slug_context_meta_type_idx\",\"columns\":[\"slug\",\"context\",\"_meta_type\"],\"unique\":true},{\"name\":\"voice_samples_meta_type_idx\",\"columns\":[\"_meta_type\"]}],\"version\":\"f593a3a1\"}}},\"moduleType\":\"smrt\",\"smrtDependencies\":[\"@happyvertical/smrt-assets\",\"@happyvertical/smrt-content\",\"@happyvertical/smrt-core\",\"@happyvertical/smrt-tenancy\"]}"));
6
6
  //#endregion
7
7
  //#region src/voice-profile.ts
8
8
  var __defProp$2 = Object.defineProperty;
@@ -108,6 +108,28 @@ var VoiceProfile = class extends SmrtObject {
108
108
  get isGlobal() {
109
109
  return this.tenantId === null;
110
110
  }
111
+ /**
112
+ * Convert this persisted profile into the runtime voice shape consumed by
113
+ * @happyvertical/speech adapters.
114
+ */
115
+ toSpeechVoice() {
116
+ const voiceData = isRecord(this.voiceData) ? this.voiceData : {};
117
+ const prompt = stringValue(voiceData.prompt) ?? stringValue(voiceData.voicePrompt);
118
+ const speakerId = stringValue(voiceData.speakerId) ?? stringValue(voiceData.speaker) ?? stringValue(voiceData.providerVoiceId);
119
+ return {
120
+ id: stringValue(voiceData.id) ?? stringValue(voiceData.voiceId) ?? stringValue(this.id),
121
+ name: this.name || void 0,
122
+ language: this.language || void 0,
123
+ speakerId,
124
+ prompt,
125
+ metadata: {
126
+ ...voiceData,
127
+ provider: this.provider,
128
+ defaultSpeed: this.defaultSpeed,
129
+ defaultPitch: this.defaultPitch
130
+ }
131
+ };
132
+ }
111
133
  };
112
134
  __decorateClass$2([tenantId({ nullable: true })], VoiceProfile.prototype, "tenantId", 2);
113
135
  __decorateClass$2([crossPackageRef("@happyvertical/smrt-assets:Asset")], VoiceProfile.prototype, "sampleAssetId", 2);
@@ -123,6 +145,12 @@ VoiceProfile = __decorateClass$2([TenantScoped({ mode: "optional" }), smrt({
123
145
  mcp: { include: ["list", "get"] },
124
146
  cli: true
125
147
  })], VoiceProfile);
148
+ function isRecord(value) {
149
+ return value !== null && typeof value === "object" && !Array.isArray(value);
150
+ }
151
+ function stringValue(value) {
152
+ return typeof value === "string" && value.length > 0 ? value : void 0;
153
+ }
126
154
  //#endregion
127
155
  //#region src/voice-output.ts
128
156
  var __defProp$1 = Object.defineProperty;
@@ -190,6 +218,24 @@ var VoiceOutput = class extends Content {
190
218
  if (!this.wordTimings) return null;
191
219
  return this.wordTimings.find((wt) => seconds >= wt.start && seconds < wt.end) ?? null;
192
220
  }
221
+ /**
222
+ * Build a persisted output model from a provider-neutral speech result.
223
+ *
224
+ * The binary audio remains in the caller-owned asset pipeline; this helper
225
+ * only normalizes metadata and timing fields onto the SMRT model.
226
+ */
227
+ static fromSynthesizedSpeech(options) {
228
+ const { speech, audioMetadata, duration, wordTimings, ...rest } = options;
229
+ return new VoiceOutput({
230
+ ...rest,
231
+ duration: duration ?? speech.durationSeconds ?? 0,
232
+ wordTimings: wordTimings ?? wordTimingsFromSpeech(speech.words),
233
+ audioMetadata: {
234
+ ...metadataFromSynthesizedSpeech(speech),
235
+ ...audioMetadata
236
+ }
237
+ });
238
+ }
193
239
  };
194
240
  __decorateClass$1([foreignKey(() => VoiceProfile)], VoiceOutput.prototype, "voiceProfileId", 2);
195
241
  __decorateClass$1([crossPackageRef("@happyvertical/smrt-assets:Asset")], VoiceOutput.prototype, "audioAssetId", 2);
@@ -204,6 +250,32 @@ VoiceOutput = __decorateClass$1([TenantScoped({ mode: "optional" }), smrt({
204
250
  mcp: { include: ["list", "get"] },
205
251
  cli: true
206
252
  })], VoiceOutput);
253
+ function wordTimingsFromSpeech(words) {
254
+ if (!words || words.length === 0) return null;
255
+ return words.map((word) => ({
256
+ word: word.word,
257
+ start: word.startSeconds,
258
+ end: word.endSeconds,
259
+ confidence: word.confidence,
260
+ speakerId: word.speakerId
261
+ }));
262
+ }
263
+ function metadataFromSynthesizedSpeech(speech) {
264
+ return {
265
+ sampleRate: speech.sampleRate,
266
+ format: speech.format ?? formatFromContentType(speech.contentType),
267
+ contentType: speech.contentType,
268
+ channels: speech.channels,
269
+ fileSize: speech.audio.byteLength,
270
+ provider: speech.provider,
271
+ model: speech.model
272
+ };
273
+ }
274
+ function formatFromContentType(contentType) {
275
+ const normalized = contentType.split(";", 1)[0]?.trim().toLowerCase();
276
+ if (!normalized?.startsWith("audio/")) return;
277
+ return normalized.slice(6);
278
+ }
207
279
  //#endregion
208
280
  //#region src/voice-sample.ts
209
281
  var __defProp = Object.defineProperty;
@@ -291,6 +363,6 @@ VoiceSample = __decorateClass([TenantScoped({ mode: "optional" }), smrt({
291
363
  cli: true
292
364
  })], VoiceSample);
293
365
  //#endregion
294
- export { VoiceOutput, VoiceProfile, VoiceSample };
366
+ export { VoiceOutput, VoiceProfile, VoiceSample, metadataFromSynthesizedSpeech, wordTimingsFromSpeech };
295
367
 
296
368
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../src/__smrt-register__.ts","../src/voice-profile.ts","../src/voice-output.ts","../src/voice-sample.ts"],"sourcesContent":["/**\n * Self-registers this package's build-time manifest before any @smrt() decorator\n * in the package fires. Fixes issue #1132: in consumer runtimes (tsx, SvelteKit\n * SSR, plain `vite dev`) the decorator's synchronous manifest lookup previously\n * missed because no step populated the global manifest cache — classes got\n * registered with zero fields and `save()` / `toJSON()` silently dropped every\n * declared property.\n *\n * Import this module as the first statement in `src/index.ts` so its top-level\n * side effect runs ahead of any class module's @smrt() decorator.\n *\n * Silent no-op in dev/test, where the vitest plugin already populates manifests\n * via a different path. Only needs to succeed in the published dist output.\n *\n * @see https://github.com/happyvertical/smrt/issues/1132\n */\nimport { ObjectRegistry } from '@happyvertical/smrt-core';\n\n// During library builds, smrtPlugin replaces this entire module with generated\n// code that embeds the scanned manifest inline (#1506/#1507) — published dists\n// never resolve this URL, so downstream bundlers cannot break registration by\n// relocating the compiled module away from dist/manifest.json. The runtime\n// lookup below is the fallback for source-mode runs without that transform.\nObjectRegistry.registerPackageManifest(\n new URL('./manifest.json', import.meta.url),\n);\n","/**\n * Voice Profile Model\n *\n * Manages voice profiles for AI-powered voice synthesis and cloning.\n * Supports voice design via natural language descriptions and voice\n * cloning from audio samples.\n */\n\nimport type { SmrtObjectOptions } from '@happyvertical/smrt-core';\nimport { crossPackageRef, SmrtObject, smrt } from '@happyvertical/smrt-core';\nimport { TenantScoped, tenantId } from '@happyvertical/smrt-tenancy';\n\n/**\n * Voice profile status\n */\nexport type VoiceProfileStatus = 'pending' | 'processing' | 'ready' | 'failed';\n\n/**\n * Voice gender classification\n */\nexport type VoiceGender = 'male' | 'female' | 'neutral';\n\n/**\n * Voice profile creation options\n */\nexport interface VoiceProfileOptions extends SmrtObjectOptions {\n /**\n * Human-readable name for the voice profile\n */\n name?: string;\n\n /**\n * Description of the voice characteristics\n */\n description?: string | null;\n\n /**\n * ISO language code (e.g., 'en-US', 'zh-CN')\n */\n language?: string;\n\n /**\n * Voice gender classification\n * @default 'neutral'\n */\n gender?: VoiceGender;\n\n /**\n * Natural language description for voice design\n * Used when creating a voice from scratch\n */\n designPrompt?: string | null;\n\n /**\n * Asset ID of the audio sample for voice cloning\n * Should be at least 3 seconds of clear speech\n */\n sampleAssetId?: string | null;\n\n /**\n * Provider-specific voice data (ID, embedding, etc.)\n * Stored after voice creation/cloning\n */\n voiceData?: Record<string, unknown> | null;\n\n /**\n * Default speech speed multiplier\n * @default 1.0\n */\n defaultSpeed?: number;\n\n /**\n * Default pitch adjustment in semitones\n * @default 0\n */\n defaultPitch?: number;\n\n /**\n * Voice profile status\n * @default 'pending'\n */\n status?: VoiceProfileStatus;\n\n /**\n * TTS provider that created this voice\n * @default 'qwen3-tts'\n */\n provider?: string;\n\n /**\n * Error message if status is 'failed'\n */\n errorMessage?: string | null;\n\n /**\n * Tenant ID for multi-tenant isolation\n * Null for global/default voices\n */\n tenantId?: string | null;\n}\n\n/**\n * Voice profile for AI-powered speech synthesis\n *\n * VoiceProfile represents a configured voice identity that can be used\n * for text-to-speech synthesis. Voices can be created through:\n * - Voice design: Natural language description of desired voice characteristics\n * - Voice cloning: 3+ second audio sample for voice replication\n *\n * @example\n * ```typescript\n * import { VoiceProfile } from '@happyvertical/smrt-voice';\n *\n * // Create a designed voice\n * const anchorVoice = new VoiceProfile({\n * name: 'News Anchor',\n * description: 'Professional news anchor voice with clear enunciation',\n * language: 'en-US',\n * gender: 'male',\n * designPrompt: 'Warm, authoritative male voice with slight gravitas, suitable for news broadcasts',\n * provider: 'qwen3-tts',\n * });\n *\n * // Create a cloned voice\n * const clonedVoice = new VoiceProfile({\n * name: 'Custom Voice',\n * description: 'Cloned from user sample',\n * language: 'en-US',\n * sampleAssetId: 'asset-123',\n * provider: 'qwen3-tts',\n * });\n * ```\n */\n@TenantScoped({ mode: 'optional' })\n@smrt({\n tableStrategy: 'sti',\n api: {\n include: ['list', 'get', 'create', 'update', 'delete'],\n },\n mcp: {\n include: ['list', 'get'],\n },\n cli: true,\n})\nexport class VoiceProfile extends SmrtObject {\n /**\n * Tenant ID for multi-tenant isolation\n * Nullable to support global/default voices\n */\n @tenantId({ nullable: true })\n tenantId: string | null = null;\n\n /**\n * Human-readable name for the voice profile\n */\n name: string = '';\n\n /**\n * Description of the voice characteristics\n */\n description: string | null = null;\n\n /**\n * ISO language code (e.g., 'en-US', 'zh-CN')\n */\n language: string = 'en-US';\n\n /**\n * Voice gender classification\n */\n gender: VoiceGender = 'neutral';\n\n /**\n * Natural language description for voice design\n * Used when creating a voice from scratch via AI\n */\n designPrompt: string | null = null;\n\n /**\n * Asset ID of the audio sample for voice cloning\n * Should be at least 3 seconds of clear speech\n */\n @crossPackageRef('@happyvertical/smrt-assets:Asset')\n sampleAssetId: string | null = null;\n\n /**\n * Provider-specific voice data (ID, embedding, etc.)\n * Stored after voice creation/cloning is complete\n */\n voiceData: Record<string, unknown> | null = null;\n\n /**\n * Default speech speed multiplier (0.5 - 2.0)\n * 1.0 = normal speed\n */\n defaultSpeed: number = 1.0;\n\n /**\n * Default pitch adjustment in semitones (-20 to 20)\n * 0 = no adjustment\n */\n defaultPitch: number = 0;\n\n /**\n * Voice profile status\n * - pending: Profile created but voice not yet generated\n * - processing: Voice generation/cloning in progress\n * - ready: Voice is ready for use\n * - failed: Voice generation failed\n */\n status: VoiceProfileStatus = 'pending';\n\n /**\n * TTS provider that created/manages this voice\n */\n provider: string = 'qwen3-tts';\n\n /**\n * Error message if status is 'failed'\n */\n errorMessage: string | null = null;\n\n constructor(options: VoiceProfileOptions = {}) {\n super(options);\n\n if (options.name !== undefined) this.name = options.name;\n if (options.description !== undefined)\n this.description = options.description;\n if (options.language !== undefined) this.language = options.language;\n if (options.gender !== undefined) this.gender = options.gender;\n if (options.designPrompt !== undefined)\n this.designPrompt = options.designPrompt;\n if (options.sampleAssetId !== undefined)\n this.sampleAssetId = options.sampleAssetId;\n if (options.voiceData !== undefined) this.voiceData = options.voiceData;\n if (options.defaultSpeed !== undefined)\n this.defaultSpeed = options.defaultSpeed;\n if (options.defaultPitch !== undefined)\n this.defaultPitch = options.defaultPitch;\n if (options.status !== undefined) this.status = options.status;\n if (options.provider !== undefined) this.provider = options.provider;\n if (options.errorMessage !== undefined)\n this.errorMessage = options.errorMessage;\n if (options.tenantId !== undefined) this.tenantId = options.tenantId;\n }\n\n /**\n * Check if this voice profile uses voice cloning\n */\n get isCloned(): boolean {\n return this.sampleAssetId !== null;\n }\n\n /**\n * Check if this voice profile uses voice design\n */\n get isDesigned(): boolean {\n return this.designPrompt !== null && !this.isCloned;\n }\n\n /**\n * Check if the voice is ready for use\n */\n get isReady(): boolean {\n return this.status === 'ready';\n }\n\n /**\n * Check if this is a global (default) voice\n */\n get isGlobal(): boolean {\n return this.tenantId === null;\n }\n}\n","/**\n * Voice Output Model\n *\n * Represents generated audio output from text-to-speech synthesis.\n * Extends Content to leverage content management features.\n */\n\nimport { Content, type ContentOptions } from '@happyvertical/smrt-content';\nimport { crossPackageRef, foreignKey, smrt } from '@happyvertical/smrt-core';\nimport { TenantScoped } from '@happyvertical/smrt-tenancy';\nimport { VoiceProfile } from './voice-profile.js';\n\n/**\n * Word timing information for lip-sync alignment\n */\nexport interface WordTiming {\n /**\n * The word\n */\n word: string;\n\n /**\n * Start time in seconds\n */\n start: number;\n\n /**\n * End time in seconds\n */\n end: number;\n}\n\n/**\n * Voice output metadata\n */\nexport interface VoiceOutputMetadata {\n /**\n * Sample rate in Hz\n */\n sampleRate?: number;\n\n /**\n * Audio format (e.g., 'wav', 'mp3', 'ogg')\n */\n format?: string;\n\n /**\n * Number of audio channels\n */\n channels?: number;\n\n /**\n * Bit depth (e.g., 16, 24, 32)\n */\n bitDepth?: number;\n\n /**\n * File size in bytes\n */\n fileSize?: number;\n\n /**\n * TTS provider used\n */\n provider?: string;\n\n /**\n * Model used for synthesis\n */\n model?: string;\n\n /**\n * Speech speed used (1.0 = normal)\n */\n speed?: number;\n\n /**\n * Pitch adjustment used (semitones)\n */\n pitch?: number;\n}\n\n/**\n * Voice output creation options\n */\nexport interface VoiceOutputOptions extends ContentOptions {\n /**\n * Voice profile used for synthesis\n */\n voiceProfileId?: string | null;\n\n /**\n * Original text that was synthesized\n */\n sourceText?: string;\n\n /**\n * Asset ID of the generated audio file\n */\n audioAssetId?: string | null;\n\n /**\n * Duration of the generated audio in seconds\n */\n duration?: number;\n\n /**\n * Word-level timing information for lip-sync\n */\n wordTimings?: WordTiming[] | null;\n\n /**\n * Audio metadata\n */\n audioMetadata?: VoiceOutputMetadata;\n}\n\n/**\n * Generated audio output from text-to-speech synthesis\n *\n * VoiceOutput extends Content to represent audio generated from\n * text using a VoiceProfile. It includes word-level timing information\n * for lip-sync alignment in video production.\n *\n * @example\n * ```typescript\n * import { VoiceOutput } from '@happyvertical/smrt-voice';\n *\n * const output = new VoiceOutput({\n * voiceProfileId: 'voice-123',\n * sourceText: 'Welcome to the evening news broadcast.',\n * audioAssetId: 'asset-789',\n * duration: 3.5,\n * wordTimings: [\n * { word: 'Welcome', start: 0.0, end: 0.4 },\n * { word: 'to', start: 0.4, end: 0.5 },\n * { word: 'the', start: 0.5, end: 0.6 },\n * { word: 'evening', start: 0.6, end: 1.0 },\n * { word: 'news', start: 1.0, end: 1.3 },\n * { word: 'broadcast', start: 1.3, end: 1.9 },\n * ],\n * audioMetadata: {\n * sampleRate: 48000,\n * format: 'wav',\n * channels: 1,\n * provider: 'qwen3-tts',\n * },\n * });\n * ```\n */\n@TenantScoped({ mode: 'optional' })\n@smrt({\n tableStrategy: 'sti',\n api: {\n include: ['list', 'get', 'create', 'delete'],\n },\n mcp: {\n include: ['list', 'get'],\n },\n cli: true,\n})\nexport class VoiceOutput extends Content {\n /**\n * Voice profile used for synthesis\n */\n @foreignKey(() => VoiceProfile)\n voiceProfileId: string | null = null;\n\n /**\n * Original text that was synthesized\n */\n sourceText: string = '';\n\n /**\n * Asset ID of the generated audio file\n */\n @crossPackageRef('@happyvertical/smrt-assets:Asset')\n audioAssetId: string | null = null;\n\n /**\n * Duration of the generated audio in seconds\n */\n duration: number = 0;\n\n /**\n * Word-level timing information for lip-sync alignment\n */\n wordTimings: WordTiming[] | null = null;\n\n /**\n * Audio metadata (sample rate, format, etc.)\n */\n audioMetadata: VoiceOutputMetadata = {};\n\n constructor(options: VoiceOutputOptions = {}) {\n super({\n ...options,\n type: 'voice-output',\n });\n\n if (options.voiceProfileId !== undefined)\n this.voiceProfileId = options.voiceProfileId;\n if (options.sourceText !== undefined) this.sourceText = options.sourceText;\n if (options.audioAssetId !== undefined)\n this.audioAssetId = options.audioAssetId;\n if (options.duration !== undefined) this.duration = options.duration;\n if (options.wordTimings !== undefined)\n this.wordTimings = options.wordTimings;\n if (options.audioMetadata !== undefined)\n this.audioMetadata = options.audioMetadata;\n }\n\n /**\n * Get the word count of the source text\n */\n get wordCount(): number {\n return this.sourceText.split(/\\s+/).filter(Boolean).length;\n }\n\n /**\n * Get the average words per second rate\n */\n get wordsPerSecond(): number {\n if (this.duration === 0) return 0;\n return this.wordCount / this.duration;\n }\n\n /**\n * Check if word timing data is available for lip-sync\n */\n get hasWordTimings(): boolean {\n return this.wordTimings !== null && this.wordTimings.length > 0;\n }\n\n /**\n * Get the word at a specific timestamp\n */\n getWordAtTime(seconds: number): WordTiming | null {\n if (!this.wordTimings) return null;\n return (\n this.wordTimings.find((wt) => seconds >= wt.start && seconds < wt.end) ??\n null\n );\n }\n}\n","/**\n * Voice Sample Model\n *\n * Manages audio samples used for voice cloning.\n * Samples should be at least 3 seconds of clear speech.\n */\n\nimport type { SmrtObjectOptions } from '@happyvertical/smrt-core';\nimport {\n crossPackageRef,\n foreignKey,\n SmrtObject,\n smrt,\n} from '@happyvertical/smrt-core';\nimport { TenantScoped, tenantId } from '@happyvertical/smrt-tenancy';\nimport { VoiceProfile } from './voice-profile.js';\n\n/**\n * Audio sample quality rating\n */\nexport type SampleQuality = 'low' | 'medium' | 'high';\n\n/**\n * Voice sample creation options\n */\nexport interface VoiceSampleOptions extends SmrtObjectOptions {\n /**\n * Voice profile this sample belongs to\n */\n voiceProfileId?: string | null;\n\n /**\n * Asset ID of the audio file\n */\n assetId?: string | null;\n\n /**\n * Sample duration in seconds\n */\n duration?: number;\n\n /**\n * Transcription of what was said in the sample\n */\n transcription?: string | null;\n\n /**\n * Quality rating based on audio analysis\n * @default 'medium'\n */\n quality?: SampleQuality;\n\n /**\n * Sample rate in Hz (e.g., 44100, 48000)\n */\n sampleRate?: number | null;\n\n /**\n * Number of audio channels (1 = mono, 2 = stereo)\n */\n channels?: number | null;\n\n /**\n * Audio format (e.g., 'wav', 'mp3', 'ogg')\n */\n format?: string | null;\n\n /**\n * Whether this is the primary sample for the voice profile\n * @default false\n */\n isPrimary?: boolean;\n\n /**\n * Tenant ID for multi-tenant isolation\n */\n tenantId?: string | null;\n}\n\n/**\n * Audio sample for voice cloning\n *\n * VoiceSample represents an audio recording used as source material\n * for voice cloning. For best results, samples should be:\n * - At least 3 seconds long\n * - Clear speech without background noise\n * - Single speaker only\n * - High quality (44.1kHz or higher)\n *\n * Multiple samples can be associated with a single VoiceProfile\n * to improve voice cloning quality.\n *\n * @example\n * ```typescript\n * import { VoiceSample } from '@happyvertical/smrt-voice';\n *\n * const sample = new VoiceSample({\n * voiceProfileId: 'voice-123',\n * assetId: 'asset-456',\n * duration: 5.2,\n * transcription: 'Hello, this is a test recording for voice cloning.',\n * quality: 'high',\n * sampleRate: 48000,\n * channels: 1,\n * format: 'wav',\n * isPrimary: true,\n * });\n * ```\n */\n@TenantScoped({ mode: 'optional' })\n@smrt({\n tableStrategy: 'sti',\n api: {\n include: ['list', 'get', 'create', 'delete'],\n },\n mcp: {\n include: ['list', 'get'],\n },\n cli: true,\n})\nexport class VoiceSample extends SmrtObject {\n /**\n * Tenant ID for multi-tenant isolation\n */\n @tenantId({ nullable: true })\n tenantId: string | null = null;\n\n /**\n * Voice profile this sample belongs to\n */\n @foreignKey(() => VoiceProfile)\n voiceProfileId: string | null = null;\n\n /**\n * Asset ID of the audio file\n * References an Asset in smrt-assets\n */\n @crossPackageRef('@happyvertical/smrt-assets:Asset')\n assetId: string | null = null;\n\n /**\n * Sample duration in seconds\n */\n duration: number = 0;\n\n /**\n * Transcription of what was said in the sample\n * Used for alignment and quality verification\n */\n transcription: string | null = null;\n\n /**\n * Quality rating based on audio analysis\n * - low: Noisy or short samples\n * - medium: Acceptable quality\n * - high: Clear audio, good length\n */\n quality: SampleQuality = 'medium';\n\n /**\n * Sample rate in Hz\n */\n sampleRate: number | null = null;\n\n /**\n * Number of audio channels\n */\n channels: number | null = null;\n\n /**\n * Audio format\n */\n format: string | null = null;\n\n /**\n * Whether this is the primary sample for the voice profile\n */\n isPrimary: boolean = false;\n\n constructor(options: VoiceSampleOptions = {}) {\n super(options);\n\n if (options.voiceProfileId !== undefined)\n this.voiceProfileId = options.voiceProfileId;\n if (options.assetId !== undefined) this.assetId = options.assetId;\n if (options.duration !== undefined) this.duration = options.duration;\n if (options.transcription !== undefined)\n this.transcription = options.transcription;\n if (options.quality !== undefined) this.quality = options.quality;\n if (options.sampleRate !== undefined) this.sampleRate = options.sampleRate;\n if (options.channels !== undefined) this.channels = options.channels;\n if (options.format !== undefined) this.format = options.format;\n if (options.isPrimary !== undefined) this.isPrimary = options.isPrimary;\n if (options.tenantId !== undefined) this.tenantId = options.tenantId;\n }\n\n /**\n * Check if sample meets minimum duration requirement (3 seconds)\n */\n get meetsMinDuration(): boolean {\n return this.duration >= 3;\n }\n\n /**\n * Check if sample is high quality and suitable for cloning\n */\n get isSuitableForCloning(): boolean {\n return this.meetsMinDuration && this.quality !== 'low';\n }\n}\n"],"mappings":"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"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../src/__smrt-register__.ts","../src/voice-profile.ts","../src/voice-output.ts","../src/voice-sample.ts"],"sourcesContent":["/**\n * Self-registers this package's build-time manifest before any @smrt() decorator\n * in the package fires. Fixes issue #1132: in consumer runtimes (tsx, SvelteKit\n * SSR, plain `vite dev`) the decorator's synchronous manifest lookup previously\n * missed because no step populated the global manifest cache — classes got\n * registered with zero fields and `save()` / `toJSON()` silently dropped every\n * declared property.\n *\n * Import this module as the first statement in `src/index.ts` so its top-level\n * side effect runs ahead of any class module's @smrt() decorator.\n *\n * Silent no-op in dev/test, where the vitest plugin already populates manifests\n * via a different path. Only needs to succeed in the published dist output.\n *\n * @see https://github.com/happyvertical/smrt/issues/1132\n */\nimport { ObjectRegistry } from '@happyvertical/smrt-core';\n\n// During library builds, smrtPlugin replaces this entire module with generated\n// code that embeds the scanned manifest inline (#1506/#1507) — published dists\n// never resolve this URL, so downstream bundlers cannot break registration by\n// relocating the compiled module away from dist/manifest.json. The runtime\n// lookup below is the fallback for source-mode runs without that transform.\nObjectRegistry.registerPackageManifest(\n new URL('./manifest.json', import.meta.url),\n);\n","/**\n * Voice Profile Model\n *\n * Manages voice profiles for AI-powered voice synthesis and cloning.\n * Supports voice design via natural language descriptions and voice\n * cloning from audio samples.\n */\n\nimport type { SmrtObjectOptions } from '@happyvertical/smrt-core';\nimport { crossPackageRef, SmrtObject, smrt } from '@happyvertical/smrt-core';\nimport { TenantScoped, tenantId } from '@happyvertical/smrt-tenancy';\nimport type { SpeechVoice } from '@happyvertical/speech';\n\n/**\n * Voice profile status\n */\nexport type VoiceProfileStatus = 'pending' | 'processing' | 'ready' | 'failed';\n\n/**\n * Voice gender classification\n */\nexport type VoiceGender = 'male' | 'female' | 'neutral';\n\n/**\n * Voice profile creation options\n */\nexport interface VoiceProfileOptions extends SmrtObjectOptions {\n /**\n * Human-readable name for the voice profile\n */\n name?: string;\n\n /**\n * Description of the voice characteristics\n */\n description?: string | null;\n\n /**\n * ISO language code (e.g., 'en-US', 'zh-CN')\n */\n language?: string;\n\n /**\n * Voice gender classification\n * @default 'neutral'\n */\n gender?: VoiceGender;\n\n /**\n * Natural language description for voice design\n * Used when creating a voice from scratch\n */\n designPrompt?: string | null;\n\n /**\n * Asset ID of the audio sample for voice cloning\n * Should be at least 3 seconds of clear speech\n */\n sampleAssetId?: string | null;\n\n /**\n * Provider-specific voice data (ID, embedding, etc.)\n * Stored after voice creation/cloning\n */\n voiceData?: Record<string, unknown> | null;\n\n /**\n * Default speech speed multiplier\n * @default 1.0\n */\n defaultSpeed?: number;\n\n /**\n * Default pitch adjustment in semitones\n * @default 0\n */\n defaultPitch?: number;\n\n /**\n * Voice profile status\n * @default 'pending'\n */\n status?: VoiceProfileStatus;\n\n /**\n * TTS provider that created this voice\n * @default 'qwen3-tts'\n */\n provider?: string;\n\n /**\n * Error message if status is 'failed'\n */\n errorMessage?: string | null;\n\n /**\n * Tenant ID for multi-tenant isolation\n * Null for global/default voices\n */\n tenantId?: string | null;\n}\n\n/**\n * Voice profile for AI-powered speech synthesis\n *\n * VoiceProfile represents a configured voice identity that can be used\n * for text-to-speech synthesis. Voices can be created through:\n * - Voice design: Natural language description of desired voice characteristics\n * - Voice cloning: 3+ second audio sample for voice replication\n *\n * @example\n * ```typescript\n * import { VoiceProfile } from '@happyvertical/smrt-voice';\n *\n * // Create a designed voice\n * const anchorVoice = new VoiceProfile({\n * name: 'News Anchor',\n * description: 'Professional news anchor voice with clear enunciation',\n * language: 'en-US',\n * gender: 'male',\n * designPrompt: 'Warm, authoritative male voice with slight gravitas, suitable for news broadcasts',\n * provider: 'qwen3-tts',\n * });\n *\n * // Create a cloned voice\n * const clonedVoice = new VoiceProfile({\n * name: 'Custom Voice',\n * description: 'Cloned from user sample',\n * language: 'en-US',\n * sampleAssetId: 'asset-123',\n * provider: 'qwen3-tts',\n * });\n * ```\n */\n@TenantScoped({ mode: 'optional' })\n@smrt({\n tableStrategy: 'sti',\n api: {\n include: ['list', 'get', 'create', 'update', 'delete'],\n },\n mcp: {\n include: ['list', 'get'],\n },\n cli: true,\n})\nexport class VoiceProfile extends SmrtObject {\n /**\n * Tenant ID for multi-tenant isolation\n * Nullable to support global/default voices\n */\n @tenantId({ nullable: true })\n tenantId: string | null = null;\n\n /**\n * Human-readable name for the voice profile\n */\n name: string = '';\n\n /**\n * Description of the voice characteristics\n */\n description: string | null = null;\n\n /**\n * ISO language code (e.g., 'en-US', 'zh-CN')\n */\n language: string = 'en-US';\n\n /**\n * Voice gender classification\n */\n gender: VoiceGender = 'neutral';\n\n /**\n * Natural language description for voice design\n * Used when creating a voice from scratch via AI\n */\n designPrompt: string | null = null;\n\n /**\n * Asset ID of the audio sample for voice cloning\n * Should be at least 3 seconds of clear speech\n */\n @crossPackageRef('@happyvertical/smrt-assets:Asset')\n sampleAssetId: string | null = null;\n\n /**\n * Provider-specific voice data (ID, embedding, etc.)\n * Stored after voice creation/cloning is complete\n */\n voiceData: Record<string, unknown> | null = null;\n\n /**\n * Default speech speed multiplier (0.5 - 2.0)\n * 1.0 = normal speed\n */\n defaultSpeed: number = 1.0;\n\n /**\n * Default pitch adjustment in semitones (-20 to 20)\n * 0 = no adjustment\n */\n defaultPitch: number = 0;\n\n /**\n * Voice profile status\n * - pending: Profile created but voice not yet generated\n * - processing: Voice generation/cloning in progress\n * - ready: Voice is ready for use\n * - failed: Voice generation failed\n */\n status: VoiceProfileStatus = 'pending';\n\n /**\n * TTS provider that created/manages this voice\n */\n provider: string = 'qwen3-tts';\n\n /**\n * Error message if status is 'failed'\n */\n errorMessage: string | null = null;\n\n constructor(options: VoiceProfileOptions = {}) {\n super(options);\n\n if (options.name !== undefined) this.name = options.name;\n if (options.description !== undefined)\n this.description = options.description;\n if (options.language !== undefined) this.language = options.language;\n if (options.gender !== undefined) this.gender = options.gender;\n if (options.designPrompt !== undefined)\n this.designPrompt = options.designPrompt;\n if (options.sampleAssetId !== undefined)\n this.sampleAssetId = options.sampleAssetId;\n if (options.voiceData !== undefined) this.voiceData = options.voiceData;\n if (options.defaultSpeed !== undefined)\n this.defaultSpeed = options.defaultSpeed;\n if (options.defaultPitch !== undefined)\n this.defaultPitch = options.defaultPitch;\n if (options.status !== undefined) this.status = options.status;\n if (options.provider !== undefined) this.provider = options.provider;\n if (options.errorMessage !== undefined)\n this.errorMessage = options.errorMessage;\n if (options.tenantId !== undefined) this.tenantId = options.tenantId;\n }\n\n /**\n * Check if this voice profile uses voice cloning\n */\n get isCloned(): boolean {\n return this.sampleAssetId !== null;\n }\n\n /**\n * Check if this voice profile uses voice design\n */\n get isDesigned(): boolean {\n return this.designPrompt !== null && !this.isCloned;\n }\n\n /**\n * Check if the voice is ready for use\n */\n get isReady(): boolean {\n return this.status === 'ready';\n }\n\n /**\n * Check if this is a global (default) voice\n */\n get isGlobal(): boolean {\n return this.tenantId === null;\n }\n\n /**\n * Convert this persisted profile into the runtime voice shape consumed by\n * @happyvertical/speech adapters.\n */\n toSpeechVoice(): SpeechVoice {\n const voiceData = isRecord(this.voiceData) ? this.voiceData : {};\n const prompt =\n stringValue(voiceData.prompt) ?? stringValue(voiceData.voicePrompt);\n const speakerId =\n stringValue(voiceData.speakerId) ??\n stringValue(voiceData.speaker) ??\n stringValue(voiceData.providerVoiceId);\n\n return {\n id:\n stringValue(voiceData.id) ??\n stringValue(voiceData.voiceId) ??\n stringValue(this.id),\n name: this.name || undefined,\n language: this.language || undefined,\n speakerId,\n prompt,\n metadata: {\n ...voiceData,\n provider: this.provider,\n defaultSpeed: this.defaultSpeed,\n defaultPitch: this.defaultPitch,\n },\n };\n }\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return value !== null && typeof value === 'object' && !Array.isArray(value);\n}\n\nfunction stringValue(value: unknown): string | undefined {\n return typeof value === 'string' && value.length > 0 ? value : undefined;\n}\n","/**\n * Voice Output Model\n *\n * Represents generated audio output from text-to-speech synthesis.\n * Extends Content to leverage content management features.\n */\n\nimport { Content, type ContentOptions } from '@happyvertical/smrt-content';\nimport { crossPackageRef, foreignKey, smrt } from '@happyvertical/smrt-core';\nimport { TenantScoped } from '@happyvertical/smrt-tenancy';\nimport type {\n WordTiming as SpeechWordTiming,\n SynthesizedSpeech,\n} from '@happyvertical/speech';\nimport { VoiceProfile } from './voice-profile.js';\n\n/**\n * Word timing information for lip-sync alignment\n */\nexport interface WordTiming {\n /**\n * The word\n */\n word: string;\n\n /**\n * Start time in seconds\n */\n start: number;\n\n /**\n * End time in seconds\n */\n end: number;\n\n /**\n * Provider confidence score, when available\n */\n confidence?: number;\n\n /**\n * Speaker identifier, when diarization is available\n */\n speakerId?: string;\n}\n\n/**\n * Voice output metadata\n */\nexport interface VoiceOutputMetadata {\n /**\n * Sample rate in Hz\n */\n sampleRate?: number;\n\n /**\n * Audio format (e.g., 'wav', 'mp3', 'ogg')\n */\n format?: string;\n\n /**\n * MIME type returned by the speech provider\n */\n contentType?: string;\n\n /**\n * Number of audio channels\n */\n channels?: number;\n\n /**\n * Bit depth (e.g., 16, 24, 32)\n */\n bitDepth?: number;\n\n /**\n * File size in bytes\n */\n fileSize?: number;\n\n /**\n * TTS provider used\n */\n provider?: string;\n\n /**\n * Model used for synthesis\n */\n model?: string;\n\n /**\n * Speech speed used (1.0 = normal)\n */\n speed?: number;\n\n /**\n * Pitch adjustment used (semitones)\n */\n pitch?: number;\n}\n\n/**\n * Voice output creation options\n */\nexport interface VoiceOutputOptions extends ContentOptions {\n /**\n * Voice profile used for synthesis\n */\n voiceProfileId?: string | null;\n\n /**\n * Original text that was synthesized\n */\n sourceText?: string;\n\n /**\n * Asset ID of the generated audio file\n */\n audioAssetId?: string | null;\n\n /**\n * Duration of the generated audio in seconds\n */\n duration?: number;\n\n /**\n * Word-level timing information for lip-sync\n */\n wordTimings?: WordTiming[] | null;\n\n /**\n * Audio metadata\n */\n audioMetadata?: VoiceOutputMetadata;\n}\n\n/**\n * Create a VoiceOutput from a runtime @happyvertical/speech synthesis result.\n */\nexport interface VoiceOutputFromSynthesizedSpeechOptions\n extends VoiceOutputOptions {\n /**\n * Runtime synthesis result from @happyvertical/speech.\n */\n speech: SynthesizedSpeech;\n}\n\n/**\n * Generated audio output from text-to-speech synthesis\n *\n * VoiceOutput extends Content to represent audio generated from\n * text using a VoiceProfile. It includes word-level timing information\n * for lip-sync alignment in video production.\n *\n * @example\n * ```typescript\n * import { VoiceOutput } from '@happyvertical/smrt-voice';\n *\n * const output = new VoiceOutput({\n * voiceProfileId: 'voice-123',\n * sourceText: 'Welcome to the evening news broadcast.',\n * audioAssetId: 'asset-789',\n * duration: 3.5,\n * wordTimings: [\n * { word: 'Welcome', start: 0.0, end: 0.4 },\n * { word: 'to', start: 0.4, end: 0.5 },\n * { word: 'the', start: 0.5, end: 0.6 },\n * { word: 'evening', start: 0.6, end: 1.0 },\n * { word: 'news', start: 1.0, end: 1.3 },\n * { word: 'broadcast', start: 1.3, end: 1.9 },\n * ],\n * audioMetadata: {\n * sampleRate: 48000,\n * format: 'wav',\n * channels: 1,\n * provider: 'qwen3-tts',\n * },\n * });\n * ```\n */\n@TenantScoped({ mode: 'optional' })\n@smrt({\n tableStrategy: 'sti',\n api: {\n include: ['list', 'get', 'create', 'delete'],\n },\n mcp: {\n include: ['list', 'get'],\n },\n cli: true,\n})\nexport class VoiceOutput extends Content {\n /**\n * Voice profile used for synthesis\n */\n @foreignKey(() => VoiceProfile)\n voiceProfileId: string | null = null;\n\n /**\n * Original text that was synthesized\n */\n sourceText: string = '';\n\n /**\n * Asset ID of the generated audio file\n */\n @crossPackageRef('@happyvertical/smrt-assets:Asset')\n audioAssetId: string | null = null;\n\n /**\n * Duration of the generated audio in seconds\n */\n duration: number = 0;\n\n /**\n * Word-level timing information for lip-sync alignment\n */\n wordTimings: WordTiming[] | null = null;\n\n /**\n * Audio metadata (sample rate, format, etc.)\n */\n audioMetadata: VoiceOutputMetadata = {};\n\n constructor(options: VoiceOutputOptions = {}) {\n super({\n ...options,\n type: 'voice-output',\n });\n\n if (options.voiceProfileId !== undefined)\n this.voiceProfileId = options.voiceProfileId;\n if (options.sourceText !== undefined) this.sourceText = options.sourceText;\n if (options.audioAssetId !== undefined)\n this.audioAssetId = options.audioAssetId;\n if (options.duration !== undefined) this.duration = options.duration;\n if (options.wordTimings !== undefined)\n this.wordTimings = options.wordTimings;\n if (options.audioMetadata !== undefined)\n this.audioMetadata = options.audioMetadata;\n }\n\n /**\n * Get the word count of the source text\n */\n get wordCount(): number {\n return this.sourceText.split(/\\s+/).filter(Boolean).length;\n }\n\n /**\n * Get the average words per second rate\n */\n get wordsPerSecond(): number {\n if (this.duration === 0) return 0;\n return this.wordCount / this.duration;\n }\n\n /**\n * Check if word timing data is available for lip-sync\n */\n get hasWordTimings(): boolean {\n return this.wordTimings !== null && this.wordTimings.length > 0;\n }\n\n /**\n * Get the word at a specific timestamp\n */\n getWordAtTime(seconds: number): WordTiming | null {\n if (!this.wordTimings) return null;\n return (\n this.wordTimings.find((wt) => seconds >= wt.start && seconds < wt.end) ??\n null\n );\n }\n\n /**\n * Build a persisted output model from a provider-neutral speech result.\n *\n * The binary audio remains in the caller-owned asset pipeline; this helper\n * only normalizes metadata and timing fields onto the SMRT model.\n */\n static fromSynthesizedSpeech(\n options: VoiceOutputFromSynthesizedSpeechOptions,\n ): VoiceOutput {\n const { speech, audioMetadata, duration, wordTimings, ...rest } = options;\n return new VoiceOutput({\n ...rest,\n duration: duration ?? speech.durationSeconds ?? 0,\n wordTimings: wordTimings ?? wordTimingsFromSpeech(speech.words),\n audioMetadata: {\n ...metadataFromSynthesizedSpeech(speech),\n ...audioMetadata,\n },\n });\n }\n}\n\nexport function wordTimingsFromSpeech(\n words: readonly SpeechWordTiming[] | null | undefined,\n): WordTiming[] | null {\n if (!words || words.length === 0) {\n return null;\n }\n return words.map((word) => ({\n word: word.word,\n start: word.startSeconds,\n end: word.endSeconds,\n confidence: word.confidence,\n speakerId: word.speakerId,\n }));\n}\n\nexport function metadataFromSynthesizedSpeech(\n speech: SynthesizedSpeech,\n): VoiceOutputMetadata {\n return {\n sampleRate: speech.sampleRate,\n format: speech.format ?? formatFromContentType(speech.contentType),\n contentType: speech.contentType,\n channels: speech.channels,\n fileSize: speech.audio.byteLength,\n provider: speech.provider,\n model: speech.model,\n };\n}\n\nfunction formatFromContentType(contentType: string): string | undefined {\n const normalized = contentType.split(';', 1)[0]?.trim().toLowerCase();\n if (!normalized?.startsWith('audio/')) {\n return undefined;\n }\n return normalized.slice('audio/'.length);\n}\n","/**\n * Voice Sample Model\n *\n * Manages audio samples used for voice cloning.\n * Samples should be at least 3 seconds of clear speech.\n */\n\nimport type { SmrtObjectOptions } from '@happyvertical/smrt-core';\nimport {\n crossPackageRef,\n foreignKey,\n SmrtObject,\n smrt,\n} from '@happyvertical/smrt-core';\nimport { TenantScoped, tenantId } from '@happyvertical/smrt-tenancy';\nimport { VoiceProfile } from './voice-profile.js';\n\n/**\n * Audio sample quality rating\n */\nexport type SampleQuality = 'low' | 'medium' | 'high';\n\n/**\n * Voice sample creation options\n */\nexport interface VoiceSampleOptions extends SmrtObjectOptions {\n /**\n * Voice profile this sample belongs to\n */\n voiceProfileId?: string | null;\n\n /**\n * Asset ID of the audio file\n */\n assetId?: string | null;\n\n /**\n * Sample duration in seconds\n */\n duration?: number;\n\n /**\n * Transcription of what was said in the sample\n */\n transcription?: string | null;\n\n /**\n * Quality rating based on audio analysis\n * @default 'medium'\n */\n quality?: SampleQuality;\n\n /**\n * Sample rate in Hz (e.g., 44100, 48000)\n */\n sampleRate?: number | null;\n\n /**\n * Number of audio channels (1 = mono, 2 = stereo)\n */\n channels?: number | null;\n\n /**\n * Audio format (e.g., 'wav', 'mp3', 'ogg')\n */\n format?: string | null;\n\n /**\n * Whether this is the primary sample for the voice profile\n * @default false\n */\n isPrimary?: boolean;\n\n /**\n * Tenant ID for multi-tenant isolation\n */\n tenantId?: string | null;\n}\n\n/**\n * Audio sample for voice cloning\n *\n * VoiceSample represents an audio recording used as source material\n * for voice cloning. For best results, samples should be:\n * - At least 3 seconds long\n * - Clear speech without background noise\n * - Single speaker only\n * - High quality (44.1kHz or higher)\n *\n * Multiple samples can be associated with a single VoiceProfile\n * to improve voice cloning quality.\n *\n * @example\n * ```typescript\n * import { VoiceSample } from '@happyvertical/smrt-voice';\n *\n * const sample = new VoiceSample({\n * voiceProfileId: 'voice-123',\n * assetId: 'asset-456',\n * duration: 5.2,\n * transcription: 'Hello, this is a test recording for voice cloning.',\n * quality: 'high',\n * sampleRate: 48000,\n * channels: 1,\n * format: 'wav',\n * isPrimary: true,\n * });\n * ```\n */\n@TenantScoped({ mode: 'optional' })\n@smrt({\n tableStrategy: 'sti',\n api: {\n include: ['list', 'get', 'create', 'delete'],\n },\n mcp: {\n include: ['list', 'get'],\n },\n cli: true,\n})\nexport class VoiceSample extends SmrtObject {\n /**\n * Tenant ID for multi-tenant isolation\n */\n @tenantId({ nullable: true })\n tenantId: string | null = null;\n\n /**\n * Voice profile this sample belongs to\n */\n @foreignKey(() => VoiceProfile)\n voiceProfileId: string | null = null;\n\n /**\n * Asset ID of the audio file\n * References an Asset in smrt-assets\n */\n @crossPackageRef('@happyvertical/smrt-assets:Asset')\n assetId: string | null = null;\n\n /**\n * Sample duration in seconds\n */\n duration: number = 0;\n\n /**\n * Transcription of what was said in the sample\n * Used for alignment and quality verification\n */\n transcription: string | null = null;\n\n /**\n * Quality rating based on audio analysis\n * - low: Noisy or short samples\n * - medium: Acceptable quality\n * - high: Clear audio, good length\n */\n quality: SampleQuality = 'medium';\n\n /**\n * Sample rate in Hz\n */\n sampleRate: number | null = null;\n\n /**\n * Number of audio channels\n */\n channels: number | null = null;\n\n /**\n * Audio format\n */\n format: string | null = null;\n\n /**\n * Whether this is the primary sample for the voice profile\n */\n isPrimary: boolean = false;\n\n constructor(options: VoiceSampleOptions = {}) {\n super(options);\n\n if (options.voiceProfileId !== undefined)\n this.voiceProfileId = options.voiceProfileId;\n if (options.assetId !== undefined) this.assetId = options.assetId;\n if (options.duration !== undefined) this.duration = options.duration;\n if (options.transcription !== undefined)\n this.transcription = options.transcription;\n if (options.quality !== undefined) this.quality = options.quality;\n if (options.sampleRate !== undefined) this.sampleRate = options.sampleRate;\n if (options.channels !== undefined) this.channels = options.channels;\n if (options.format !== undefined) this.format = options.format;\n if (options.isPrimary !== undefined) this.isPrimary = options.isPrimary;\n if (options.tenantId !== undefined) this.tenantId = options.tenantId;\n }\n\n /**\n * Check if sample meets minimum duration requirement (3 seconds)\n */\n get meetsMinDuration(): boolean {\n return this.duration >= 3;\n }\n\n /**\n * Check if sample is high quality and suitable for cloning\n */\n get isSuitableForCloning(): boolean {\n return this.meetsMinDuration && this.quality !== 'low';\n }\n}\n"],"mappings":"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"}
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "version": "1.0.0",
3
- "timestamp": 1783637934698,
3
+ "timestamp": 1783646499813,
4
4
  "packageName": "@happyvertical/smrt-voice",
5
- "packageVersion": "0.38.24",
5
+ "packageVersion": "0.38.25",
6
6
  "objects": {
7
7
  "@happyvertical/smrt-voice:VoiceOutput": {
8
8
  "name": "voiceoutput",
@@ -1490,6 +1490,20 @@
1490
1490
  "returnType": "WordTiming | null",
1491
1491
  "isStatic": false,
1492
1492
  "isPublic": true
1493
+ },
1494
+ "fromSynthesizedSpeech": {
1495
+ "name": "fromSynthesizedSpeech",
1496
+ "async": false,
1497
+ "parameters": [
1498
+ {
1499
+ "name": "options",
1500
+ "type": "VoiceOutputFromSynthesizedSpeechOptions",
1501
+ "optional": false
1502
+ }
1503
+ ],
1504
+ "returnType": "VoiceOutput",
1505
+ "isStatic": true,
1506
+ "isPublic": true
1493
1507
  }
1494
1508
  },
1495
1509
  "decoratorConfig": {
@@ -2289,6 +2303,14 @@
2289
2303
  "returnType": "Promise<void>",
2290
2304
  "isStatic": false,
2291
2305
  "isPublic": true
2306
+ },
2307
+ "toSpeechVoice": {
2308
+ "name": "toSpeechVoice",
2309
+ "async": false,
2310
+ "parameters": [],
2311
+ "returnType": "SpeechVoice",
2312
+ "isStatic": false,
2313
+ "isPublic": true
2292
2314
  }
2293
2315
  },
2294
2316
  "decoratorConfig": {
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "generatedAt": "2026-07-09T22:58:56.037Z",
3
+ "generatedAt": "2026-07-10T01:21:41.126Z",
4
4
  "packageName": "@happyvertical/smrt-voice",
5
- "packageVersion": "0.38.24",
5
+ "packageVersion": "0.38.25",
6
6
  "sourceManifestPath": "dist/manifest.json",
7
7
  "agentDocPath": "AGENTS.md",
8
8
  "sourceHashes": {
9
- "manifest": "c54b6dc0738ce5d5553691e3cc904692fc60c83e838f331dee403b7f87a845ef",
10
- "packageJson": "0fd05f18d6fb9061cffbda78842de02c511e587b43f15dbc1d39bbfbb7a1a01a",
11
- "agents": "49a29e74f9bd018c1141f0d39468ad71d91d4ba078e2e82e828b7bf5a8f775e9"
9
+ "manifest": "c2c61f72dc5518cb492ae098d028f4756ab5df6069e7153cb70383de6f70bb90",
10
+ "packageJson": "a4d11bd8fcfde91fbe4c16f0e9f4169584a389fd5443403d0b8c258f16a9a5b2",
11
+ "agents": "e7726fd0cee96291548c1bc951b0048bb11a4d5eee3c19632f419779c36be550"
12
12
  },
13
13
  "exports": [
14
14
  ".",
@@ -21,6 +21,7 @@
21
21
  "@happyvertical/smrt-content": "workspace:*",
22
22
  "@happyvertical/smrt-core": "workspace:*",
23
23
  "@happyvertical/smrt-tenancy": "workspace:*",
24
+ "@happyvertical/speech": "catalog:",
24
25
  "@happyvertical/utils": "catalog:",
25
26
  "@happyvertical/logger": "catalog:",
26
27
  "@happyvertical/smrt-vitest": "workspace:*",
@@ -274,6 +275,7 @@
274
275
  "executeToolCall",
275
276
  "forget",
276
277
  "forgetScope",
278
+ "fromSynthesizedSpeech",
277
279
  "generateEmbeddings",
278
280
  "generateThumbnail",
279
281
  "getAiUsageSnapshot",
@@ -600,7 +602,8 @@
600
602
  "summarizeAiUsage",
601
603
  "toJSON",
602
604
  "toPlainObject",
603
- "toPublicJSON"
605
+ "toPublicJSON",
606
+ "toSpeechVoice"
604
607
  ],
605
608
  "surfaces": [
606
609
  {
@@ -1161,5 +1164,5 @@
1161
1164
  "polymorphicAssociations": 0,
1162
1165
  "uuidColumns": 12
1163
1166
  },
1164
- "agentDoc": "# @happyvertical/smrt-voice\n\nTTS voice profiles with two creation modes: AI design or audio cloning. Word-level timing output for lip-sync.\n\n## Models\n\n- **VoiceProfile**: two mutually exclusive modes — `designPrompt` (AI-generated from description) XOR `sampleAssetId` (cloned from audio). Status: `pending → processing → ready/failed`. `voiceData` is opaque provider-specific storage. `defaultSpeed` (0.5-2.0), `defaultPitch` (-20 to 20 semitones).\n- **VoiceSample**: audio training data. `duration`, `transcription`, `quality` (low/medium/high), `sampleRate`, `format`. Validation: `meetsMinDuration` (≥3 sec), `isSuitableForCloning` (≥3 sec AND quality ≠ low).\n- **VoiceOutput** (extends Content): generated TTS audio. `sourceText`, `audioAssetId`, `wordTimings` array `[{word, start, end}]` in seconds for lip-sync. `audioMetadata` (sampleRate, format, channels, bitDepth, provider, model). Computed: `wordCount`, `wordsPerSecond`, `getWordAtTime(seconds)`.\n\n## Gotchas\n\n- **Default provider hardcoded**: 'qwen3-tts' no provider abstraction layer\n- **Sample minimum not enforced in constructor**: 3-sec minimum documented but not validated on create\n- **WordTiming from external provider**: framework doesn't generate timings — populated by TTS service\n- **Status transitions not enforced**: can manually set status without triggering generation workflow\n- **voiceData is opaque**: `{ [key: string]: any }` — provider-specific, no schema\n- **Optional tenancy**: tenantId=null for global/default voices\n"
1167
+ "agentDoc": "# @happyvertical/smrt-voice\n\nTTS voice profiles with two creation modes: AI design or audio cloning. Word-level timing output for lip-sync.\n\n## Models\n\n- **VoiceProfile**: two mutually exclusive modes — `designPrompt` (AI-generated from description) XOR `sampleAssetId` (cloned from audio). Status: `pending → processing → ready/failed`. `voiceData` is opaque provider-specific storage. `defaultSpeed` (0.5-2.0), `defaultPitch` (-20 to 20 semitones).\n- **VoiceSample**: audio training data. `duration`, `transcription`, `quality` (low/medium/high), `sampleRate`, `format`. Validation: `meetsMinDuration` (≥3 sec), `isSuitableForCloning` (≥3 sec AND quality ≠ low).\n- **VoiceOutput** (extends Content): generated TTS audio. `sourceText`, `audioAssetId`, `wordTimings` array `[{word, start, end}]` in seconds for lip-sync. `audioMetadata` (sampleRate, format, channels, bitDepth, provider, model). Computed: `wordCount`, `wordsPerSecond`, `getWordAtTime(seconds)`.\n\n## Gotchas\n\n- **Runtime providers live in `@happyvertical/speech`**: this package persists voice profiles, samples, and outputs. Use `VoiceProfile.toSpeechVoice()` and `VoiceOutput.fromSynthesizedSpeech()` at the adapter boundary.\n- **Sample minimum not enforced in constructor**: 3-sec minimum documented but not validated on create\n- **WordTiming from external provider**: framework doesn't generate timings — populated by TTS service\n- **Status transitions not enforced**: can manually set status without triggering generation workflow\n- **voiceData is opaque**: `{ [key: string]: any }` — provider-specific, no schema\n- **Optional tenancy**: tenantId=null for global/default voices\n"
1165
1168
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@happyvertical/smrt-voice",
3
- "version": "0.38.24",
3
+ "version": "0.38.25",
4
4
  "type": "module",
5
5
  "description": "Voice profile management for AI-powered voice synthesis and cloning in the SMRT ecosystem",
6
6
  "author": "HappyVertical",
@@ -29,12 +29,13 @@
29
29
  "AGENTS.md"
30
30
  ],
31
31
  "dependencies": {
32
+ "@happyvertical/speech": "^0.78.0",
32
33
  "@happyvertical/utils": "^0.78.0",
33
- "@happyvertical/smrt-assets": "0.38.24",
34
- "@happyvertical/smrt-content": "0.38.24",
35
- "@happyvertical/smrt-config": "0.38.24",
36
- "@happyvertical/smrt-tenancy": "0.38.24",
37
- "@happyvertical/smrt-core": "0.38.24"
34
+ "@happyvertical/smrt-assets": "0.38.25",
35
+ "@happyvertical/smrt-config": "0.38.25",
36
+ "@happyvertical/smrt-content": "0.38.25",
37
+ "@happyvertical/smrt-tenancy": "0.38.25",
38
+ "@happyvertical/smrt-core": "0.38.25"
38
39
  },
39
40
  "devDependencies": {
40
41
  "@happyvertical/logger": "^0.78.0",
@@ -43,7 +44,7 @@
43
44
  "typescript": "^5.9.3",
44
45
  "vite": "^8.1.3",
45
46
  "vitest": "^4.1.9",
46
- "@happyvertical/smrt-vitest": "0.38.24"
47
+ "@happyvertical/smrt-vitest": "0.38.25"
47
48
  },
48
49
  "keywords": [
49
50
  "voice",