react-native-davoice-tts 1.0.410 → 1.0.411
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/README.md +20 -0
- package/TTSRNBridge.podspec +1 -1
- package/android/libs/com/davoice/tts/1.0.0/tts-1.0.0.aar +0 -0
- package/android/libs/com/davoice/tts/1.0.0/tts-1.0.0.aar.md5 +1 -1
- package/android/libs/com/davoice/tts/1.0.0/tts-1.0.0.aar.sha1 +1 -1
- package/android/src/main/java/com/davoice/tts/rn/DaVoiceTTSBridge.java +67 -0
- package/ios/SpeechBridge/SpeechBridge.m +40 -0
- package/ios/TTSRNBridge/DaVoiceTTSBridge.m +40 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/DavoiceTTS +0 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Headers/DavoiceTTS-Swift.h +30 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.abi.json +433 -58
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.private.swiftinterface +4 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.swiftinterface +4 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/DavoiceTTS +0 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Headers/DavoiceTTS-Swift.h +60 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.abi.json +433 -58
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +4 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.swiftinterface +4 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.abi.json +433 -58
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +4 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +4 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/_CodeSignature/CodeDirectory +0 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/_CodeSignature/CodeRequirements-1 +0 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/_CodeSignature/CodeResources +33 -33
- package/package.json +1 -1
- package/speech/index.d.ts +39 -0
- package/speech/index.ts +73 -0
|
@@ -161,6 +161,10 @@ public enum AudioPlaybackHook {
|
|
|
161
161
|
}
|
|
162
162
|
@objc final public func getAllVoices() -> [Swift.String]
|
|
163
163
|
@objc final public func getVoiceAbilities(_ name: Swift.String) -> [Swift.String]
|
|
164
|
+
#if compiler(>=5.3) && $NonescapableTypes
|
|
165
|
+
@objc(setExternalVoicesPath:completion:) final public func setExternalVoicesPath(_ path: Swift.String?, completion: (([Swift.String]) -> Swift.Void)? = nil)
|
|
166
|
+
#endif
|
|
167
|
+
@objc public static func createVoiceClone(_ inputAudioPath: Swift.String, outputPath: Swift.String, embedderPath: Swift.String) throws -> [Swift.String : Any]
|
|
164
168
|
@objc(changeVoice:completion:) final public func changeVoice(_ name: Swift.String, completion: @escaping (Swift.Int) -> Swift.Void)
|
|
165
169
|
@objc final public var onLastUtteranceFinished: (() -> Swift.Void)?
|
|
166
170
|
@objc deinit
|
|
Binary file
|
|
@@ -161,6 +161,10 @@ public enum AudioPlaybackHook {
|
|
|
161
161
|
}
|
|
162
162
|
@objc final public func getAllVoices() -> [Swift.String]
|
|
163
163
|
@objc final public func getVoiceAbilities(_ name: Swift.String) -> [Swift.String]
|
|
164
|
+
#if compiler(>=5.3) && $NonescapableTypes
|
|
165
|
+
@objc(setExternalVoicesPath:completion:) final public func setExternalVoicesPath(_ path: Swift.String?, completion: (([Swift.String]) -> Swift.Void)? = nil)
|
|
166
|
+
#endif
|
|
167
|
+
@objc public static func createVoiceClone(_ inputAudioPath: Swift.String, outputPath: Swift.String, embedderPath: Swift.String) throws -> [Swift.String : Any]
|
|
164
168
|
@objc(changeVoice:completion:) final public func changeVoice(_ name: Swift.String, completion: @escaping (Swift.Int) -> Swift.Void)
|
|
165
169
|
@objc final public var onLastUtteranceFinished: (() -> Swift.Void)?
|
|
166
170
|
@objc deinit
|
|
Binary file
|
|
@@ -361,6 +361,36 @@ SWIFT_CLASS("_TtC10DavoiceTTS10DaVoiceTTS")
|
|
|
361
361
|
/// 50! [regular] Thanks.” Unmatched tags use the default voice; tags are never
|
|
362
362
|
/// spoken. Empty for voices without variants, v1 models, or after destroy().
|
|
363
363
|
- (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
|
+
- (void)setExternalVoicesPath:(NSString * _Nullable)path completion:(void (^ _Nullable)(NSArray<NSString *> * _Nonnull))completion;
|
|
372
|
+
/// Creates a voice clone from reference audio and saves it as a
|
|
373
|
+
/// scrambled .emd at <code>outputPath</code>.
|
|
374
|
+
/// <ul>
|
|
375
|
+
/// <li>
|
|
376
|
+
/// inputAudioPath: wav, mp3, m4a/aac, caf, aiff, flac, … The best ~6 s
|
|
377
|
+
/// of speech is used: silence trimmed, long pauses shortened, cut at a gap
|
|
378
|
+
/// between words (never inside a word).
|
|
379
|
+
/// </li>
|
|
380
|
+
/// <li>
|
|
381
|
+
/// outputPath: the .emd file to write (”.emd” is added when missing), or a
|
|
382
|
+
/// folder (-> <folder>/<input name>.emd). The file name is the voice name.
|
|
383
|
+
/// </li>
|
|
384
|
+
/// <li>
|
|
385
|
+
/// embedderPath: the language’s voice encoder, embedder_<code>.dm
|
|
386
|
+
/// (e.g. embedder_en.dm); it is unscrambled in memory only.
|
|
387
|
+
/// </li>
|
|
388
|
+
/// </ul>
|
|
389
|
+
/// Returns [“path”, “voice”, “seconds”, “warnings”, “report”]; “warnings” is
|
|
390
|
+
/// non-empty when less than 4 s of speech remained or the cut had to fall
|
|
391
|
+
/// inside speech. Put the file in the folder given to setExternalVoicesPath()
|
|
392
|
+
/// (and call that again) to use it.
|
|
393
|
+
+ (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;
|
|
364
394
|
- (void)changeVoice:(NSString * _Nonnull)name completion:(void (^ _Nonnull)(NSInteger))completion;
|
|
365
395
|
@property (nonatomic, copy) void (^ _Nullable onLastUtteranceFinished)(void);
|
|
366
396
|
+ (BOOL)activateLicenseWithLicenseKey:(NSString * _Nonnull)licenseKey SWIFT_WARN_UNUSED_RESULT;
|
|
@@ -858,6 +888,36 @@ SWIFT_CLASS("_TtC10DavoiceTTS10DaVoiceTTS")
|
|
|
858
888
|
/// 50! [regular] Thanks.” Unmatched tags use the default voice; tags are never
|
|
859
889
|
/// spoken. Empty for voices without variants, v1 models, or after destroy().
|
|
860
890
|
- (NSArray<NSString *> * _Nonnull)getVoiceAbilities:(NSString * _Nonnull)name SWIFT_WARN_UNUSED_RESULT;
|
|
891
|
+
/// Also look for voices in the folder <code>path</code>: <name>.emd / <name>.npy files,
|
|
892
|
+
/// e.g. made by createVoiceClone(). They are listed by getAllVoices()
|
|
893
|
+
/// after the bundled voices and selected with changeVoice() like them; a
|
|
894
|
+
/// bundled voice wins over an external file with the same name. Call it
|
|
895
|
+
/// again to pick up new files; nil or “” removes the external voices.
|
|
896
|
+
/// <code>completion</code> gets the external voice names found ([] for a v1 model or a
|
|
897
|
+
/// missing folder).
|
|
898
|
+
- (void)setExternalVoicesPath:(NSString * _Nullable)path completion:(void (^ _Nullable)(NSArray<NSString *> * _Nonnull))completion;
|
|
899
|
+
/// Creates a voice clone from reference audio and saves it as a
|
|
900
|
+
/// scrambled .emd at <code>outputPath</code>.
|
|
901
|
+
/// <ul>
|
|
902
|
+
/// <li>
|
|
903
|
+
/// inputAudioPath: wav, mp3, m4a/aac, caf, aiff, flac, … The best ~6 s
|
|
904
|
+
/// of speech is used: silence trimmed, long pauses shortened, cut at a gap
|
|
905
|
+
/// between words (never inside a word).
|
|
906
|
+
/// </li>
|
|
907
|
+
/// <li>
|
|
908
|
+
/// outputPath: the .emd file to write (”.emd” is added when missing), or a
|
|
909
|
+
/// folder (-> <folder>/<input name>.emd). The file name is the voice name.
|
|
910
|
+
/// </li>
|
|
911
|
+
/// <li>
|
|
912
|
+
/// embedderPath: the language’s voice encoder, embedder_<code>.dm
|
|
913
|
+
/// (e.g. embedder_en.dm); it is unscrambled in memory only.
|
|
914
|
+
/// </li>
|
|
915
|
+
/// </ul>
|
|
916
|
+
/// Returns [“path”, “voice”, “seconds”, “warnings”, “report”]; “warnings” is
|
|
917
|
+
/// non-empty when less than 4 s of speech remained or the cut had to fall
|
|
918
|
+
/// inside speech. Put the file in the folder given to setExternalVoicesPath()
|
|
919
|
+
/// (and call that again) to use it.
|
|
920
|
+
+ (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;
|
|
861
921
|
- (void)changeVoice:(NSString * _Nonnull)name completion:(void (^ _Nonnull)(NSInteger))completion;
|
|
862
922
|
@property (nonatomic, copy) void (^ _Nullable onLastUtteranceFinished)(void);
|
|
863
923
|
+ (BOOL)activateLicenseWithLicenseKey:(NSString * _Nonnull)licenseKey SWIFT_WARN_UNUSED_RESULT;
|