react-native-davoice-tts 1.0.411 → 1.0.413
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 +2 -3
- 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 -7
- 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 +6 -8
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.abi.json +175 -161
- 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_x86_64-simulator/DavoiceTTS.framework/DavoiceTTS +0 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Headers/DavoiceTTS-Swift.h +12 -16
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.abi.json +175 -161
- 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/x86_64-apple-ios-simulator.abi.json +175 -161
- 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/_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 +21 -21
- package/package.json +1 -1
- package/speech/index.d.ts +6 -12
- package/speech/index.ts +6 -14
package/README.md
CHANGED
|
@@ -386,8 +386,7 @@ await speech.speak("Ok, [drill sergeant] Private, give me 50 push-ups! [regular]
|
|
|
386
386
|
#### Voice cloning (your own voices)
|
|
387
387
|
|
|
388
388
|
Turn a recording into a voice: `createVoiceClone()` takes a wav, mp3, m4a,
|
|
389
|
-
aac, ogg or flac
|
|
390
|
-
pauses shortened, cut between words) and saves a scrambled `.emd` voice file.
|
|
389
|
+
aac, ogg or flac recording of one speaker and saves a scrambled `.emd` voice file.
|
|
391
390
|
It needs the voice encoder for the model's language, `embedder_<code>.dm`
|
|
392
391
|
(`embedder_en.dm` for English). Point `setExternalVoicesPath()` at the folder
|
|
393
392
|
and the voice is listed and selected like a bundled one (the file name is the
|
|
@@ -398,7 +397,7 @@ const folder = `${RNFS.DocumentDirectoryPath}/voices`;
|
|
|
398
397
|
await speech.setExternalVoicesPath(folder);
|
|
399
398
|
const r = await speech.createVoiceClone(recordingPath, `${folder}/Me.emd`,
|
|
400
399
|
require('./assets/models/embedder_en.dm'));
|
|
401
|
-
// r.warnings is non-empty when
|
|
400
|
+
// r.warnings is non-empty when the user should record again.
|
|
402
401
|
await speech.changeVoice('Me');
|
|
403
402
|
await speech.speak('Hello in my own voice.');
|
|
404
403
|
```
|
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.415" # 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
|
+
18683c0c4349958c2b6966b5d642f099 tts-1.0.0.aar
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
21805062d457563e3b0a018334985553c1b55de9 tts-1.0.0.aar
|
|
@@ -440,13 +440,10 @@ public class DaVoiceTTSBridge extends ReactContextBaseJavaModule {
|
|
|
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")));
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
if (value instanceof java.util.List) for (Object line : (java.util.List<?>) value) list.pushString(String.valueOf(line));
|
|
448
|
-
map.putArray(key, list);
|
|
449
|
-
}
|
|
443
|
+
WritableArray warnings = Arguments.createArray();
|
|
444
|
+
Object value = result.get("warnings");
|
|
445
|
+
if (value instanceof java.util.List) for (Object line : (java.util.List<?>) value) warnings.pushString(String.valueOf(line));
|
|
446
|
+
map.putArray("warnings", warnings);
|
|
450
447
|
promise.resolve(map);
|
|
451
448
|
} catch (Exception e) {
|
|
452
449
|
promise.reject("voice_clone_failed", e.getMessage(), e);
|
|
@@ -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
|
|
@@ -369,13 +369,12 @@ SWIFT_CLASS("_TtC10DavoiceTTS10DaVoiceTTS")
|
|
|
369
369
|
/// <code>completion</code> gets the external voice names found ([] for a v1 model or a
|
|
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
|
/// scrambled .emd at <code>outputPath</code>.
|
|
374
374
|
/// <ul>
|
|
375
375
|
/// <li>
|
|
376
|
-
/// inputAudioPath: wav, mp3, m4a/aac, caf,
|
|
377
|
-
///
|
|
378
|
-
/// between words (never inside a word).
|
|
376
|
+
/// inputAudioPath: a recording of one speaker (wav, mp3, m4a/aac, caf,
|
|
377
|
+
/// aiff, flac, …). It is prepared for cloning automatically.
|
|
379
378
|
/// </li>
|
|
380
379
|
/// <li>
|
|
381
380
|
/// outputPath: the .emd file to write (”.emd” is added when missing), or a
|
|
@@ -386,10 +385,9 @@ SWIFT_CLASS("_TtC10DavoiceTTS10DaVoiceTTS")
|
|
|
386
385
|
/// (e.g. embedder_en.dm); it is unscrambled in memory only.
|
|
387
386
|
/// </li>
|
|
388
387
|
/// </ul>
|
|
389
|
-
/// Returns [“path”, “voice”, “
|
|
390
|
-
///
|
|
391
|
-
///
|
|
392
|
-
/// (and call that again) to use it.
|
|
388
|
+
/// Returns [“path”, “voice”, “warnings”]; when “warnings” is non-empty, ask
|
|
389
|
+
/// the user to record again. Put the file in the folder given to
|
|
390
|
+
/// setExternalVoicesPath() (and call that again) to use it.
|
|
393
391
|
+ (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;
|
|
394
392
|
- (void)changeVoice:(NSString * _Nonnull)name completion:(void (^ _Nonnull)(NSInteger))completion;
|
|
395
393
|
@property (nonatomic, copy) void (^ _Nullable onLastUtteranceFinished)(void);
|