react-native-davoice-tts 1.0.416 → 1.0.418

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 (16) hide show
  1. package/TTSRNBridge.podspec +1 -1
  2. package/ios/TTSRNBridge/DavoiceTTS.xcframework/Info.plist +5 -5
  3. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Headers/DavoiceTTS-Swift.h +0 -82
  4. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.abi.json +540 -540
  5. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  6. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Headers/DavoiceTTS-Swift.h +0 -164
  7. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.abi.json +540 -540
  8. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  9. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.abi.json +540 -540
  10. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  11. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/_CodeSignature/CodeDirectory +0 -0
  12. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/_CodeSignature/CodeRequirements-1 +0 -0
  13. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/_CodeSignature/CodeResources +15 -15
  14. package/package.json +1 -1
  15. package/speech/index.d.ts +11 -1
  16. package/speech/index.ts +45 -24
@@ -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 TTS2/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
 
@@ -838,36 +756,19 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
838
756
  #if defined(__OBJC__)
839
757
 
840
758
  @class NSString;
841
- /// Stores the speech library’s audio-routing JSON before STT/TTS initialization.
842
- /// DaVoice prefers this direct config and falls back to the wakeword library’s config.
843
759
  SWIFT_CLASS("_TtC10DavoiceTTS25DaVoiceAudioRoutingConfig")
844
760
  @interface DaVoiceAudioRoutingConfig : NSObject
845
- /// Can be called at any time. When the wake-word framework is in the app,
846
- /// the JSON is also written into wake word’s store, so both libraries always
847
- /// run on the same config whichever API the app calls (wake word’s setter
848
- /// then announces the change). Without wake word, the change is announced
849
- /// here. Either way RoutingConfigChange applies it once, safely.
850
761
  + (BOOL)setAudioRoutingConfigJSONString:(NSString * _Nonnull)json SWIFT_WARN_UNUSED_RESULT;
851
762
  + (void)clearAudioRoutingConfig;
852
763
  - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
853
764
  @end
854
765
 
855
766
  @class AVAudioSession;
856
- /// Echo cancellation for iPhones WITHOUT Apple’s session-level echo-cancelled
857
- /// input (<code>AVAudioSession.isEchoCancelledInputAvailable</code>, iOS 18.2+ on
858
- /// supported hardware). On those devices AEC only exists inside an
859
- /// AVAudioEngine with voice processing on, and it only cancels audio played
860
- /// through that same engine – so TTS must play through the engine whose mic
861
- /// input the listeners hear. See TTS2/AECSupportIOS.md.
862
- /// Nothing here runs on devices WITH session-level AEC, or when AEC isn’t
863
- /// requested: every caller then takes its exact pre-existing path.
864
767
  SWIFT_CLASS("_TtC10DavoiceTTS16DaVoiceLegacyAEC")
865
768
  @interface DaVoiceLegacyAEC : NSObject
866
- /// Kill switch for the old-iPhone fallback (default true).
867
769
  SWIFT_CLASS_PROPERTY(@property (nonatomic, class) BOOL isEnabled;)
868
770
  + (BOOL)isEnabled SWIFT_WARN_UNUSED_RESULT;
869
771
  + (void)setIsEnabled:(BOOL)newValue;
870
- /// True when this device/OS offers session-level AEC (see observeDevice).
871
772
  + (BOOL)deviceHasSessionLevelAEC:(AVAudioSession * _Nonnull)session SWIFT_WARN_UNUSED_RESULT;
872
773
  - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
873
774
  @end
@@ -880,48 +781,9 @@ SWIFT_CLASS("_TtC10DavoiceTTS10DaVoiceTTS")
880
781
  + (void)setUseDavoiceProprietaryPhonemizer:(BOOL)enabled;
881
782
  + (BOOL)getUseDavoiceProprietaryPhonemizer SWIFT_WARN_UNUSED_RESULT;
882
783
  - (BOOL)isUsingDavoiceProprietaryPhonemizer SWIFT_WARN_UNUSED_RESULT;
883
- /// Voices available in the loaded .dm (the names changeVoice() accepts, the
884
- /// first being the default). Empty for v1 models, a .dm without voices, or
885
- /// after destroy().
886
784
  - (NSArray<NSString *> * _Nonnull)getAllVoices SWIFT_WARN_UNUSED_RESULT;
