@ai-matrx/media 0.14.0 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +23 -0
- package/dist/react.cjs +84 -4
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +35 -2
- package/dist/react.d.ts +35 -2
- package/dist/react.js +93 -4
- package/dist/react.js.map +1 -1
- package/dist/speech.cjs +1689 -0
- package/dist/speech.cjs.map +1 -0
- package/dist/speech.d.cts +565 -0
- package/dist/speech.d.ts +565 -0
- package/dist/speech.js +1683 -0
- package/dist/speech.js.map +1 -0
- package/dist/tts-config-JbF86KIt.d.cts +149 -0
- package/dist/tts-config-JbF86KIt.d.ts +149 -0
- package/dist/voices.d.cts +3 -149
- package/dist/voices.d.ts +3 -149
- package/package.json +15 -4
package/dist/voices.d.cts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export { A as ASSISTANT_VOICE_ID, C as CARTESIA_API_VERSION, a as COMMON_ABBREVIATION_EXPANSIONS, L as LEGACY_DEFAULT_VOICE_ID, P as ParseMarkdownToTextOptions, R as READING_VOICE_ID, S as SPEECH_BLANK_WORD, b as SpeechPronunciation, T as TTS_DEFAULT_SPEED, c as TTS_DEFAULT_VOLUME, d as TTS_MODEL_ID, e as TTS_PLAYBACK_BUFFER_SEC, f as TTS_SPEED_MAX, g as TTS_SPEED_MIN, h as TTS_STREAMING_BUFFER_SEC, V as VoicePurpose, n as normalizeSpeechAbbreviations, i as normalizeSpeechBlanks, p as parseMarkdownToText, r as resolveSpeed, j as resolveVoiceId } from './tts-config-JbF86KIt.cjs';
|
|
2
|
+
|
|
1
3
|
declare const availableVoices: {
|
|
2
4
|
id: string;
|
|
3
5
|
name: string;
|
|
@@ -10,52 +12,6 @@ declare const allVoices: {
|
|
|
10
12
|
description: string;
|
|
11
13
|
}[];
|
|
12
14
|
|
|
13
|
-
/**
|
|
14
|
-
* Central Cartesia TTS configuration — the single source of truth for the model,
|
|
15
|
-
* API version, system default voices, speed/volume baselines, and playback
|
|
16
|
-
* buffering used by every in-app TTS surface (chat read-aloud, studio
|
|
17
|
-
* read-aloud, voice playgrounds, the admin tester).
|
|
18
|
-
*
|
|
19
|
-
* Moved from matrx-frontend lib/cartesia/config.ts (P16 voices). The SDK-typed
|
|
20
|
-
* `buildGenerationConfig` stays with the host's Cartesia client.
|
|
21
|
-
*/
|
|
22
|
-
/** Current model + API version for all in-app TTS. */
|
|
23
|
-
declare const TTS_MODEL_ID = "sonic-3.5";
|
|
24
|
-
declare const CARTESIA_API_VERSION = "2026-08-14";
|
|
25
|
-
/**
|
|
26
|
-
* System default voices, used only when a user has not chosen their own.
|
|
27
|
-
* - reading → Skylar (primary female; document / read-aloud)
|
|
28
|
-
* - assistant → Daniel (primary male; assistant replies)
|
|
29
|
-
*/
|
|
30
|
-
declare const READING_VOICE_ID = "db6b0ed5-d5d3-463d-ae85-518a07d3c2b4";
|
|
31
|
-
declare const ASSISTANT_VOICE_ID = "47c38ca4-5f35-497b-b1a3-415245fb35e1";
|
|
32
|
-
/**
|
|
33
|
-
* The pre-2026 hardcoded default voice. Treated as "unset" by resolveVoiceId so
|
|
34
|
-
* users who never explicitly chose a voice transition to the new defaults.
|
|
35
|
-
*/
|
|
36
|
-
declare const LEGACY_DEFAULT_VOICE_ID = "156fb8d2-335b-4950-9cb3-a2d33befec77";
|
|
37
|
-
type VoicePurpose = "reading" | "assistant";
|
|
38
|
-
/** generation_config.speed range (1.0 = original). Our chosen baseline is 1.2. */
|
|
39
|
-
declare const TTS_SPEED_MIN = 0.6;
|
|
40
|
-
declare const TTS_SPEED_MAX = 1.5;
|
|
41
|
-
declare const TTS_DEFAULT_SPEED = 1.2;
|
|
42
|
-
/** generation_config.volume range (1.0 = original). */
|
|
43
|
-
declare const TTS_DEFAULT_VOLUME = 1;
|
|
44
|
-
/**
|
|
45
|
-
* Client-side player buffer (seconds). Higher than the old 0.25s, which
|
|
46
|
-
* caused stream underruns heard as choppy "pauses"; tune in one place.
|
|
47
|
-
*/
|
|
48
|
-
declare const TTS_PLAYBACK_BUFFER_SEC = 0.7;
|
|
49
|
-
/**
|
|
50
|
-
* Lower buffer for token-by-token streaming (real-time LLM speech) where
|
|
51
|
-
* latency matters more — still well above the old 0.1s that stuttered.
|
|
52
|
-
*/
|
|
53
|
-
declare const TTS_STREAMING_BUFFER_SEC = 0.3;
|
|
54
|
-
/** A user's explicit voice preference wins; otherwise the purpose default. */
|
|
55
|
-
declare function resolveVoiceId(userVoiceId: string | null | undefined, purpose: VoicePurpose): string;
|
|
56
|
-
/** Clamp a stored speed to the valid generation_config range, else the default. */
|
|
57
|
-
declare function resolveSpeed(userSpeed: number | null | undefined): number;
|
|
58
|
-
|
|
59
15
|
type VoiceSetId = "cartesia" | "xai";
|
|
60
16
|
interface VoiceOption {
|
|
61
17
|
id: string;
|
|
@@ -75,108 +31,6 @@ declare function voiceDisplayName(set: VoiceSetId, value: unknown): string;
|
|
|
75
31
|
/** True when `id` is one of the live voice conversation (xAI Realtime) voices. */
|
|
76
32
|
declare function isLiveConversationVoice(id: string): boolean;
|
|
77
33
|
|
|
78
|
-
/** A term→spoken-form substitution applied before any other speech parsing. */
|
|
79
|
-
interface SpeechPronunciation {
|
|
80
|
-
from: string;
|
|
81
|
-
to: string;
|
|
82
|
-
}
|
|
83
|
-
interface ParseMarkdownToTextOptions {
|
|
84
|
-
/**
|
|
85
|
-
* Custom Dictionary pronunciation substitutions. Applied FIRST — before the
|
|
86
|
-
* built-in abbreviation/number normalization — so a user term like "AI" can
|
|
87
|
-
* supply its own spoken form instead of the generic "A I" readout. Pairs
|
|
88
|
-
* should be sorted longest-first by the caller so multi-word terms replace
|
|
89
|
-
* before substrings.
|
|
90
|
-
*/
|
|
91
|
-
pronunciations?: SpeechPronunciation[];
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* Long-form meanings retained as reference data for search, display, or future
|
|
95
|
-
* accessibility features. TTS must not use these expansions: repeatedly
|
|
96
|
-
* reading "Application Programming Interface" for API is not natural speech.
|
|
97
|
-
*/
|
|
98
|
-
declare const COMMON_ABBREVIATION_EXPANSIONS: {
|
|
99
|
-
readonly AI: "Artificial Intelligence";
|
|
100
|
-
readonly API: "Application Programming Interface";
|
|
101
|
-
readonly HTTP: "Hypertext Transfer Protocol";
|
|
102
|
-
readonly HTTPS: "Hypertext Transfer Protocol Secure";
|
|
103
|
-
readonly URL: "Uniform Resource Locator";
|
|
104
|
-
readonly URI: "Uniform Resource Identifier";
|
|
105
|
-
readonly JSON: "JavaScript Object Notation";
|
|
106
|
-
readonly XML: "eXtensible Markup Language";
|
|
107
|
-
readonly CSS: "Cascading Style Sheets";
|
|
108
|
-
readonly HTML: "Hypertext Markup Language";
|
|
109
|
-
readonly JS: "JavaScript";
|
|
110
|
-
readonly TS: "TypeScript";
|
|
111
|
-
readonly SQL: "Structured Query Language";
|
|
112
|
-
readonly DB: "Database";
|
|
113
|
-
readonly UI: "User Interface";
|
|
114
|
-
readonly UX: "User Experience";
|
|
115
|
-
readonly SEO: "Search Engine Optimization";
|
|
116
|
-
readonly SDK: "Software Development Kit";
|
|
117
|
-
readonly CLI: "Command Line Interface";
|
|
118
|
-
readonly IDE: "Integrated Development Environment";
|
|
119
|
-
readonly JWT: "JSON Web Token";
|
|
120
|
-
readonly OAuth: "Open Authorization";
|
|
121
|
-
readonly REST: "Representational State Transfer";
|
|
122
|
-
readonly CRUD: "Create Read Update Delete";
|
|
123
|
-
readonly MVC: "Model View Controller";
|
|
124
|
-
readonly SPA: "Single Page Application";
|
|
125
|
-
readonly SSR: "Server Side Rendering";
|
|
126
|
-
readonly CSR: "Client Side Rendering";
|
|
127
|
-
readonly PWA: "Progressive Web App";
|
|
128
|
-
readonly DOM: "Document Object Model";
|
|
129
|
-
readonly BOM: "Browser Object Model";
|
|
130
|
-
readonly CDN: "Content Delivery Network";
|
|
131
|
-
readonly CMS: "Content Management System";
|
|
132
|
-
readonly ERP: "Enterprise Resource Planning";
|
|
133
|
-
readonly CRM: "Customer Relationship Management";
|
|
134
|
-
readonly SaaS: "Software as a Service";
|
|
135
|
-
readonly PaaS: "Platform as a Service";
|
|
136
|
-
readonly IaaS: "Infrastructure as a Service";
|
|
137
|
-
readonly VPN: "Virtual Private Network";
|
|
138
|
-
readonly LAN: "Local Area Network";
|
|
139
|
-
readonly WAN: "Wide Area Network";
|
|
140
|
-
readonly TCP: "Transmission Control Protocol";
|
|
141
|
-
readonly UDP: "User Datagram Protocol";
|
|
142
|
-
readonly IP: "Internet Protocol";
|
|
143
|
-
readonly DNS: "Domain Name System";
|
|
144
|
-
readonly FTP: "File Transfer Protocol";
|
|
145
|
-
readonly SMTP: "Simple Mail Transfer Protocol";
|
|
146
|
-
readonly POP3: "Post Office Protocol version 3";
|
|
147
|
-
readonly IMAP: "Internet Message Access Protocol";
|
|
148
|
-
};
|
|
149
|
-
/**
|
|
150
|
-
* Normalize technical abbreviations for both active TTS lanes.
|
|
151
|
-
*
|
|
152
|
-
* Cartesia Sonic 3.5 recommends single-space character delimiters for forced
|
|
153
|
-
* readout ("A P I"), and that plain-text form also works with the catalog's
|
|
154
|
-
* Groq/Orpheus engine, which has no SSML/pronunciation-dictionary input. Word
|
|
155
|
-
* acronyms stay conventional so models can say "json", "oh-auth", etc.
|
|
156
|
-
*/
|
|
157
|
-
declare function normalizeSpeechAbbreviations(text: string): string;
|
|
158
|
-
/**
|
|
159
|
-
* The spoken word a fill-in-the-blank run of underscores becomes. One constant
|
|
160
|
-
* so every speech surface reads the same thing — change it here (e.g. "what")
|
|
161
|
-
* and TTS + generated flashcard fronts follow.
|
|
162
|
-
*/
|
|
163
|
-
declare const SPEECH_BLANK_WORD = "blank";
|
|
164
|
-
/**
|
|
165
|
-
* Fill-in-the-blank underscores → a spoken word. A run of two-or-more
|
|
166
|
-
* underscores (any length — "___", "_____"), including the spaced style
|
|
167
|
-
* ("_ _ _"), reads as "blank" instead of the literal "underscore" every TTS
|
|
168
|
-
* engine would otherwise say. Generic and reusable: the centralized speech
|
|
169
|
-
* cleaner AND the generated flashcard spoken-fronts both route through this, so
|
|
170
|
-
* a blank sounds identical everywhere.
|
|
171
|
-
*
|
|
172
|
-
* Guards (so it only ever touches real blanks):
|
|
173
|
-
* - bounded by non-alphanumerics → never mangles `snake_case` or `__dunder__`;
|
|
174
|
-
* - a line of ONLY underscores is a markdown thematic break (divider), left
|
|
175
|
-
* untouched here for the horizontal-rule rule to drop.
|
|
176
|
-
*/
|
|
177
|
-
declare function normalizeSpeechBlanks(text: string): string;
|
|
178
|
-
declare function parseMarkdownToText(markdown: string, options?: ParseMarkdownToTextOptions): string;
|
|
179
|
-
|
|
180
34
|
/**
|
|
181
35
|
* The languages read-aloud offers, with each language's own name — the union of the website's
|
|
182
36
|
* voice-language setting and the extension's quick picker (which added Persian).
|
|
@@ -190,4 +44,4 @@ declare const READ_ALOUD_LANGUAGES: readonly ReadAloudLanguage[];
|
|
|
190
44
|
/** The language for `code`, or English when the code is not offered. */
|
|
191
45
|
declare function readAloudLanguage(code: string | null | undefined): ReadAloudLanguage;
|
|
192
46
|
|
|
193
|
-
export {
|
|
47
|
+
export { LIVE_CONVERSATION_SAMPLE_MODEL, LIVE_CONVERSATION_VOICES, READ_ALOUD_LANGUAGES, type ReadAloudLanguage, type VoiceOption, type VoiceSetId, allVoices, availableVoices, isLiveConversationVoice, readAloudLanguage, voiceDisplayName, voiceOptions, voiceSetDefaultLabel, voiceSetOf };
|
package/dist/voices.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export { A as ASSISTANT_VOICE_ID, C as CARTESIA_API_VERSION, a as COMMON_ABBREVIATION_EXPANSIONS, L as LEGACY_DEFAULT_VOICE_ID, P as ParseMarkdownToTextOptions, R as READING_VOICE_ID, S as SPEECH_BLANK_WORD, b as SpeechPronunciation, T as TTS_DEFAULT_SPEED, c as TTS_DEFAULT_VOLUME, d as TTS_MODEL_ID, e as TTS_PLAYBACK_BUFFER_SEC, f as TTS_SPEED_MAX, g as TTS_SPEED_MIN, h as TTS_STREAMING_BUFFER_SEC, V as VoicePurpose, n as normalizeSpeechAbbreviations, i as normalizeSpeechBlanks, p as parseMarkdownToText, r as resolveSpeed, j as resolveVoiceId } from './tts-config-JbF86KIt.js';
|
|
2
|
+
|
|
1
3
|
declare const availableVoices: {
|
|
2
4
|
id: string;
|
|
3
5
|
name: string;
|
|
@@ -10,52 +12,6 @@ declare const allVoices: {
|
|
|
10
12
|
description: string;
|
|
11
13
|
}[];
|
|
12
14
|
|
|
13
|
-
/**
|
|
14
|
-
* Central Cartesia TTS configuration — the single source of truth for the model,
|
|
15
|
-
* API version, system default voices, speed/volume baselines, and playback
|
|
16
|
-
* buffering used by every in-app TTS surface (chat read-aloud, studio
|
|
17
|
-
* read-aloud, voice playgrounds, the admin tester).
|
|
18
|
-
*
|
|
19
|
-
* Moved from matrx-frontend lib/cartesia/config.ts (P16 voices). The SDK-typed
|
|
20
|
-
* `buildGenerationConfig` stays with the host's Cartesia client.
|
|
21
|
-
*/
|
|
22
|
-
/** Current model + API version for all in-app TTS. */
|
|
23
|
-
declare const TTS_MODEL_ID = "sonic-3.5";
|
|
24
|
-
declare const CARTESIA_API_VERSION = "2026-08-14";
|
|
25
|
-
/**
|
|
26
|
-
* System default voices, used only when a user has not chosen their own.
|
|
27
|
-
* - reading → Skylar (primary female; document / read-aloud)
|
|
28
|
-
* - assistant → Daniel (primary male; assistant replies)
|
|
29
|
-
*/
|
|
30
|
-
declare const READING_VOICE_ID = "db6b0ed5-d5d3-463d-ae85-518a07d3c2b4";
|
|
31
|
-
declare const ASSISTANT_VOICE_ID = "47c38ca4-5f35-497b-b1a3-415245fb35e1";
|
|
32
|
-
/**
|
|
33
|
-
* The pre-2026 hardcoded default voice. Treated as "unset" by resolveVoiceId so
|
|
34
|
-
* users who never explicitly chose a voice transition to the new defaults.
|
|
35
|
-
*/
|
|
36
|
-
declare const LEGACY_DEFAULT_VOICE_ID = "156fb8d2-335b-4950-9cb3-a2d33befec77";
|
|
37
|
-
type VoicePurpose = "reading" | "assistant";
|
|
38
|
-
/** generation_config.speed range (1.0 = original). Our chosen baseline is 1.2. */
|
|
39
|
-
declare const TTS_SPEED_MIN = 0.6;
|
|
40
|
-
declare const TTS_SPEED_MAX = 1.5;
|
|
41
|
-
declare const TTS_DEFAULT_SPEED = 1.2;
|
|
42
|
-
/** generation_config.volume range (1.0 = original). */
|
|
43
|
-
declare const TTS_DEFAULT_VOLUME = 1;
|
|
44
|
-
/**
|
|
45
|
-
* Client-side player buffer (seconds). Higher than the old 0.25s, which
|
|
46
|
-
* caused stream underruns heard as choppy "pauses"; tune in one place.
|
|
47
|
-
*/
|
|
48
|
-
declare const TTS_PLAYBACK_BUFFER_SEC = 0.7;
|
|
49
|
-
/**
|
|
50
|
-
* Lower buffer for token-by-token streaming (real-time LLM speech) where
|
|
51
|
-
* latency matters more — still well above the old 0.1s that stuttered.
|
|
52
|
-
*/
|
|
53
|
-
declare const TTS_STREAMING_BUFFER_SEC = 0.3;
|
|
54
|
-
/** A user's explicit voice preference wins; otherwise the purpose default. */
|
|
55
|
-
declare function resolveVoiceId(userVoiceId: string | null | undefined, purpose: VoicePurpose): string;
|
|
56
|
-
/** Clamp a stored speed to the valid generation_config range, else the default. */
|
|
57
|
-
declare function resolveSpeed(userSpeed: number | null | undefined): number;
|
|
58
|
-
|
|
59
15
|
type VoiceSetId = "cartesia" | "xai";
|
|
60
16
|
interface VoiceOption {
|
|
61
17
|
id: string;
|
|
@@ -75,108 +31,6 @@ declare function voiceDisplayName(set: VoiceSetId, value: unknown): string;
|
|
|
75
31
|
/** True when `id` is one of the live voice conversation (xAI Realtime) voices. */
|
|
76
32
|
declare function isLiveConversationVoice(id: string): boolean;
|
|
77
33
|
|
|
78
|
-
/** A term→spoken-form substitution applied before any other speech parsing. */
|
|
79
|
-
interface SpeechPronunciation {
|
|
80
|
-
from: string;
|
|
81
|
-
to: string;
|
|
82
|
-
}
|
|
83
|
-
interface ParseMarkdownToTextOptions {
|
|
84
|
-
/**
|
|
85
|
-
* Custom Dictionary pronunciation substitutions. Applied FIRST — before the
|
|
86
|
-
* built-in abbreviation/number normalization — so a user term like "AI" can
|
|
87
|
-
* supply its own spoken form instead of the generic "A I" readout. Pairs
|
|
88
|
-
* should be sorted longest-first by the caller so multi-word terms replace
|
|
89
|
-
* before substrings.
|
|
90
|
-
*/
|
|
91
|
-
pronunciations?: SpeechPronunciation[];
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* Long-form meanings retained as reference data for search, display, or future
|
|
95
|
-
* accessibility features. TTS must not use these expansions: repeatedly
|
|
96
|
-
* reading "Application Programming Interface" for API is not natural speech.
|
|
97
|
-
*/
|
|
98
|
-
declare const COMMON_ABBREVIATION_EXPANSIONS: {
|
|
99
|
-
readonly AI: "Artificial Intelligence";
|
|
100
|
-
readonly API: "Application Programming Interface";
|
|
101
|
-
readonly HTTP: "Hypertext Transfer Protocol";
|
|
102
|
-
readonly HTTPS: "Hypertext Transfer Protocol Secure";
|
|
103
|
-
readonly URL: "Uniform Resource Locator";
|
|
104
|
-
readonly URI: "Uniform Resource Identifier";
|
|
105
|
-
readonly JSON: "JavaScript Object Notation";
|
|
106
|
-
readonly XML: "eXtensible Markup Language";
|
|
107
|
-
readonly CSS: "Cascading Style Sheets";
|
|
108
|
-
readonly HTML: "Hypertext Markup Language";
|
|
109
|
-
readonly JS: "JavaScript";
|
|
110
|
-
readonly TS: "TypeScript";
|
|
111
|
-
readonly SQL: "Structured Query Language";
|
|
112
|
-
readonly DB: "Database";
|
|
113
|
-
readonly UI: "User Interface";
|
|
114
|
-
readonly UX: "User Experience";
|
|
115
|
-
readonly SEO: "Search Engine Optimization";
|
|
116
|
-
readonly SDK: "Software Development Kit";
|
|
117
|
-
readonly CLI: "Command Line Interface";
|
|
118
|
-
readonly IDE: "Integrated Development Environment";
|
|
119
|
-
readonly JWT: "JSON Web Token";
|
|
120
|
-
readonly OAuth: "Open Authorization";
|
|
121
|
-
readonly REST: "Representational State Transfer";
|
|
122
|
-
readonly CRUD: "Create Read Update Delete";
|
|
123
|
-
readonly MVC: "Model View Controller";
|
|
124
|
-
readonly SPA: "Single Page Application";
|
|
125
|
-
readonly SSR: "Server Side Rendering";
|
|
126
|
-
readonly CSR: "Client Side Rendering";
|
|
127
|
-
readonly PWA: "Progressive Web App";
|
|
128
|
-
readonly DOM: "Document Object Model";
|
|
129
|
-
readonly BOM: "Browser Object Model";
|
|
130
|
-
readonly CDN: "Content Delivery Network";
|
|
131
|
-
readonly CMS: "Content Management System";
|
|
132
|
-
readonly ERP: "Enterprise Resource Planning";
|
|
133
|
-
readonly CRM: "Customer Relationship Management";
|
|
134
|
-
readonly SaaS: "Software as a Service";
|
|
135
|
-
readonly PaaS: "Platform as a Service";
|
|
136
|
-
readonly IaaS: "Infrastructure as a Service";
|
|
137
|
-
readonly VPN: "Virtual Private Network";
|
|
138
|
-
readonly LAN: "Local Area Network";
|
|
139
|
-
readonly WAN: "Wide Area Network";
|
|
140
|
-
readonly TCP: "Transmission Control Protocol";
|
|
141
|
-
readonly UDP: "User Datagram Protocol";
|
|
142
|
-
readonly IP: "Internet Protocol";
|
|
143
|
-
readonly DNS: "Domain Name System";
|
|
144
|
-
readonly FTP: "File Transfer Protocol";
|
|
145
|
-
readonly SMTP: "Simple Mail Transfer Protocol";
|
|
146
|
-
readonly POP3: "Post Office Protocol version 3";
|
|
147
|
-
readonly IMAP: "Internet Message Access Protocol";
|
|
148
|
-
};
|
|
149
|
-
/**
|
|
150
|
-
* Normalize technical abbreviations for both active TTS lanes.
|
|
151
|
-
*
|
|
152
|
-
* Cartesia Sonic 3.5 recommends single-space character delimiters for forced
|
|
153
|
-
* readout ("A P I"), and that plain-text form also works with the catalog's
|
|
154
|
-
* Groq/Orpheus engine, which has no SSML/pronunciation-dictionary input. Word
|
|
155
|
-
* acronyms stay conventional so models can say "json", "oh-auth", etc.
|
|
156
|
-
*/
|
|
157
|
-
declare function normalizeSpeechAbbreviations(text: string): string;
|
|
158
|
-
/**
|
|
159
|
-
* The spoken word a fill-in-the-blank run of underscores becomes. One constant
|
|
160
|
-
* so every speech surface reads the same thing — change it here (e.g. "what")
|
|
161
|
-
* and TTS + generated flashcard fronts follow.
|
|
162
|
-
*/
|
|
163
|
-
declare const SPEECH_BLANK_WORD = "blank";
|
|
164
|
-
/**
|
|
165
|
-
* Fill-in-the-blank underscores → a spoken word. A run of two-or-more
|
|
166
|
-
* underscores (any length — "___", "_____"), including the spaced style
|
|
167
|
-
* ("_ _ _"), reads as "blank" instead of the literal "underscore" every TTS
|
|
168
|
-
* engine would otherwise say. Generic and reusable: the centralized speech
|
|
169
|
-
* cleaner AND the generated flashcard spoken-fronts both route through this, so
|
|
170
|
-
* a blank sounds identical everywhere.
|
|
171
|
-
*
|
|
172
|
-
* Guards (so it only ever touches real blanks):
|
|
173
|
-
* - bounded by non-alphanumerics → never mangles `snake_case` or `__dunder__`;
|
|
174
|
-
* - a line of ONLY underscores is a markdown thematic break (divider), left
|
|
175
|
-
* untouched here for the horizontal-rule rule to drop.
|
|
176
|
-
*/
|
|
177
|
-
declare function normalizeSpeechBlanks(text: string): string;
|
|
178
|
-
declare function parseMarkdownToText(markdown: string, options?: ParseMarkdownToTextOptions): string;
|
|
179
|
-
|
|
180
34
|
/**
|
|
181
35
|
* The languages read-aloud offers, with each language's own name — the union of the website's
|
|
182
36
|
* voice-language setting and the extension's quick picker (which added Persian).
|
|
@@ -190,4 +44,4 @@ declare const READ_ALOUD_LANGUAGES: readonly ReadAloudLanguage[];
|
|
|
190
44
|
/** The language for `code`, or English when the code is not offered. */
|
|
191
45
|
declare function readAloudLanguage(code: string | null | undefined): ReadAloudLanguage;
|
|
192
46
|
|
|
193
|
-
export {
|
|
47
|
+
export { LIVE_CONVERSATION_SAMPLE_MODEL, LIVE_CONVERSATION_VOICES, READ_ALOUD_LANGUAGES, type ReadAloudLanguage, type VoiceOption, type VoiceSetId, allVoices, availableVoices, isLiveConversationVoice, readAloudLanguage, voiceDisplayName, voiceOptions, voiceSetDefaultLabel, voiceSetOf };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-matrx/media",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0",
|
|
4
4
|
"description": "The AI Matrx media components kit: durable-ref-only renderers for images, video, audio and file thumbnails plus live TTS playback that just work with the Matrx file system — headless core hooks plus DOM bindings, wired to an injected MediaClient. A signed URL is a handoff, never an identity.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -138,6 +138,16 @@
|
|
|
138
138
|
"default": "./dist/voices.cjs"
|
|
139
139
|
}
|
|
140
140
|
},
|
|
141
|
+
"./speech": {
|
|
142
|
+
"import": {
|
|
143
|
+
"types": "./dist/speech.d.ts",
|
|
144
|
+
"default": "./dist/speech.js"
|
|
145
|
+
},
|
|
146
|
+
"require": {
|
|
147
|
+
"types": "./dist/speech.d.cts",
|
|
148
|
+
"default": "./dist/speech.cjs"
|
|
149
|
+
}
|
|
150
|
+
},
|
|
141
151
|
"./files/engine/api/assets": {
|
|
142
152
|
"import": {
|
|
143
153
|
"types": "./dist/files/engine/api/assets.d.ts",
|
|
@@ -751,6 +761,7 @@
|
|
|
751
761
|
"./package.json": "./package.json"
|
|
752
762
|
},
|
|
753
763
|
"dependencies": {
|
|
764
|
+
"@cartesia/cartesia-js": "^4.2.0",
|
|
754
765
|
"@supabase/postgrest-js": "^2.117.2",
|
|
755
766
|
"@supabase/supabase-js": "^2.117.2",
|
|
756
767
|
"dexie": "^4.4.6",
|
|
@@ -758,13 +769,13 @@
|
|
|
758
769
|
"reselect": "^5.1.0",
|
|
759
770
|
"tailwind-merge": "^3.7.0",
|
|
760
771
|
"@ai-matrx/agents": "latest",
|
|
761
|
-
"@ai-matrx/associations": "latest",
|
|
762
772
|
"@ai-matrx/content-ir": "latest",
|
|
763
773
|
"@ai-matrx/data": "latest",
|
|
764
774
|
"@ai-matrx/design-system": "latest",
|
|
765
775
|
"@ai-matrx/kit": "latest",
|
|
766
|
-
"@ai-matrx/
|
|
767
|
-
"@ai-matrx/tap-target": "latest"
|
|
776
|
+
"@ai-matrx/associations": "latest",
|
|
777
|
+
"@ai-matrx/tap-target": "latest",
|
|
778
|
+
"@ai-matrx/realtime": "latest"
|
|
768
779
|
},
|
|
769
780
|
"peerDependencies": {
|
|
770
781
|
"@reduxjs/toolkit": ">=2.0.0",
|