react-native-davoice-tts 1.0.411 → 1.0.412

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 (22) hide show
  1. package/README.md +2 -3
  2. package/TTSRNBridge.podspec +1 -1
  3. package/android/libs/com/davoice/tts/1.0.0/tts-1.0.0.aar +0 -0
  4. package/android/libs/com/davoice/tts/1.0.0/tts-1.0.0.aar.md5 +1 -1
  5. package/android/libs/com/davoice/tts/1.0.0/tts-1.0.0.aar.sha1 +1 -1
  6. package/android/src/main/java/com/davoice/tts/rn/DaVoiceTTSBridge.java +4 -7
  7. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/DavoiceTTS +0 -0
  8. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Headers/DavoiceTTS-Swift.h +6 -8
  9. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.abi.json +175 -161
  10. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  11. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/DavoiceTTS +0 -0
  12. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Headers/DavoiceTTS-Swift.h +12 -16
  13. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.abi.json +175 -161
  14. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  15. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.abi.json +175 -161
  16. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  17. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/_CodeSignature/CodeDirectory +0 -0
  18. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/_CodeSignature/CodeRequirements-1 +0 -0
  19. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/_CodeSignature/CodeResources +21 -21
  20. package/package.json +1 -1
  21. package/speech/index.d.ts +6 -12
  22. 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 file, keeps the best ~6 s of speech (silence trimmed, long
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 less than 4 s of speech remained.
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
  ```
@@ -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.409" # Update to your package version
5
+ s.version = "1.0.412" # 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
- a619b1a82c872eb95700500b006c8456 tts-1.0.0.aar
1
+ 18683c0c4349958c2b6966b5d642f099 tts-1.0.0.aar
@@ -1 +1 @@
1
- b8d12c2f14c766d8f75e4cd81759a31e14848f54 tts-1.0.0.aar
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
- map.putDouble("seconds", ((Number) result.get("seconds")).doubleValue());
444
- for (String key : new String[]{"warnings", "report"}) {
445
- WritableArray list = Arguments.createArray();
446
- Object value = result.get(key);
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);
@@ -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
- /// Creates a voice clone from reference audio and saves it as a
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, 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).
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”, “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.
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);