react-native-davoice-tts 1.0.400 → 1.0.402

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.
Files changed (24) hide show
  1. package/TTSRNBridge.podspec +1 -1
  2. package/android/libs/com/davoice/tts/1.0.0/tts-1.0.0.aar +0 -0
  3. package/android/libs/com/davoice/tts/1.0.0/tts-1.0.0.aar.md5 +1 -1
  4. package/android/libs/com/davoice/tts/1.0.0/tts-1.0.0.aar.sha1 +1 -1
  5. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/DavoiceTTS +0 -0
  6. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Headers/DavoiceTTS-Swift.h +9 -1
  7. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.abi.json +3011 -3279
  8. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.private.swiftinterface +6 -1
  9. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  10. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.swiftinterface +6 -1
  11. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/DavoiceTTS +0 -0
  12. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Headers/DavoiceTTS-Swift.h +18 -2
  13. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.abi.json +3011 -3279
  14. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +6 -1
  15. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  16. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.swiftinterface +6 -1
  17. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.abi.json +3011 -3279
  18. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +6 -1
  19. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  20. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +6 -1
  21. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/_CodeSignature/CodeDirectory +0 -0
  22. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/_CodeSignature/CodeRequirements-1 +0 -0
  23. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/_CodeSignature/CodeResources +33 -33
  24. package/package.json +1 -1