887
- /// Style variants (“abilities”) of a voice in the loaded .dm, e.g.
888
- /// getVoiceAbilities(“Rich”) -> [“angry_whisper”, …, “military_sergeant_hard”, …].
889
- /// Use them with ElevenLabs-style “[free text]” tags in speak() text, before
890
- /// the words they apply to, until the next tag: “Ok, [drill sergeant] give me
891
- /// 50! [regular] Thanks.” Unmatched tags use the default voice; tags are never
892
- /// spoken. Empty for voices without variants, v1 models, or after destroy().
893
785
  - (NSArray<NSString *> * _Nonnull)getVoiceAbilities:(NSString * _Nonnull)name SWIFT_WARN_UNUSED_RESULT;
894
- /// Also look for voices in the folder <code>path</code>: <name>.emd / <name>.npy files,
895
- /// e.g. made by createVoiceClone(). They are listed by getAllVoices()
896
- /// after the bundled voices and selected with changeVoice() like them; a
897
- /// bundled voice wins over an external file with the same name. Call it
898
- /// again to pick up new files; nil or “” removes the external voices.
899
- /// <code>completion</code> gets the external voice names found ([] for a v1 model or a
900
- /// missing folder).
901
786
  - (void)setExternalVoicesPath:(NSString * _Nullable)path completion:(void (^ _Nullable)(NSArray<NSString *> * _Nonnull))completion;
