react-native-davoice-tts 1.0.414 → 1.0.416
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/LICENSE +31 -0
- package/README.md +4 -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 +4 -4
- package/ios/SpeechBridge/SpeechBridge.m +4 -3
- package/ios/TTSRNBridge/DaVoiceTTSBridge.m +4 -3
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/Info.plist +5 -5
- 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 +8 -3
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.abi.json +349 -287
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.private.swiftinterface +1 -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 +1 -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 +16 -6
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.abi.json +349 -287
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +1 -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 +1 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.abi.json +349 -287
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +1 -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 +1 -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 +5 -3
- package/speech/index.ts +10 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
DaVoice Evaluation and Non-Commercial Package License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 DaVoice.io
|
|
4
|
+
|
|
5
|
+
Permission is granted to download, install, and use this package for
|
|
6
|
+
evaluation, local testing, demonstrations, experimentation, and non-commercial
|
|
7
|
+
proof-of-concept applications.
|
|
8
|
+
|
|
9
|
+
For those permitted non-commercial uses, you may inspect and modify the
|
|
10
|
+
wrapper source code as needed for your POC. This permission does not extend to
|
|
11
|
+
commercial use or to the proprietary binaries, models, or other assets.
|
|
12
|
+
|
|
13
|
+
Commercial use, production deployment, resale, sublicensing, redistribution,
|
|
14
|
+
or inclusion in a commercial product requires a separate written DaVoice
|
|
15
|
+
license or written permission.
|
|
16
|
+
|
|
17
|
+
The package source code, compiled native libraries, models, embeddings, voice
|
|
18
|
+
assets, and other DaVoice materials are proprietary unless a component is
|
|
19
|
+
clearly identified as being subject to third-party terms.
|
|
20
|
+
|
|
21
|
+
You may not extract, reverse engineer, decompile, disassemble, modify,
|
|
22
|
+
repackage, or redistribute the compiled native libraries, models, embeddings,
|
|
23
|
+
voice assets, or other proprietary materials. You may not use them for
|
|
24
|
+
training or to create derivative models unless expressly permitted in writing.
|
|
25
|
+
|
|
26
|
+
Third-party components remain subject to their own license terms. Those terms
|
|
27
|
+
are not replaced by this license.
|
|
28
|
+
|
|
29
|
+
This package is provided "as is", without warranties or conditions of any
|
|
30
|
+
kind. To request commercial licensing or permission for another use, contact
|
|
31
|
+
DaVoice at info@davoice.io.
|
package/README.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
React Native on-device speech package for:
|
|
4
4
|
|
|
5
|
+
**Evaluation and non-commercial POC use are allowed. Commercial or production
|
|
6
|
+
use requires a DaVoice license. See [LICENSE](LICENSE) and
|
|
7
|
+
[MODEL_NOTICES.md](MODEL_NOTICES.md).**
|
|
8
|
+
|
|
5
9
|
- **Speaker identification / speaker verification** - onboarding and real-time
|
|
6
10
|
- **Speech to Text / Real time ASR** - Real time ASR, Supports all languages. **Supports real time speaker verified and isolation**.
|
|
7
11
|
- **Voice Cloning / Text to Speech** - Cloning any voice any language.
|
package/TTSRNBridge.podspec
CHANGED
|
@@ -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.
|
|
5
|
+
s.version = "1.0.421" # 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 .
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
9c2900d3bbc5599ade3ff6c0c5133e53 tts-1.0.0.aar
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
3ab209cbfc132f971a308a04d8cc89c8e0db4d97 tts-1.0.0.aar
|
|
@@ -420,14 +420,14 @@ public class DaVoiceTTSBridge extends ReactContextBaseJavaModule {
|
|
|
420
420
|
promise.resolve(names);
|
|
421
421
|
}
|
|
422
422
|
|
|
423
|
-
// Reference audio (wav/mp3/m4a/...) ->
|
|
423
|
+
// Reference audio (wav/mp3/m4a/...) -> packed .emd at outputPath, using the
|
|
424
424
|
// voice encoder embedder_<code>.dm. Runs off the bridge thread (takes seconds).
|
|
425
425
|
@ReactMethod
|
|
426
|
-
public void createVoiceClone(String inputAudio, String outputPath, String embedder, Promise promise) {
|
|
426
|
+
public void createVoiceClone(String inputAudio, String outputPath, String embedder, double volume, Promise promise) {
|
|
427
427
|
initExecutor.execute(() -> {
|
|
428
428
|
try {
|
|
429
429
|
if (inputAudio == null || outputPath == null || embedder == null) {
|
|
430
|
-
promise.reject("invalid_args", "createVoiceClone(inputAudio, outputPath, embedder)");
|
|
430
|
+
promise.reject("invalid_args", "createVoiceClone(inputAudio, outputPath, embedder, volume)");
|
|
431
431
|
return;
|
|
432
432
|
}
|
|
433
433
|
String ext = inputAudio.contains(".") ? inputAudio.substring(inputAudio.lastIndexOf('.') + 1) : "wav";
|
|
@@ -436,7 +436,7 @@ public class DaVoiceTTSBridge extends ReactContextBaseJavaModule {
|
|
|
436
436
|
File embedderFile = resolveAnyFile(embedder, "dm");
|
|
437
437
|
String embedderPath = embedderFile != null ? embedderFile.getAbsolutePath() : embedder; // else an APK asset name
|
|
438
438
|
java.util.Map<String, Object> result =
|
|
439
|
-
tts.createVoiceClone(input.getAbsolutePath(), stripFileScheme(outputPath), embedderPath);
|
|
439
|
+
tts.createVoiceClone(input.getAbsolutePath(), stripFileScheme(outputPath), embedderPath, volume);
|
|
440
440
|
WritableMap map = Arguments.createMap();
|
|
441
441
|
map.putString("path", String.valueOf(result.get("path")));
|
|
442
442
|
map.putString("voice", String.valueOf(result.get("voice")));
|
|
@@ -1227,16 +1227,17 @@ RCT_EXPORT_METHOD(setExternalVoicesPath:(NSString *)path
|
|
|
1227
1227
|
[tts setExternalVoicesPath:folder completion:^(NSArray<NSString *> *names) { resolve(names ?: @[]); }];
|
|
1228
1228
|
}
|
|
1229
1229
|
|
|
1230
|
-
// Reference audio (wav/mp3/m4a/...) ->
|
|
1230
|
+
// Reference audio (wav/mp3/m4a/...) -> packed .emd at outputPath, using the
|
|
1231
1231
|
// voice encoder embedder_<code>.dm. Runs off the bridge queue (takes seconds).
|
|
1232
1232
|
RCT_EXPORT_METHOD(createVoiceClone:(NSString *)inputAudio
|
|
1233
1233
|
outputPath:(NSString *)outputPath
|
|
1234
1234
|
embedder:(NSString *)embedder
|
|
1235
|
+
volume:(double)volume
|
|
1235
1236
|
resolver:(RCTPromiseResolveBlock)resolve
|
|
1236
1237
|
rejecter:(RCTPromiseRejectBlock)reject)
|
|
1237
1238
|
{
|
|
1238
1239
|
if (!inputAudio || !outputPath || !embedder || (id)outputPath == [NSNull null]) {
|
|
1239
|
-
reject(@"invalid_args", @"createVoiceClone(inputAudio, outputPath, embedder)", nil);
|
|
1240
|
+
reject(@"invalid_args", @"createVoiceClone(inputAudio, outputPath, embedder, volume)", nil);
|
|
1240
1241
|
return;
|
|
1241
1242
|
}
|
|
1242
1243
|
dispatch_async(dispatch_get_global_queue(QOS_CLASS_USER_INITIATED, 0), ^{
|
|
@@ -1247,7 +1248,7 @@ RCT_EXPORT_METHOD(createVoiceClone:(NSString *)inputAudio
|
|
|
1247
1248
|
NSString *output = [outputPath hasPrefix:@"file://"] ? [NSURL URLWithString:outputPath].path : outputPath;
|
|
1248
1249
|
NSError *error = nil;
|
|
1249
1250
|
NSDictionary *result = (inputURL && embedderURL)
|
|
1250
|
-
? [DaVoiceTTS createVoiceClone:inputURL.path outputPath:output embedderPath:embedderURL.path error:&error]
|
|
1251
|
+
? [DaVoiceTTS createVoiceClone:inputURL.path outputPath:output embedderPath:embedderURL.path volume:volume error:&error]
|
|
1251
1252
|
: nil;
|
|
1252
1253
|
if (remoteInput && inputURL) [[NSFileManager defaultManager] removeItemAtURL:inputURL error:nil];
|
|
1253
1254
|
if (remoteEmbedder && embedderURL) [[NSFileManager defaultManager] removeItemAtURL:embedderURL error:nil];
|
|
@@ -300,16 +300,17 @@ RCT_EXPORT_METHOD(setExternalVoicesPath:(NSString *)path
|
|
|
300
300
|
[tts setExternalVoicesPath:folder completion:^(NSArray<NSString *> *names) { resolve(names ?: @[]); }];
|
|
301
301
|
}
|
|
302
302
|
|
|
303
|
-
// Reference audio (wav/mp3/m4a/...) ->
|
|
303
|
+
// Reference audio (wav/mp3/m4a/...) -> packed .emd at outputPath, using the
|
|
304
304
|
// voice encoder embedder_<code>.dm. Runs off the bridge queue (takes seconds).
|
|
305
305
|
RCT_EXPORT_METHOD(createVoiceClone:(NSString *)inputAudio
|
|
306
306
|
outputPath:(NSString *)outputPath
|
|
307
307
|
embedder:(NSString *)embedder
|
|
308
|
+
volume:(double)volume
|
|
308
309
|
resolver:(RCTPromiseResolveBlock)resolve
|
|
309
310
|
rejecter:(RCTPromiseRejectBlock)reject)
|
|
310
311
|
{
|
|
311
312
|
if (!inputAudio || !outputPath || !embedder || (id)outputPath == [NSNull null]) {
|
|
312
|
-
reject(@"invalid_args", @"createVoiceClone(inputAudio, outputPath, embedder)", nil);
|
|
313
|
+
reject(@"invalid_args", @"createVoiceClone(inputAudio, outputPath, embedder, volume)", nil);
|
|
313
314
|
return;
|
|
314
315
|
}
|
|
315
316
|
dispatch_async(dispatch_get_global_queue(QOS_CLASS_USER_INITIATED, 0), ^{
|
|
@@ -320,7 +321,7 @@ RCT_EXPORT_METHOD(createVoiceClone:(NSString *)inputAudio
|
|
|
320
321
|
NSString *output = [outputPath hasPrefix:@"file://"] ? [NSURL URLWithString:outputPath].path : outputPath;
|
|
321
322
|
NSError *error = nil;
|
|
322
323
|
NSDictionary *result = (inputURL && embedderURL)
|
|
323
|
-
? [DaVoiceTTS createVoiceClone:inputURL.path outputPath:output embedderPath:embedderURL.path error:&error]
|
|
324
|
+
? [DaVoiceTTS createVoiceClone:inputURL.path outputPath:output embedderPath:embedderURL.path volume:volume error:&error]
|
|
324
325
|
: nil;
|
|
325
326
|
if (remoteInput && inputURL) [[NSFileManager defaultManager] removeItemAtURL:inputURL error:nil];
|
|
326
327
|
if (remoteEmbedder && embedderURL) [[NSFileManager defaultManager] removeItemAtURL:embedderURL error:nil];
|
|
@@ -8,32 +8,32 @@
|
|
|
8
8
|
<key>BinaryPath</key>
|
|
9
9
|
<string>DavoiceTTS.framework/DavoiceTTS</string>
|
|
10
10
|
<key>LibraryIdentifier</key>
|
|
11
|
-
<string>ios-
|
|
11
|
+
<string>ios-arm64_x86_64-simulator</string>
|
|
12
12
|
<key>LibraryPath</key>
|
|
13
13
|
<string>DavoiceTTS.framework</string>
|
|
14
14
|
<key>SupportedArchitectures</key>
|
|
15
15
|
<array>
|
|
16
16
|
<string>arm64</string>
|
|
17
|
+
<string>x86_64</string>
|
|
17
18
|
</array>
|
|
18
19
|
<key>SupportedPlatform</key>
|
|
19
20
|
<string>ios</string>
|
|
21
|
+
<key>SupportedPlatformVariant</key>
|
|
22
|
+
<string>simulator</string>
|
|
20
23
|
</dict>
|
|
21
24
|
<dict>
|
|
22
25
|
<key>BinaryPath</key>
|
|
23
26
|
<string>DavoiceTTS.framework/DavoiceTTS</string>
|
|
24
27
|
<key>LibraryIdentifier</key>
|
|
25
|
-
<string>ios-
|
|
28
|
+
<string>ios-arm64</string>
|
|
26
29
|
<key>LibraryPath</key>
|
|
27
30
|
<string>DavoiceTTS.framework</string>
|
|
28
31
|
<key>SupportedArchitectures</key>
|
|
29
32
|
<array>
|
|
30
33
|
<string>arm64</string>
|
|
31
|
-
<string>x86_64</string>
|
|
32
34
|
</array>
|
|
33
35
|
<key>SupportedPlatform</key>
|
|
34
36
|
<string>ios</string>
|
|
35
|
-
<key>SupportedPlatformVariant</key>
|
|
36
|
-
<string>simulator</string>
|
|
37
37
|
</dict>
|
|
38
38
|
</array>
|
|
39
39
|
<key>CFBundlePackageType</key>
|
|
Binary file
|
|
@@ -328,7 +328,7 @@ SWIFT_CLASS("_TtC10DavoiceTTS25DaVoiceAudioRoutingConfig")
|
|
|
328
328
|
/// supported hardware). On those devices AEC only exists inside an
|
|
329
329
|
/// AVAudioEngine with voice processing on, and it only cancels audio played
|
|
330
330
|
/// through that same engine – so TTS must play through the engine whose mic
|
|
331
|
-
/// input the listeners hear. See
|
|
331
|
+
/// input the listeners hear. See TTS2/AECSupportIOS.md.
|
|
332
332
|
/// Nothing here runs on devices WITH session-level AEC, or when AEC isn’t
|
|
333
333
|
/// requested: every caller then takes its exact pre-existing path.
|
|
334
334
|
SWIFT_CLASS("_TtC10DavoiceTTS16DaVoiceLegacyAEC")
|
|
@@ -370,7 +370,7 @@ SWIFT_CLASS("_TtC10DavoiceTTS10DaVoiceTTS")
|
|
|
370
370
|
/// missing folder).
|
|
371
371
|
- (void)setExternalVoicesPath:(NSString * _Nullable)path completion:(void (^ _Nullable)(NSArray<NSString *> * _Nonnull))completion;
|
|
372
372
|
/// Voice cloning: creates a voice from a recording and saves it as a
|
|
373
|
-
///
|
|
373
|
+
/// packed .emd at <code>outputPath</code>.
|
|
374
374
|
/// <ul>
|
|
375
375
|
/// <li>
|
|
376
376
|
/// inputAudioPath: a recording of one speaker (wav, mp3, m4a/aac, caf,
|
|
@@ -382,13 +382,18 @@ SWIFT_CLASS("_TtC10DavoiceTTS10DaVoiceTTS")
|
|
|
382
382
|
/// </li>
|
|
383
383
|
/// <li>
|
|
384
384
|
/// embedderPath: the language’s voice encoder, embedder_<code>.dm
|
|
385
|
-
/// (e.g. embedder_en.dm); it is
|
|
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).
|
|
386
390
|
/// </li>
|
|
387
391
|
/// </ul>
|
|
388
392
|
/// Returns [“path”, “voice”, “warnings”]; when “warnings” is non-empty, ask
|
|
389
393
|
/// the user to record again. Put the file in the folder given to
|
|
390
394
|
/// setExternalVoicesPath() (and call that again) to use it.
|
|
391
395
|
+ (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
|
+
+ (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;
|
|
392
397
|
- (void)changeVoice:(NSString * _Nonnull)name completion:(void (^ _Nonnull)(NSInteger))completion;
|
|
393
398
|
@property (nonatomic, copy) void (^ _Nullable onLastUtteranceFinished)(void);
|
|
394
399
|
+ (BOOL)activateLicenseWithLicenseKey:(NSString * _Nonnull)licenseKey SWIFT_WARN_UNUSED_RESULT;
|