@@ -32,6 +32,8 @@ public typealias ResumeEngineAfterAudioSessionCycle = () -> Swift.Void
32
32
  public enum AudioPlaybackHook {
33
33
  public static var engineScheduleFile: DavoiceTTS.EngineSchedule?
34
34
  public static var engineScheduleFailedAsync: ((Foundation.URL) -> Swift.Void)?
35
+ public static var sttRoutingConfigDidChange: (() -> Swift.Void)?
36
+ public static var stopSpeakingForRoutingChange: (() -> Swift.Void)?
35
37
  public static var isEngineReady: DavoiceTTS.IsEngineReady?
36
38
  public static var useOnlyEnginePlayback: DavoiceTTS.useOnlyEnginePlayback?
37
39
  public static var stopEnginePlayback: DavoiceTTS.StopEnginePlayback?
@@ -114,7 +116,7 @@ public enum AudioPlaybackHook {
114
116
  final public func beginAudioProduction() -> Foundation.UUID
115
117
  final public func endAudioProduction(_ token: Foundation.UUID)
116
118
  final public func enqueue(_ source: DavoiceTTS.SwiftSoundQueue.Source)
117
- final public func enqueueMany(_ sources: [DavoiceTTS.SwiftSoundQueue.Source])
119
+ final public func enqueueMany(_ sources: [DavoiceTTS.SwiftSoundQueue.Source], deletingAfterPlayback owned: [Foundation.URL] = [])
118
120
  final public func stop()
119
121
  public enum Source {
120
122
  case fileURL(Foundation.URL)
@@ -123,6 +125,9 @@ public enum AudioPlaybackHook {
123
125
  }
124
126
  final public func teardownTtsv2Engine()
125
127
  @objc final public func audioPlayerDidFinishPlaying(_ p: AVFAudio.AVAudioPlayer, successfully ok: Swift.Bool)
128
+ #if compiler(>=5.3) && $NonescapableTypes
129
+ @objc final public func audioPlayerDecodeErrorDidOccur(_ p: AVFAudio.AVAudioPlayer, error: (any Swift.Error)?)
130
+ #endif
126
131
  final public func activatePlaybackOnlySession()
127
132
  final public func activateSpeaker()
128
133
  }
@@ -32,6 +32,8 @@ public typealias ResumeEngineAfterAudioSessionCycle = () -> Swift.Void
32
32
  public enum AudioPlaybackHook {
33
33
  public static var engineScheduleFile: DavoiceTTS.EngineSchedule?
34
34
  public static var engineScheduleFailedAsync: ((Foundation.URL) -> Swift.Void)?
35
+ public static var sttRoutingConfigDidChange: (() -> Swift.Void)?
36
+ public static var stopSpeakingForRoutingChange: (() -> Swift.Void)?
35
37
  public static var isEngineReady: DavoiceTTS.IsEngineReady?
36
38
  public static var useOnlyEnginePlayback: DavoiceTTS.useOnlyEnginePlayback?
37
39
  public static var stopEnginePlayback: DavoiceTTS.StopEnginePlayback?
@@ -114,7 +116,7 @@ public enum AudioPlaybackHook {
114
116
  final public func beginAudioProduction() -> Foundation.UUID
115
117
  final public func endAudioProduction(_ token: Foundation.UUID)
116
118
  final public func enqueue(_ source: DavoiceTTS.SwiftSoundQueue.Source)
117
- final public func enqueueMany(_ sources: [DavoiceTTS.SwiftSoundQueue.Source])
119
+ final public func enqueueMany(_ sources: [DavoiceTTS.SwiftSoundQueue.Source], deletingAfterPlayback owned: [Foundation.URL] = [])
118
120
  final public func stop()
119
121
  public enum Source {
120
122
  case fileURL(Foundation.URL)
@@ -123,6 +125,9 @@ public enum AudioPlaybackHook {
123
125
  }
124
126
  final public func teardownTtsv2Engine()
125
127
  @objc final public func audioPlayerDidFinishPlaying(_ p: AVFAudio.AVAudioPlayer, successfully ok: Swift.Bool)
128
+ #if compiler(>=5.3) && $NonescapableTypes
129
+ @objc final public func audioPlayerDecodeErrorDidOccur(_ p: AVFAudio.AVAudioPlayer, error: (any Swift.Error)?)
130
+ #endif
126
131
  final public func activatePlaybackOnlySession()
127
132
  final public func activateSpeaker()
128
133
  }
@@ -312,6 +312,11 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
312
312
  /// DaVoice prefers this direct config and falls back to the wakeword library’s config.
313
313
  SWIFT_CLASS("_TtC10DavoiceTTS25DaVoiceAudioRoutingConfig")
314
314
  @interface DaVoiceAudioRoutingConfig : NSObject
315
+ /// Can be called at any time. When the wake-word framework is in the app,
316
+ /// the JSON is also written into wake word’s store, so both libraries always
317
+ /// run on the same config whichever API the app calls (wake word’s setter
318
+ /// then announces the change). Without wake word, the change is announced
319
+ /// here. Either way RoutingConfigChange applies it once, safely.
315
320
  + (BOOL)setAudioRoutingConfigJSONString:(NSString * _Nonnull)json SWIFT_WARN_UNUSED_RESULT;
316
321
  + (void)clearAudioRoutingConfig;
317
322
  - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@@ -351,7 +356,6 @@ SWIFT_CLASS("_TtC10DavoiceTTS10DaVoiceTTS")
351
356
  - (BOOL)setLicenseWithLicenseKey:(NSString * _Nonnull)licenseKey SWIFT_WARN_UNUSED_RESULT;
352
357
  - (void)setUseEuropeanNumberFormat:(BOOL)enabled;
353
358
  - (nullable instancetype)initWithModel:(NSURL * _Nonnull)model error:(NSError * _Nullable * _Nullable)error OBJC_DESIGNATED_INITIALIZER;
354
- /// Immediately stop speaking: cancels future synthesis work and flushes all playback.
355
359
  - (void)stopSpeaking;
356
360
  /// Destroy the TTS instance resources; after this call, the object should not be used.
357
361
  /// Effectively returns the instance to “pre-init” state.
@@ -446,6 +450,10 @@ SWIFT_CLASS("_TtC10DavoiceTTS15SwiftSoundQueue")
446
450
  - (nonnull instancetype)init SWIFT_UNAVAILABLE;
447
451
  + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
448
452
  - (void)audioPlayerDidFinishPlaying:(AVAudioPlayer * _Nonnull)p successfully:(BOOL)ok;
453
+ /// A decode error ends playback WITHOUT audioPlayerDidFinishPlaying, which
454
+ /// used to leave the queue waiting on this player forever. Treat it as the
455
+ /// end of the item.
456
+ - (void)audioPlayerDecodeErrorDidOccur:(AVAudioPlayer * _Nonnull)p error:(NSError * _Nullable)error;
449
457
  @end
450
458
 
451
459
  #endif
@@ -770,6 +778,11 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
770
778
  /// DaVoice prefers this direct config and falls back to the wakeword library’s config.
771
779
  SWIFT_CLASS("_TtC10DavoiceTTS25DaVoiceAudioRoutingConfig")
772
780
  @interface DaVoiceAudioRoutingConfig : NSObject
781
+ /// Can be called at any time. When the wake-word framework is in the app,
782
+ /// the JSON is also written into wake word’s store, so both libraries always
783
+ /// run on the same config whichever API the app calls (wake word’s setter
784
+ /// then announces the change). Without wake word, the change is announced
785
+ /// here. Either way RoutingConfigChange applies it once, safely.
773
786
  + (BOOL)setAudioRoutingConfigJSONString:(NSString * _Nonnull)json SWIFT_WARN_UNUSED_RESULT;
774
787
  + (void)clearAudioRoutingConfig;
775
788
  - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@@ -809,7 +822,6 @@ SWIFT_CLASS("_TtC10DavoiceTTS10DaVoiceTTS")
809
822
  - (BOOL)setLicenseWithLicenseKey:(NSString * _Nonnull)licenseKey SWIFT_WARN_UNUSED_RESULT;
810
823
  - (void)setUseEuropeanNumberFormat:(BOOL)enabled;
811
824
  - (nullable instancetype)initWithModel:(NSURL * _Nonnull)model error:(NSError * _Nullable * _Nullable)error OBJC_DESIGNATED_INITIALIZER;
812
- /// Immediately stop speaking: cancels future synthesis work and flushes all playback.
813
825
  - (void)stopSpeaking;
814
826
  /// Destroy the TTS instance resources; after this call, the object should not be used.
815
827
  /// Effectively returns the instance to “pre-init” state.
@@ -904,6 +916,10 @@ SWIFT_CLASS("_TtC10DavoiceTTS15SwiftSoundQueue")
904
916
  - (nonnull instancetype)init SWIFT_UNAVAILABLE;
905
917
  + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
906
918
  - (void)audioPlayerDidFinishPlaying:(AVAudioPlayer * _Nonnull)p successfully:(BOOL)ok;
919
+ /// A decode error ends playback WITHOUT audioPlayerDidFinishPlaying, which
920
+ /// used to leave the queue waiting on this player forever. Treat it as the
921
+ /// end of the item.
922
+ - (void)audioPlayerDecodeErrorDidOccur:(AVAudioPlayer * _Nonnull)p error:(NSError * _Nullable)error;
907
923
  @end
908
924
 
909
925
  #endif