902
- /// Voice cloning: creates a voice from a recording and saves it as a
903
- /// packed .emd at <code>outputPath</code>.
904
- /// <ul>
905
- /// <li>
906
- /// inputAudioPath: a recording of one speaker (wav, mp3, m4a/aac, caf,
907
- /// aiff, flac, …). It is prepared for cloning automatically.
908
- /// </li>
909
- /// <li>
910
- /// outputPath: the .emd file to write (”.emd” is added when missing), or a
911
- /// folder (-> <folder>/<input name>.emd). The file name is the voice name.
912
- /// </li>
913
- /// <li>
914
- /// embedderPath: the language’s voice encoder, embedder_<code>.dm
915
- /// (e.g. embedder_en.dm); it is resolved in memory only.
916
- /// </li>
917
- /// <li>
918
- /// volume: loudness of the voice relative to the recording – 1.0 keeps it
919
- /// (the 3-argument form), 1.2 is 20% louder, 0.8 is 20% quieter (a number > 0).
920
- /// </li>
921
- /// </ul>
922
- /// Returns [“path”, “voice”, “warnings”]; when “warnings” is non-empty, ask
923
- /// the user to record again. Put the file in the folder given to
924
- /// setExternalVoicesPath() (and call that again) to use it.
925
787
  + (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;
926
788
  + (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;
927
789
  - (void)changeVoice:(NSString * _Nonnull)name completion:(void (^ _Nonnull)(NSInteger))completion;
@@ -931,18 +793,11 @@ SWIFT_CLASS("_TtC10DavoiceTTS10DaVoiceTTS")
931
793
  - (void)setUseEuropeanNumberFormat:(BOOL)enabled;
932
794
  - (nullable instancetype)initWithModel:(NSURL * _Nonnull)model error:(NSError * _Nullable * _Nullable)error OBJC_DESIGNATED_INITIALIZER;
933
795
  - (void)stopSpeaking;
934
- /// Destroy the TTS instance resources; after this call, the object should not be used.
935
- /// Effectively returns the instance to “pre-init” state.
936
796
  - (void)destroy;
937
797
  - (void)speak:(NSString * _Nonnull)txt sid:(int32_t)sid;
938
798
  - (void)speak:(NSString * _Nonnull)txt sid:(int32_t)sid speed:(float)speed;
939
799
  - (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;
940
- /// Queue an external WAV file for playback via the same AEC path/queue used by speak().
941
- /// If called repeatedly, items are queued in order. <code>onLastUtteranceFinished</code> fires
942
- /// after physical playback drains; audio-session restoration may remain debounced.
943
800
  - (void)playWav:(NSURL * _Nonnull)url markAsLastUtterance:(BOOL)markAsLastUtterance;
944
- /// Queue an in-memory PCM buffer (any format) for playback via the same AEC path/queue.
945
- /// We resample/normalize, write a temp WAV, then enqueue it (so it uses the engine hook).
946
801
  - (void)playBuffer:(AVAudioPCMBuffer * _Nonnull)buffer markAsLastUtterance:(BOOL)markAsLastUtterance;
947
802
  - (nonnull instancetype)init SWIFT_UNAVAILABLE;
948
803
  + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@@ -983,33 +838,17 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, copy) NSArray<NSStri
983
838
  - (void)unPauseMicrophoneAndWait:(NSNumber * _Nonnull)timeoutMs completion:(void (^ _Nonnull)(BOOL, NSString * _Nullable))completion;
984
839
  - (void)pauseMicrophone;
985
840
  - (void)unPauseMicrophone;
986
- /// Enable/disable iOS voice-processing (AEC + ducking).
987
- /// If STT is already active, we rebuild the session/graph so it takes effect.
988
841
  - (void)setAECEnabled:(BOOL)enabled;
989
842
  - (BOOL)isAECEnabled SWIFT_WARN_UNUSED_RESULT;
990
843
  - (void)isSpeechAvailable:(void (^ _Nonnull)(BOOL))completion;
991
844
  - (BOOL)isRecognizing SWIFT_WARN_UNUSED_RESULT;
992
845
  - (void)startSpeechWithLocaleStr:(NSString * _Nullable)localeStr;
993
- /// Starts STT with one speaker. <code>onboardingJsonPath</code> may be a path or the JSON
994
- /// itself. The speaker is added to the current set (same id or same voiceprint
995
- /// replaces the older entry) under the id “default”.
996
846
  - (void)startSpeechWithLocaleStr:(NSString * _Nullable)localeStr onboardingJsonPath:(NSString * _Nonnull)onboardingJsonPath;
997
847
  - (void)startSpeechWithLocaleStr:(NSString * _Nullable)localeStr onboardingJsonPath:(NSString * _Nonnull)onboardingJsonPath speakerId:(NSString * _Nonnull)speakerId;
998
- /// Starts STT with an array of speakers, replacing the current set.
999
- /// Each item: [“id”: speakerId, “json”: JSON string or path to the JSON file].
1000
848
  - (void)startSpeechWithLocaleStr:(NSString * _Nullable)localeStr speakers:(NSArray<NSDictionary<NSString *, NSString *> *> * _Nonnull)speakers;
1001
- /// Adds one speaker (JSON string or path). Same id or same voiceprint replaces
1002
- /// the older entry. Applies immediately when STT is running, otherwise at the
1003
- /// next start. Throws if the JSON can’t be read or its audio-feature settings
1004
- /// differ from the running engine’s.
1005
849
  - (BOOL)addSpeakerWithId:(NSString * _Nonnull)id jsonOrPath:(NSString * _Nonnull)jsonOrPath error:(NSError * _Nullable * _Nullable)error;
1006
- /// Replaces the whole speaker set. Items: [“id”: …, “json”: JSON string or path].
1007
- /// An empty array turns speaker verification off.
1008
850
  - (BOOL)setSpeakers:(NSArray<NSDictionary<NSString *, NSString *> *> * _Nonnull)speakers error:(NSError * _Nullable * _Nullable)error;
1009
- /// Removes a speaker by id. Removing the last one turns the gate off (all audio
1010
- /// passes). Returns false if the id wasn’t enrolled.
1011
851
  - (BOOL)removeSpeakerWithId:(NSString * _Nonnull)id;
1012
- /// Ids of the enrolled speakers, in insertion order.
1013
852
  - (NSArray<NSString *> * _Nonnull)getSpeakerIds SWIFT_WARN_UNUSED_RESULT;
1014
853
  - (void)stopSpeech:(void (^ _Nullable)(BOOL))completion;
1015
854
  - (void)cancelSpeech:(void (^ _Nullable)(BOOL))completion;
@@ -1044,9 +883,6 @@ SWIFT_CLASS("_TtC10DavoiceTTS15SwiftSoundQueue")
1044
883
  - (nonnull instancetype)init SWIFT_UNAVAILABLE;
1045
884
  + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
1046
885
  - (void)audioPlayerDidFinishPlaying:(AVAudioPlayer * _Nonnull)p successfully:(BOOL)ok;
1047
- /// A decode error ends playback WITHOUT audioPlayerDidFinishPlaying, which
1048
- /// used to leave the queue waiting on this player forever. Treat it as the
1049
- /// end of the item.
1050
886
  - (void)audioPlayerDecodeErrorDidOccur:(AVAudioPlayer * _Nonnull)p error:(NSError * _Nullable)error;
1051
887
  @end
1052
888