@ai-matrx/media 0.15.39 → 0.15.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/speech.d.cts CHANGED
@@ -142,6 +142,11 @@ interface SpeechPorts {
142
142
  completeRequest?: (request: PlaybackRequest) => PlaybackRequest;
143
143
  }
144
144
  declare function configureSpeech(next: Partial<SpeechPorts>): void;
145
+ /**
146
+ * True when a host already wired `key` (default: the Cartesia token). A package that ships a
147
+ * bare-host default (chat's `BareHostChrome`) fills only what nobody set, never overriding the host.
148
+ */
149
+ declare function isSpeechConfigured(key?: keyof SpeechPorts): boolean;
145
150
  /** Test seam: forget every port. */
146
151
  declare function resetSpeechPortsForTests(): void;
147
152
 
@@ -562,4 +567,4 @@ declare function buildGenerationConfig(opts?: {
562
567
  };
563
568
  declare const cartesiaAdapter: PlaybackAdapter;
564
569
 
565
- export { type ActivePlayback, CartesiaAudioSource, type CartesiaConnectionCtx, type CartesiaTtsRequest, type CartesiaTtsResponse, type CartesiaTtsSocket, type CartesiaTtsSocketOptions, type CartesiaTtsVoice, type EnqueueResult, type PlayableSource, type PlaybackAdapter, type PlaybackAdapterCallbacks, type PlaybackHolder, type PlaybackItem, type PlaybackItemStatus, type PlaybackProvider, type PlaybackRequest, type PlaybackSnapshot, type PlaybackTakeover, ProviderSessionError, type SinkAwareAudioContext, SinkAwarePlayer, type SinkAwarePlayerOptions, type SpeakRequest, type SpeakResult, type SpeechPorts, type SpeechVoiceSettings, applySinkToMediaElement, audioContextSinkSupported, buildGenerationConfig, cartesiaAdapter, claimPlayback, clearPlayback, configureSpeech, connectCartesiaTts, enqueuePlayback, getActivePlaybackHolderId, getPlaybackSnapshot, getPreferredOutputDeviceId, getPrimedMediaElement, getUnlockedAudioContext, installAudioUnlockListeners, isCartesiaAuthError, isPlaybackHeld, mediaElementSinkSupported, outputSelectionSupported, pausePlayback, playPlaybackItem, primeAudioOutput, releasePlayback, removePlaybackItem, resetPlaybackForTests, resetSpeechPortsForTests, resolveSpeakEngine, resumePlayback, setPlaybackRate, setPreferredOutputDeviceId, skipPlayback, speak, subscribeOutputDevice, subscribePlayback, subscribePlaybackLock };
570
+ export { type ActivePlayback, CartesiaAudioSource, type CartesiaConnectionCtx, type CartesiaTtsRequest, type CartesiaTtsResponse, type CartesiaTtsSocket, type CartesiaTtsSocketOptions, type CartesiaTtsVoice, type EnqueueResult, type PlayableSource, type PlaybackAdapter, type PlaybackAdapterCallbacks, type PlaybackHolder, type PlaybackItem, type PlaybackItemStatus, type PlaybackProvider, type PlaybackRequest, type PlaybackSnapshot, type PlaybackTakeover, ProviderSessionError, type SinkAwareAudioContext, SinkAwarePlayer, type SinkAwarePlayerOptions, type SpeakRequest, type SpeakResult, type SpeechPorts, type SpeechVoiceSettings, applySinkToMediaElement, audioContextSinkSupported, buildGenerationConfig, cartesiaAdapter, claimPlayback, clearPlayback, configureSpeech, connectCartesiaTts, enqueuePlayback, getActivePlaybackHolderId, getPlaybackSnapshot, getPreferredOutputDeviceId, getPrimedMediaElement, getUnlockedAudioContext, installAudioUnlockListeners, isCartesiaAuthError, isPlaybackHeld, isSpeechConfigured, mediaElementSinkSupported, outputSelectionSupported, pausePlayback, playPlaybackItem, primeAudioOutput, releasePlayback, removePlaybackItem, resetPlaybackForTests, resetSpeechPortsForTests, resolveSpeakEngine, resumePlayback, setPlaybackRate, setPreferredOutputDeviceId, skipPlayback, speak, subscribeOutputDevice, subscribePlayback, subscribePlaybackLock };
package/dist/speech.d.ts CHANGED
@@ -142,6 +142,11 @@ interface SpeechPorts {
142
142
  completeRequest?: (request: PlaybackRequest) => PlaybackRequest;
143
143
  }
144
144
  declare function configureSpeech(next: Partial<SpeechPorts>): void;
145
+ /**
146
+ * True when a host already wired `key` (default: the Cartesia token). A package that ships a
147
+ * bare-host default (chat's `BareHostChrome`) fills only what nobody set, never overriding the host.
148
+ */
149
+ declare function isSpeechConfigured(key?: keyof SpeechPorts): boolean;
145
150
  /** Test seam: forget every port. */
146
151
  declare function resetSpeechPortsForTests(): void;
147
152
 
@@ -562,4 +567,4 @@ declare function buildGenerationConfig(opts?: {
562
567
  };
563
568
  declare const cartesiaAdapter: PlaybackAdapter;
564
569
 
565
- export { type ActivePlayback, CartesiaAudioSource, type CartesiaConnectionCtx, type CartesiaTtsRequest, type CartesiaTtsResponse, type CartesiaTtsSocket, type CartesiaTtsSocketOptions, type CartesiaTtsVoice, type EnqueueResult, type PlayableSource, type PlaybackAdapter, type PlaybackAdapterCallbacks, type PlaybackHolder, type PlaybackItem, type PlaybackItemStatus, type PlaybackProvider, type PlaybackRequest, type PlaybackSnapshot, type PlaybackTakeover, ProviderSessionError, type SinkAwareAudioContext, SinkAwarePlayer, type SinkAwarePlayerOptions, type SpeakRequest, type SpeakResult, type SpeechPorts, type SpeechVoiceSettings, applySinkToMediaElement, audioContextSinkSupported, buildGenerationConfig, cartesiaAdapter, claimPlayback, clearPlayback, configureSpeech, connectCartesiaTts, enqueuePlayback, getActivePlaybackHolderId, getPlaybackSnapshot, getPreferredOutputDeviceId, getPrimedMediaElement, getUnlockedAudioContext, installAudioUnlockListeners, isCartesiaAuthError, isPlaybackHeld, mediaElementSinkSupported, outputSelectionSupported, pausePlayback, playPlaybackItem, primeAudioOutput, releasePlayback, removePlaybackItem, resetPlaybackForTests, resetSpeechPortsForTests, resolveSpeakEngine, resumePlayback, setPlaybackRate, setPreferredOutputDeviceId, skipPlayback, speak, subscribeOutputDevice, subscribePlayback, subscribePlaybackLock };
570
+ export { type ActivePlayback, CartesiaAudioSource, type CartesiaConnectionCtx, type CartesiaTtsRequest, type CartesiaTtsResponse, type CartesiaTtsSocket, type CartesiaTtsSocketOptions, type CartesiaTtsVoice, type EnqueueResult, type PlayableSource, type PlaybackAdapter, type PlaybackAdapterCallbacks, type PlaybackHolder, type PlaybackItem, type PlaybackItemStatus, type PlaybackProvider, type PlaybackRequest, type PlaybackSnapshot, type PlaybackTakeover, ProviderSessionError, type SinkAwareAudioContext, SinkAwarePlayer, type SinkAwarePlayerOptions, type SpeakRequest, type SpeakResult, type SpeechPorts, type SpeechVoiceSettings, applySinkToMediaElement, audioContextSinkSupported, buildGenerationConfig, cartesiaAdapter, claimPlayback, clearPlayback, configureSpeech, connectCartesiaTts, enqueuePlayback, getActivePlaybackHolderId, getPlaybackSnapshot, getPreferredOutputDeviceId, getPrimedMediaElement, getUnlockedAudioContext, installAudioUnlockListeners, isCartesiaAuthError, isPlaybackHeld, isSpeechConfigured, mediaElementSinkSupported, outputSelectionSupported, pausePlayback, playPlaybackItem, primeAudioOutput, releasePlayback, removePlaybackItem, resetPlaybackForTests, resetSpeechPortsForTests, resolveSpeakEngine, resumePlayback, setPlaybackRate, setPreferredOutputDeviceId, skipPlayback, speak, subscribeOutputDevice, subscribePlayback, subscribePlaybackLock };
package/dist/speech.js CHANGED
@@ -20,6 +20,9 @@ function configureSpeech(next) {
20
20
  function speechPorts() {
21
21
  return ports;
22
22
  }
23
+ function isSpeechConfigured(key = "getCartesiaToken") {
24
+ return ports[key] !== void 0;
25
+ }
23
26
  function requirePort(key) {
24
27
  const value = ports[key];
25
28
  if (!value) {
@@ -1661,6 +1664,7 @@ export {
1661
1664
  installAudioUnlockListeners,
1662
1665
  isCartesiaAuthError,
1663
1666
  isPlaybackHeld,
1667
+ isSpeechConfigured,
1664
1668
  mediaElementSinkSupported,
1665
1669
  outputSelectionSupported,
1666
1670
  pausePlayback,