react-native-davoice-tts 1.0.415 → 1.0.417

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 (18) 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 +0 -82
  7. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.abi.json +593 -593
  8. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  9. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/DavoiceTTS +0 -0
  10. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Headers/DavoiceTTS-Swift.h +0 -164
  11. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.abi.json +593 -593
  12. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  13. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.abi.json +593 -593
  14. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  15. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/_CodeSignature/CodeDirectory +0 -0
  16. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/_CodeSignature/CodeRequirements-1 +0 -0
  17. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/_CodeSignature/CodeResources +21 -21
  18. package/package.json +1 -1
@@ -2,7 +2,7 @@ require 'json'
2
2
 
3
3
  Pod::Spec.new do |s|
4
4
  s.name = "TTSRNBridge"
5
- s.version = "1.0.419" # Update to your package version
5
+ s.version = "1.0.423" # Update to your package version
6
6
  s.summary = "TTS for React Native."
7
7
  s.description = <<-DESC
8
8
  A React Native module for tts .
@@ -1 +1 @@
1
- e72e0cb87711fcfe62ef0a70e1be321f tts-1.0.0.aar
1
+ 9c2900d3bbc5599ade3ff6c0c5133e53 tts-1.0.0.aar
@@ -1 +1 @@
1
- 80be65703726e7cd12514b40b71ca6e7f794f460 tts-1.0.0.aar
1
+ 3ab209cbfc132f971a308a04d8cc89c8e0db4d97 tts-1.0.0.aar
@@ -308,36 +308,19 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
308
308
  #if defined(__OBJC__)
309
309
 
310
310
  @class NSString;
311
- /// Stores the speech library’s audio-routing JSON before STT/TTS initialization.
312
- /// DaVoice prefers this direct config and falls back to the wakeword library’s config.
313
311
  SWIFT_CLASS("_TtC10DavoiceTTS25DaVoiceAudioRoutingConfig")
314
312
  @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.
320
313
  + (BOOL)setAudioRoutingConfigJSONString:(NSString * _Nonnull)json SWIFT_WARN_UNUSED_RESULT;
321
314
  + (void)clearAudioRoutingConfig;
322
315
  - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
323
316
  @end
324
317
 
325
318
  @class AVAudioSession;
326
- /// Echo cancellation for iPhones WITHOUT Apple’s session-level echo-cancelled
327
- /// input (<code>AVAudioSession.isEchoCancelledInputAvailable</code>, iOS 18.2+ on
328
- /// supported hardware). On those devices AEC only exists inside an
329
- /// AVAudioEngine with voice processing on, and it only cancels audio played
330
- /// through that same engine – so TTS must play through the engine whose mic
331
- /// input the listeners hear. See pocketTTS/AECSupportIOS.md.
332
- /// Nothing here runs on devices WITH session-level AEC, or when AEC isn’t
333
- /// requested: every caller then takes its exact pre-existing path.
334
319
  SWIFT_CLASS("_TtC10DavoiceTTS16DaVoiceLegacyAEC")
335
320
  @interface DaVoiceLegacyAEC : NSObject
336
- /// Kill switch for the old-iPhone fallback (default true).
337
321
  SWIFT_CLASS_PROPERTY(@property (nonatomic, class) BOOL isEnabled;)
338
322
  + (BOOL)isEnabled SWIFT_WARN_UNUSED_RESULT;
339
323
  + (void)setIsEnabled:(BOOL)newValue;
340
- /// True when this device/OS offers session-level AEC (see observeDevice).
341
324
  + (BOOL)deviceHasSessionLevelAEC:(AVAudioSession * _Nonnull)session SWIFT_WARN_UNUSED_RESULT;
342
325
  - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
343
326
  @end
@@ -350,48 +333,9 @@ SWIFT_CLASS("_TtC10DavoiceTTS10DaVoiceTTS")
350
333
  + (void)setUseDavoiceProprietaryPhonemizer:(BOOL)enabled;
351
334
  + (BOOL)getUseDavoiceProprietaryPhonemizer SWIFT_WARN_UNUSED_RESULT;
352
335
  - (BOOL)isUsingDavoiceProprietaryPhonemizer SWIFT_WARN_UNUSED_RESULT;
353
- /// Voices available in the loaded .dm (the names changeVoice() accepts, the
354
- /// first being the default). Empty for v1 models, a .dm without voices, or
355
- /// after destroy().
356
336
  - (NSArray<NSString *> * _Nonnull)getAllVoices SWIFT_WARN_UNUSED_RESULT;
357
- /// Style variants (“abilities”) of a voice in the loaded .dm, e.g.
358
- /// getVoiceAbilities(“Rich”) -> [“angry_whisper”, …, “military_sergeant_hard”, …].
359
- /// Use them with ElevenLabs-style “[free text]” tags in speak() text, before
360
- /// the words they apply to, until the next tag: “Ok, [drill sergeant] give me
361
- /// 50! [regular] Thanks.” Unmatched tags use the default voice; tags are never
362
- /// spoken. Empty for voices without variants, v1 models, or after destroy().
363
337
  - (NSArray<NSString *> * _Nonnull)getVoiceAbilities:(NSString * _Nonnull)name SWIFT_WARN_UNUSED_RESULT;
364
- /// Also look for voices in the folder <code>path</code>: <name>.emd / <name>.npy files,
365
- /// e.g. made by createVoiceClone(). They are listed by getAllVoices()
366
- /// after the bundled voices and selected with changeVoice() like them; a
367
- /// bundled voice wins over an external file with the same name. Call it
368
- /// again to pick up new files; nil or “” removes the external voices.
369
- /// <code>completion</code> gets the external voice names found ([] for a v1 model or a
370
- /// missing folder).
371
338
  - (void)setExternalVoicesPath:(NSString * _Nullable)path completion:(void (^ _Nullable)(NSArray<NSString *> * _Nonnull))completion;
372
- /// Voice cloning: creates a voice from a recording and saves it as a
373
- /// packed .emd at <code>outputPath</code>.
374
- /// <ul>
375
- /// <li>
376
- /// inputAudioPath: a recording of one speaker (wav, mp3, m4a/aac, caf,
377
- /// aiff, flac, …). It is prepared for cloning automatically.
378
- /// </li>
379
- /// <li>
380
- /// outputPath: the .emd file to write (”.emd” is added when missing), or a
381
- /// folder (-> <folder>/<input name>.emd). The file name is the voice name.
382
- /// </li>
383
- /// <li>
384
- /// embedderPath: the language’s voice encoder, embedder_<code>.dm
385
- /// (e.g. embedder_en.dm); it is resolved in memory only.
386
- /// </li>
387
- /// <li>
388
- /// volume: loudness of the voice relative to the recording – 1.0 keeps it
389
- /// (the 3-argument form), 1.2 is 20% louder, 0.8 is 20% quieter (a number > 0).
390
- /// </li>
391
- /// </ul>
392
- /// Returns [“path”, “voice”, “warnings”]; when “warnings” is non-empty, ask
393
- /// the user to record again. Put the file in the folder given to
394
- /// setExternalVoicesPath() (and call that again) to use it.
395
339
  + (NSDictionary<NSString *, id> * _Nullable)createVoiceClone:(NSString * _Nonnull)inputAudioPath outputPath:(NSString * _Nonnull)outputPath embedderPath:(NSString * _Nonnull)embedderPath error:(NSError * _Nullable * _Nullable)error SWIFT_WARN_UNUSED_RESULT;
396
340
  + (NSDictionary<NSString *, id> * _Nullable)createVoiceClone:(NSString * _Nonnull)inputAudioPath outputPath:(NSString * _Nonnull)outputPath embedderPath:(NSString * _Nonnull)embedderPath volume:(double)volume error:(NSError * _Nullable * _Nullable)error SWIFT_WARN_UNUSED_RESULT;
397
341
  - (void)changeVoice:(NSString * _Nonnull)name completion:(void (^ _Nonnull)(NSInteger))completion;
@@ -401,18 +345,11 @@ SWIFT_CLASS("_TtC10DavoiceTTS10DaVoiceTTS")
401
345
  - (void)setUseEuropeanNumberFormat:(BOOL)enabled;
402
346
  - (nullable instancetype)initWithModel:(NSURL * _Nonnull)model error:(NSError * _Nullable * _Nullable)error OBJC_DESIGNATED_INITIALIZER;
403
347
  - (void)stopSpeaking;
404
- /// Destroy the TTS instance resources; after this call, the object should not be used.
405
- /// Effectively returns the instance to “pre-init” state.
406
348
  - (void)destroy;
407
349
  - (void)speak:(NSString * _Nonnull)txt sid:(int32_t)sid;
408
350
  - (void)speak:(NSString * _Nonnull)txt sid:(int32_t)sid speed:(float)speed;
409
351
  - (AVAudioPCMBuffer * _Nullable)synthesize_top:(NSString * _Nonnull)_text speakerId:(int32_t)speakerId token:(NSUUID * _Nonnull)token speed_adjuster:(float)speed_adjuster error:(NSError * _Nullable * _Nullable)error SWIFT_WARN_UNUSED_RESULT;
410
- /// Queue an external WAV file for playback via the same AEC path/queue used by speak().
411
- /// If called repeatedly, items are queued in order. <code>onLastUtteranceFinished</code> fires
412
- /// after physical playback drains; audio-session restoration may remain debounced.
413
352
  - (void)playWav:(NSURL * _Nonnull)url markAsLastUtterance:(BOOL)markAsLastUtterance;
414
- /// Queue an in-memory PCM buffer (any format) for playback via the same AEC path/queue.
415
- /// We resample/normalize, write a temp WAV, then enqueue it (so it uses the engine hook).
416
353
  - (void)playBuffer:(AVAudioPCMBuffer * _Nonnull)buffer markAsLastUtterance:(BOOL)markAsLastUtterance;
417
354
  - (nonnull instancetype)init SWIFT_UNAVAILABLE;
418
355
  + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@@ -453,33 +390,17 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, copy) NSArray<NSStri
453
390
  - (void)unPauseMicrophoneAndWait:(NSNumber * _Nonnull)timeoutMs completion:(void (^ _Nonnull)(BOOL, NSString * _Nullable))completion;
454
391
  - (void)pauseMicrophone;
455
392
  - (void)unPauseMicrophone;
456
- /// Enable/disable iOS voice-processing (AEC + ducking).
457
- /// If STT is already active, we rebuild the session/graph so it takes effect.
458
393
  - (void)setAECEnabled:(BOOL)enabled;
459
394
  - (BOOL)isAECEnabled SWIFT_WARN_UNUSED_RESULT;
460
395
  - (void)isSpeechAvailable:(void (^ _Nonnull)(BOOL))completion;
461
396
  - (BOOL)isRecognizing SWIFT_WARN_UNUSED_RESULT;
462
397
  - (void)startSpeechWithLocaleStr:(NSString * _Nullable)localeStr;
463
- /// Starts STT with one speaker. <code>onboardingJsonPath</code> may be a path or the JSON
464
- /// itself. The speaker is added to the current set (same id or same voiceprint
465
- /// replaces the older entry) under the id “default”.
466
398
  - (void)startSpeechWithLocaleStr:(NSString * _Nullable)localeStr onboardingJsonPath:(NSString * _Nonnull)onboardingJsonPath;
467
399
  - (void)startSpeechWithLocaleStr:(NSString * _Nullable)localeStr onboardingJsonPath:(NSString * _Nonnull)onboardingJsonPath speakerId:(NSString * _Nonnull)speakerId;
468
- /// Starts STT with an array of speakers, replacing the current set.
469
- /// Each item: [“id”: speakerId, “json”: JSON string or path to the JSON file].
470
400
  - (void)startSpeechWithLocaleStr:(NSString * _Nullable)localeStr speakers:(NSArray<NSDictionary<NSString *, NSString *> *> * _Nonnull)speakers;
471
- /// Adds one speaker (JSON string or path). Same id or same voiceprint replaces
472
- /// the older entry. Applies immediately when STT is running, otherwise at the
473
- /// next start. Throws if the JSON can’t be read or its audio-feature settings
474
- /// differ from the running engine’s.
475
401
  - (BOOL)addSpeakerWithId:(NSString * _Nonnull)id jsonOrPath:(NSString * _Nonnull)jsonOrPath error:(NSError * _Nullable * _Nullable)error;
476
- /// Replaces the whole speaker set. Items: [“id”: …, “json”: JSON string or path].
477
- /// An empty array turns speaker verification off.
478
402
  - (BOOL)setSpeakers:(NSArray<NSDictionary<NSString *, NSString *> *> * _Nonnull)speakers error:(NSError * _Nullable * _Nullable)error;
479
- /// Removes a speaker by id. Removing the last one turns the gate off (all audio
480
- /// passes). Returns false if the id wasn’t enrolled.
481
403
  - (BOOL)removeSpeakerWithId:(NSString * _Nonnull)id;
482
- /// Ids of the enrolled speakers, in insertion order.
483
404
  - (NSArray<NSString *> * _Nonnull)getSpeakerIds SWIFT_WARN_UNUSED_RESULT;
484
405
  - (void)stopSpeech:(void (^ _Nullable)(BOOL))completion;
485
406
  - (void)cancelSpeech:(void (^ _Nullable)(BOOL))completion;
@@ -514,9 +435,6 @@ SWIFT_CLASS("_TtC10DavoiceTTS15SwiftSoundQueue")
514
435
  - (nonnull instancetype)init SWIFT_UNAVAILABLE;
515
436
  + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
516
437
  - (void)audioPlayerDidFinishPlaying:(AVAudioPlayer * _Nonnull)p successfully:(BOOL)ok;
517
- /// A decode error ends playback WITHOUT audioPlayerDidFinishPlaying, which
518
- /// used to leave the queue waiting on this player forever. Treat it as the
519
- /// end of the item.
520
438
  - (void)audioPlayerDecodeErrorDidOccur:(AVAudioPlayer * _Nonnull)p error:(NSError * _Nullable)error;
521
439
  @end
522
440