react-native-nitro-mlx 0.3.0 → 0.4.0
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/MLXReactNative.podspec +7 -1
- package/ios/Sources/AudioCaptureManager.swift +110 -0
- package/ios/Sources/HybridLLM.swift +309 -68
- package/ios/Sources/HybridSTT.swift +202 -0
- package/ios/Sources/HybridTTS.swift +145 -0
- package/ios/Sources/JSONHelpers.swift +9 -0
- package/ios/Sources/ModelDownloader.swift +26 -12
- package/ios/Sources/StreamEventEmitter.swift +132 -0
- package/ios/Sources/ThinkingStateMachine.swift +206 -0
- package/lib/module/index.js +2 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/llm.js +39 -1
- package/lib/module/llm.js.map +1 -1
- package/lib/module/models.js +97 -26
- package/lib/module/models.js.map +1 -1
- package/lib/module/specs/STT.nitro.js +4 -0
- package/lib/module/specs/STT.nitro.js.map +1 -0
- package/lib/module/specs/TTS.nitro.js +4 -0
- package/lib/module/specs/TTS.nitro.js.map +1 -0
- package/lib/module/stt.js +49 -0
- package/lib/module/stt.js.map +1 -0
- package/lib/module/tts.js +40 -0
- package/lib/module/tts.js.map +1 -0
- package/lib/typescript/src/index.d.ts +7 -3
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/llm.d.ts +32 -2
- package/lib/typescript/src/llm.d.ts.map +1 -1
- package/lib/typescript/src/models.d.ts +13 -4
- package/lib/typescript/src/models.d.ts.map +1 -1
- package/lib/typescript/src/specs/LLM.nitro.d.ts +49 -4
- package/lib/typescript/src/specs/LLM.nitro.d.ts.map +1 -1
- package/lib/typescript/src/specs/STT.nitro.d.ts +28 -0
- package/lib/typescript/src/specs/STT.nitro.d.ts.map +1 -0
- package/lib/typescript/src/specs/TTS.nitro.d.ts +22 -0
- package/lib/typescript/src/specs/TTS.nitro.d.ts.map +1 -0
- package/lib/typescript/src/stt.d.ts +16 -0
- package/lib/typescript/src/stt.d.ts.map +1 -0
- package/lib/typescript/src/tts.d.ts +13 -0
- package/lib/typescript/src/tts.d.ts.map +1 -0
- package/nitrogen/generated/ios/MLXReactNative-Swift-Cxx-Bridge.cpp +42 -0
- package/nitrogen/generated/ios/MLXReactNative-Swift-Cxx-Bridge.hpp +165 -0
- package/nitrogen/generated/ios/MLXReactNative-Swift-Cxx-Umbrella.hpp +20 -0
- package/nitrogen/generated/ios/MLXReactNativeAutolinking.mm +16 -0
- package/nitrogen/generated/ios/MLXReactNativeAutolinking.swift +30 -0
- package/nitrogen/generated/ios/c++/HybridLLMSpecSwift.hpp +8 -0
- package/nitrogen/generated/ios/c++/HybridSTTSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridSTTSpecSwift.hpp +149 -0
- package/nitrogen/generated/ios/c++/HybridTTSSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridTTSSpecSwift.hpp +128 -0
- package/nitrogen/generated/ios/swift/Func_void_std__shared_ptr_ArrayBuffer_.swift +47 -0
- package/nitrogen/generated/ios/swift/GenerationStats.swift +13 -2
- package/nitrogen/generated/ios/swift/HybridLLMSpec.swift +1 -0
- package/nitrogen/generated/ios/swift/HybridLLMSpec_cxx.swift +24 -0
- package/nitrogen/generated/ios/swift/HybridSTTSpec.swift +66 -0
- package/nitrogen/generated/ios/swift/HybridSTTSpec_cxx.swift +286 -0
- package/nitrogen/generated/ios/swift/HybridTTSSpec.swift +63 -0
- package/nitrogen/generated/ios/swift/HybridTTSSpec_cxx.swift +229 -0
- package/nitrogen/generated/ios/swift/STTLoadOptions.swift +66 -0
- package/nitrogen/generated/ios/swift/TTSGenerateOptions.swift +78 -0
- package/nitrogen/generated/ios/swift/TTSLoadOptions.swift +66 -0
- package/nitrogen/generated/shared/c++/GenerationStats.hpp +6 -2
- package/nitrogen/generated/shared/c++/HybridLLMSpec.cpp +1 -0
- package/nitrogen/generated/shared/c++/HybridLLMSpec.hpp +1 -0
- package/nitrogen/generated/shared/c++/HybridSTTSpec.cpp +32 -0
- package/nitrogen/generated/shared/c++/HybridSTTSpec.hpp +78 -0
- package/nitrogen/generated/shared/c++/HybridTTSSpec.cpp +29 -0
- package/nitrogen/generated/shared/c++/HybridTTSSpec.hpp +78 -0
- package/nitrogen/generated/shared/c++/STTLoadOptions.hpp +76 -0
- package/nitrogen/generated/shared/c++/TTSGenerateOptions.hpp +80 -0
- package/nitrogen/generated/shared/c++/TTSLoadOptions.hpp +76 -0
- package/package.json +8 -4
- package/src/index.ts +31 -1
- package/src/llm.ts +48 -2
- package/src/models.ts +81 -1
- package/src/specs/LLM.nitro.ts +74 -4
- package/src/specs/STT.nitro.ts +35 -0
- package/src/specs/TTS.nitro.ts +30 -0
- package/src/stt.ts +67 -0
- package/src/tts.ts +60 -0
|
@@ -8,16 +8,28 @@
|
|
|
8
8
|
#pragma once
|
|
9
9
|
|
|
10
10
|
// Forward declarations of C++ defined types
|
|
11
|
+
// Forward declaration of `ArrayBufferHolder` to properly resolve imports.
|
|
12
|
+
namespace NitroModules { class ArrayBufferHolder; }
|
|
11
13
|
// Forward declaration of `GenerationStats` to properly resolve imports.
|
|
12
14
|
namespace margelo::nitro::mlxreactnative { struct GenerationStats; }
|
|
13
15
|
// Forward declaration of `HybridLLMSpec` to properly resolve imports.
|
|
14
16
|
namespace margelo::nitro::mlxreactnative { class HybridLLMSpec; }
|
|
15
17
|
// Forward declaration of `HybridModelManagerSpec` to properly resolve imports.
|
|
16
18
|
namespace margelo::nitro::mlxreactnative { class HybridModelManagerSpec; }
|
|
19
|
+
// Forward declaration of `HybridSTTSpec` to properly resolve imports.
|
|
20
|
+
namespace margelo::nitro::mlxreactnative { class HybridSTTSpec; }
|
|
21
|
+
// Forward declaration of `HybridTTSSpec` to properly resolve imports.
|
|
22
|
+
namespace margelo::nitro::mlxreactnative { class HybridTTSSpec; }
|
|
17
23
|
// Forward declaration of `LLMLoadOptions` to properly resolve imports.
|
|
18
24
|
namespace margelo::nitro::mlxreactnative { struct LLMLoadOptions; }
|
|
19
25
|
// Forward declaration of `LLMMessage` to properly resolve imports.
|
|
20
26
|
namespace margelo::nitro::mlxreactnative { struct LLMMessage; }
|
|
27
|
+
// Forward declaration of `STTLoadOptions` to properly resolve imports.
|
|
28
|
+
namespace margelo::nitro::mlxreactnative { struct STTLoadOptions; }
|
|
29
|
+
// Forward declaration of `TTSGenerateOptions` to properly resolve imports.
|
|
30
|
+
namespace margelo::nitro::mlxreactnative { struct TTSGenerateOptions; }
|
|
31
|
+
// Forward declaration of `TTSLoadOptions` to properly resolve imports.
|
|
32
|
+
namespace margelo::nitro::mlxreactnative { struct TTSLoadOptions; }
|
|
21
33
|
// Forward declaration of `ToolDefinition` to properly resolve imports.
|
|
22
34
|
namespace margelo::nitro::mlxreactnative { struct ToolDefinition; }
|
|
23
35
|
// Forward declaration of `ToolParameter` to properly resolve imports.
|
|
@@ -28,16 +40,27 @@ namespace margelo::nitro::mlxreactnative { struct ToolParameter; }
|
|
|
28
40
|
namespace MLXReactNative { class HybridLLMSpec_cxx; }
|
|
29
41
|
// Forward declaration of `HybridModelManagerSpec_cxx` to properly resolve imports.
|
|
30
42
|
namespace MLXReactNative { class HybridModelManagerSpec_cxx; }
|
|
43
|
+
// Forward declaration of `HybridSTTSpec_cxx` to properly resolve imports.
|
|
44
|
+
namespace MLXReactNative { class HybridSTTSpec_cxx; }
|
|
45
|
+
// Forward declaration of `HybridTTSSpec_cxx` to properly resolve imports.
|
|
46
|
+
namespace MLXReactNative { class HybridTTSSpec_cxx; }
|
|
31
47
|
|
|
32
48
|
// Include C++ defined types
|
|
33
49
|
#include "GenerationStats.hpp"
|
|
34
50
|
#include "HybridLLMSpec.hpp"
|
|
35
51
|
#include "HybridModelManagerSpec.hpp"
|
|
52
|
+
#include "HybridSTTSpec.hpp"
|
|
53
|
+
#include "HybridTTSSpec.hpp"
|
|
36
54
|
#include "LLMLoadOptions.hpp"
|
|
37
55
|
#include "LLMMessage.hpp"
|
|
56
|
+
#include "STTLoadOptions.hpp"
|
|
57
|
+
#include "TTSGenerateOptions.hpp"
|
|
58
|
+
#include "TTSLoadOptions.hpp"
|
|
38
59
|
#include "ToolDefinition.hpp"
|
|
39
60
|
#include "ToolParameter.hpp"
|
|
40
61
|
#include <NitroModules/AnyMap.hpp>
|
|
62
|
+
#include <NitroModules/ArrayBuffer.hpp>
|
|
63
|
+
#include <NitroModules/ArrayBufferHolder.hpp>
|
|
41
64
|
#include <NitroModules/Promise.hpp>
|
|
42
65
|
#include <NitroModules/PromiseHolder.hpp>
|
|
43
66
|
#include <NitroModules/Result.hpp>
|
|
@@ -567,5 +590,147 @@ namespace margelo::nitro::mlxreactnative::bridge::swift {
|
|
|
567
590
|
inline Result_std__shared_ptr_Promise_std__vector_std__string____ create_Result_std__shared_ptr_Promise_std__vector_std__string____(const std::exception_ptr& error) noexcept {
|
|
568
591
|
return Result<std::shared_ptr<Promise<std::vector<std::string>>>>::withError(error);
|
|
569
592
|
}
|
|
593
|
+
|
|
594
|
+
// pragma MARK: std::optional<STTLoadOptions>
|
|
595
|
+
/**
|
|
596
|
+
* Specialized version of `std::optional<STTLoadOptions>`.
|
|
597
|
+
*/
|
|
598
|
+
using std__optional_STTLoadOptions_ = std::optional<STTLoadOptions>;
|
|
599
|
+
inline std::optional<STTLoadOptions> create_std__optional_STTLoadOptions_(const STTLoadOptions& value) noexcept {
|
|
600
|
+
return std::optional<STTLoadOptions>(value);
|
|
601
|
+
}
|
|
602
|
+
inline bool has_value_std__optional_STTLoadOptions_(const std::optional<STTLoadOptions>& optional) noexcept {
|
|
603
|
+
return optional.has_value();
|
|
604
|
+
}
|
|
605
|
+
inline STTLoadOptions get_std__optional_STTLoadOptions_(const std::optional<STTLoadOptions>& optional) noexcept {
|
|
606
|
+
return *optional;
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
// pragma MARK: std::shared_ptr<HybridSTTSpec>
|
|
610
|
+
/**
|
|
611
|
+
* Specialized version of `std::shared_ptr<HybridSTTSpec>`.
|
|
612
|
+
*/
|
|
613
|
+
using std__shared_ptr_HybridSTTSpec_ = std::shared_ptr<HybridSTTSpec>;
|
|
614
|
+
std::shared_ptr<HybridSTTSpec> create_std__shared_ptr_HybridSTTSpec_(void* NON_NULL swiftUnsafePointer) noexcept;
|
|
615
|
+
void* NON_NULL get_std__shared_ptr_HybridSTTSpec_(std__shared_ptr_HybridSTTSpec_ cppType);
|
|
616
|
+
|
|
617
|
+
// pragma MARK: std::weak_ptr<HybridSTTSpec>
|
|
618
|
+
using std__weak_ptr_HybridSTTSpec_ = std::weak_ptr<HybridSTTSpec>;
|
|
619
|
+
inline std__weak_ptr_HybridSTTSpec_ weakify_std__shared_ptr_HybridSTTSpec_(const std::shared_ptr<HybridSTTSpec>& strong) noexcept { return strong; }
|
|
620
|
+
|
|
621
|
+
// pragma MARK: std::optional<TTSLoadOptions>
|
|
622
|
+
/**
|
|
623
|
+
* Specialized version of `std::optional<TTSLoadOptions>`.
|
|
624
|
+
*/
|
|
625
|
+
using std__optional_TTSLoadOptions_ = std::optional<TTSLoadOptions>;
|
|
626
|
+
inline std::optional<TTSLoadOptions> create_std__optional_TTSLoadOptions_(const TTSLoadOptions& value) noexcept {
|
|
627
|
+
return std::optional<TTSLoadOptions>(value);
|
|
628
|
+
}
|
|
629
|
+
inline bool has_value_std__optional_TTSLoadOptions_(const std::optional<TTSLoadOptions>& optional) noexcept {
|
|
630
|
+
return optional.has_value();
|
|
631
|
+
}
|
|
632
|
+
inline TTSLoadOptions get_std__optional_TTSLoadOptions_(const std::optional<TTSLoadOptions>& optional) noexcept {
|
|
633
|
+
return *optional;
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
// pragma MARK: std::shared_ptr<Promise<std::shared_ptr<ArrayBuffer>>>
|
|
637
|
+
/**
|
|
638
|
+
* Specialized version of `std::shared_ptr<Promise<std::shared_ptr<ArrayBuffer>>>`.
|
|
639
|
+
*/
|
|
640
|
+
using std__shared_ptr_Promise_std__shared_ptr_ArrayBuffer___ = std::shared_ptr<Promise<std::shared_ptr<ArrayBuffer>>>;
|
|
641
|
+
inline std::shared_ptr<Promise<std::shared_ptr<ArrayBuffer>>> create_std__shared_ptr_Promise_std__shared_ptr_ArrayBuffer___() noexcept {
|
|
642
|
+
return Promise<std::shared_ptr<ArrayBuffer>>::create();
|
|
643
|
+
}
|
|
644
|
+
inline PromiseHolder<std::shared_ptr<ArrayBuffer>> wrap_std__shared_ptr_Promise_std__shared_ptr_ArrayBuffer___(std::shared_ptr<Promise<std::shared_ptr<ArrayBuffer>>> promise) noexcept {
|
|
645
|
+
return PromiseHolder<std::shared_ptr<ArrayBuffer>>(std::move(promise));
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
// pragma MARK: std::function<void(const std::shared_ptr<ArrayBuffer>& /* result */)>
|
|
649
|
+
/**
|
|
650
|
+
* Specialized version of `std::function<void(const std::shared_ptr<ArrayBuffer>&)>`.
|
|
651
|
+
*/
|
|
652
|
+
using Func_void_std__shared_ptr_ArrayBuffer_ = std::function<void(const std::shared_ptr<ArrayBuffer>& /* result */)>;
|
|
653
|
+
/**
|
|
654
|
+
* Wrapper class for a `std::function<void(const std::shared_ptr<ArrayBuffer>& / * result * /)>`, this can be used from Swift.
|
|
655
|
+
*/
|
|
656
|
+
class Func_void_std__shared_ptr_ArrayBuffer__Wrapper final {
|
|
657
|
+
public:
|
|
658
|
+
explicit Func_void_std__shared_ptr_ArrayBuffer__Wrapper(std::function<void(const std::shared_ptr<ArrayBuffer>& /* result */)>&& func): _function(std::make_unique<std::function<void(const std::shared_ptr<ArrayBuffer>& /* result */)>>(std::move(func))) {}
|
|
659
|
+
inline void call(ArrayBufferHolder result) const noexcept {
|
|
660
|
+
_function->operator()(result.getArrayBuffer());
|
|
661
|
+
}
|
|
662
|
+
private:
|
|
663
|
+
std::unique_ptr<std::function<void(const std::shared_ptr<ArrayBuffer>& /* result */)>> _function;
|
|
664
|
+
} SWIFT_NONCOPYABLE;
|
|
665
|
+
Func_void_std__shared_ptr_ArrayBuffer_ create_Func_void_std__shared_ptr_ArrayBuffer_(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
666
|
+
inline Func_void_std__shared_ptr_ArrayBuffer__Wrapper wrap_Func_void_std__shared_ptr_ArrayBuffer_(Func_void_std__shared_ptr_ArrayBuffer_ value) noexcept {
|
|
667
|
+
return Func_void_std__shared_ptr_ArrayBuffer__Wrapper(std::move(value));
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
// pragma MARK: std::optional<std::string>
|
|
671
|
+
/**
|
|
672
|
+
* Specialized version of `std::optional<std::string>`.
|
|
673
|
+
*/
|
|
674
|
+
using std__optional_std__string_ = std::optional<std::string>;
|
|
675
|
+
inline std::optional<std::string> create_std__optional_std__string_(const std::string& value) noexcept {
|
|
676
|
+
return std::optional<std::string>(value);
|
|
677
|
+
}
|
|
678
|
+
inline bool has_value_std__optional_std__string_(const std::optional<std::string>& optional) noexcept {
|
|
679
|
+
return optional.has_value();
|
|
680
|
+
}
|
|
681
|
+
inline std::string get_std__optional_std__string_(const std::optional<std::string>& optional) noexcept {
|
|
682
|
+
return *optional;
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
// pragma MARK: std::optional<double>
|
|
686
|
+
/**
|
|
687
|
+
* Specialized version of `std::optional<double>`.
|
|
688
|
+
*/
|
|
689
|
+
using std__optional_double_ = std::optional<double>;
|
|
690
|
+
inline std::optional<double> create_std__optional_double_(const double& value) noexcept {
|
|
691
|
+
return std::optional<double>(value);
|
|
692
|
+
}
|
|
693
|
+
inline bool has_value_std__optional_double_(const std::optional<double>& optional) noexcept {
|
|
694
|
+
return optional.has_value();
|
|
695
|
+
}
|
|
696
|
+
inline double get_std__optional_double_(const std::optional<double>& optional) noexcept {
|
|
697
|
+
return *optional;
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
// pragma MARK: std::optional<TTSGenerateOptions>
|
|
701
|
+
/**
|
|
702
|
+
* Specialized version of `std::optional<TTSGenerateOptions>`.
|
|
703
|
+
*/
|
|
704
|
+
using std__optional_TTSGenerateOptions_ = std::optional<TTSGenerateOptions>;
|
|
705
|
+
inline std::optional<TTSGenerateOptions> create_std__optional_TTSGenerateOptions_(const TTSGenerateOptions& value) noexcept {
|
|
706
|
+
return std::optional<TTSGenerateOptions>(value);
|
|
707
|
+
}
|
|
708
|
+
inline bool has_value_std__optional_TTSGenerateOptions_(const std::optional<TTSGenerateOptions>& optional) noexcept {
|
|
709
|
+
return optional.has_value();
|
|
710
|
+
}
|
|
711
|
+
inline TTSGenerateOptions get_std__optional_TTSGenerateOptions_(const std::optional<TTSGenerateOptions>& optional) noexcept {
|
|
712
|
+
return *optional;
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
// pragma MARK: std::shared_ptr<HybridTTSSpec>
|
|
716
|
+
/**
|
|
717
|
+
* Specialized version of `std::shared_ptr<HybridTTSSpec>`.
|
|
718
|
+
*/
|
|
719
|
+
using std__shared_ptr_HybridTTSSpec_ = std::shared_ptr<HybridTTSSpec>;
|
|
720
|
+
std::shared_ptr<HybridTTSSpec> create_std__shared_ptr_HybridTTSSpec_(void* NON_NULL swiftUnsafePointer) noexcept;
|
|
721
|
+
void* NON_NULL get_std__shared_ptr_HybridTTSSpec_(std__shared_ptr_HybridTTSSpec_ cppType);
|
|
722
|
+
|
|
723
|
+
// pragma MARK: std::weak_ptr<HybridTTSSpec>
|
|
724
|
+
using std__weak_ptr_HybridTTSSpec_ = std::weak_ptr<HybridTTSSpec>;
|
|
725
|
+
inline std__weak_ptr_HybridTTSSpec_ weakify_std__shared_ptr_HybridTTSSpec_(const std::shared_ptr<HybridTTSSpec>& strong) noexcept { return strong; }
|
|
726
|
+
|
|
727
|
+
// pragma MARK: Result<std::shared_ptr<Promise<std::shared_ptr<ArrayBuffer>>>>
|
|
728
|
+
using Result_std__shared_ptr_Promise_std__shared_ptr_ArrayBuffer____ = Result<std::shared_ptr<Promise<std::shared_ptr<ArrayBuffer>>>>;
|
|
729
|
+
inline Result_std__shared_ptr_Promise_std__shared_ptr_ArrayBuffer____ create_Result_std__shared_ptr_Promise_std__shared_ptr_ArrayBuffer____(const std::shared_ptr<Promise<std::shared_ptr<ArrayBuffer>>>& value) noexcept {
|
|
730
|
+
return Result<std::shared_ptr<Promise<std::shared_ptr<ArrayBuffer>>>>::withValue(value);
|
|
731
|
+
}
|
|
732
|
+
inline Result_std__shared_ptr_Promise_std__shared_ptr_ArrayBuffer____ create_Result_std__shared_ptr_Promise_std__shared_ptr_ArrayBuffer____(const std::exception_ptr& error) noexcept {
|
|
733
|
+
return Result<std::shared_ptr<Promise<std::shared_ptr<ArrayBuffer>>>>::withError(error);
|
|
734
|
+
}
|
|
570
735
|
|
|
571
736
|
} // namespace margelo::nitro::mlxreactnative::bridge::swift
|
|
@@ -14,10 +14,20 @@ namespace margelo::nitro::mlxreactnative { struct GenerationStats; }
|
|
|
14
14
|
namespace margelo::nitro::mlxreactnative { class HybridLLMSpec; }
|
|
15
15
|
// Forward declaration of `HybridModelManagerSpec` to properly resolve imports.
|
|
16
16
|
namespace margelo::nitro::mlxreactnative { class HybridModelManagerSpec; }
|
|
17
|
+
// Forward declaration of `HybridSTTSpec` to properly resolve imports.
|
|
18
|
+
namespace margelo::nitro::mlxreactnative { class HybridSTTSpec; }
|
|
19
|
+
// Forward declaration of `HybridTTSSpec` to properly resolve imports.
|
|
20
|
+
namespace margelo::nitro::mlxreactnative { class HybridTTSSpec; }
|
|
17
21
|
// Forward declaration of `LLMLoadOptions` to properly resolve imports.
|
|
18
22
|
namespace margelo::nitro::mlxreactnative { struct LLMLoadOptions; }
|
|
19
23
|
// Forward declaration of `LLMMessage` to properly resolve imports.
|
|
20
24
|
namespace margelo::nitro::mlxreactnative { struct LLMMessage; }
|
|
25
|
+
// Forward declaration of `STTLoadOptions` to properly resolve imports.
|
|
26
|
+
namespace margelo::nitro::mlxreactnative { struct STTLoadOptions; }
|
|
27
|
+
// Forward declaration of `TTSGenerateOptions` to properly resolve imports.
|
|
28
|
+
namespace margelo::nitro::mlxreactnative { struct TTSGenerateOptions; }
|
|
29
|
+
// Forward declaration of `TTSLoadOptions` to properly resolve imports.
|
|
30
|
+
namespace margelo::nitro::mlxreactnative { struct TTSLoadOptions; }
|
|
21
31
|
// Forward declaration of `ToolDefinition` to properly resolve imports.
|
|
22
32
|
namespace margelo::nitro::mlxreactnative { struct ToolDefinition; }
|
|
23
33
|
// Forward declaration of `ToolParameter` to properly resolve imports.
|
|
@@ -27,11 +37,17 @@ namespace margelo::nitro::mlxreactnative { struct ToolParameter; }
|
|
|
27
37
|
#include "GenerationStats.hpp"
|
|
28
38
|
#include "HybridLLMSpec.hpp"
|
|
29
39
|
#include "HybridModelManagerSpec.hpp"
|
|
40
|
+
#include "HybridSTTSpec.hpp"
|
|
41
|
+
#include "HybridTTSSpec.hpp"
|
|
30
42
|
#include "LLMLoadOptions.hpp"
|
|
31
43
|
#include "LLMMessage.hpp"
|
|
44
|
+
#include "STTLoadOptions.hpp"
|
|
45
|
+
#include "TTSGenerateOptions.hpp"
|
|
46
|
+
#include "TTSLoadOptions.hpp"
|
|
32
47
|
#include "ToolDefinition.hpp"
|
|
33
48
|
#include "ToolParameter.hpp"
|
|
34
49
|
#include <NitroModules/AnyMap.hpp>
|
|
50
|
+
#include <NitroModules/ArrayBuffer.hpp>
|
|
35
51
|
#include <NitroModules/Promise.hpp>
|
|
36
52
|
#include <NitroModules/Result.hpp>
|
|
37
53
|
#include <exception>
|
|
@@ -55,6 +71,10 @@ namespace margelo::nitro::mlxreactnative { struct ToolParameter; }
|
|
|
55
71
|
namespace MLXReactNative { class HybridLLMSpec_cxx; }
|
|
56
72
|
// Forward declaration of `HybridModelManagerSpec_cxx` to properly resolve imports.
|
|
57
73
|
namespace MLXReactNative { class HybridModelManagerSpec_cxx; }
|
|
74
|
+
// Forward declaration of `HybridSTTSpec_cxx` to properly resolve imports.
|
|
75
|
+
namespace MLXReactNative { class HybridSTTSpec_cxx; }
|
|
76
|
+
// Forward declaration of `HybridTTSSpec_cxx` to properly resolve imports.
|
|
77
|
+
namespace MLXReactNative { class HybridTTSSpec_cxx; }
|
|
58
78
|
|
|
59
79
|
// Include Swift defined types
|
|
60
80
|
#if __has_include("MLXReactNative-Swift.h")
|
|
@@ -12,6 +12,8 @@
|
|
|
12
12
|
|
|
13
13
|
#include "HybridLLMSpecSwift.hpp"
|
|
14
14
|
#include "HybridModelManagerSpecSwift.hpp"
|
|
15
|
+
#include "HybridTTSSpecSwift.hpp"
|
|
16
|
+
#include "HybridSTTSpecSwift.hpp"
|
|
15
17
|
|
|
16
18
|
@interface MLXReactNativeAutolinking : NSObject
|
|
17
19
|
@end
|
|
@@ -36,6 +38,20 @@
|
|
|
36
38
|
return hybridObject;
|
|
37
39
|
}
|
|
38
40
|
);
|
|
41
|
+
HybridObjectRegistry::registerHybridObjectConstructor(
|
|
42
|
+
"TTS",
|
|
43
|
+
[]() -> std::shared_ptr<HybridObject> {
|
|
44
|
+
std::shared_ptr<HybridTTSSpec> hybridObject = MLXReactNative::MLXReactNativeAutolinking::createTTS();
|
|
45
|
+
return hybridObject;
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
HybridObjectRegistry::registerHybridObjectConstructor(
|
|
49
|
+
"STT",
|
|
50
|
+
[]() -> std::shared_ptr<HybridObject> {
|
|
51
|
+
std::shared_ptr<HybridSTTSpec> hybridObject = MLXReactNative::MLXReactNativeAutolinking::createSTT();
|
|
52
|
+
return hybridObject;
|
|
53
|
+
}
|
|
54
|
+
);
|
|
39
55
|
}
|
|
40
56
|
|
|
41
57
|
@end
|
|
@@ -37,4 +37,34 @@ public final class MLXReactNativeAutolinking {
|
|
|
37
37
|
return __cxxWrapped.getCxxPart()
|
|
38
38
|
}()
|
|
39
39
|
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Creates an instance of a Swift class that implements `HybridTTSSpec`,
|
|
43
|
+
* and wraps it in a Swift class that can directly interop with C++ (`HybridTTSSpec_cxx`)
|
|
44
|
+
*
|
|
45
|
+
* This is generated by Nitrogen and will initialize the class specified
|
|
46
|
+
* in the `"autolinking"` property of `nitro.json` (in this case, `HybridTTS`).
|
|
47
|
+
*/
|
|
48
|
+
public static func createTTS() -> bridge.std__shared_ptr_HybridTTSSpec_ {
|
|
49
|
+
let hybridObject = HybridTTS()
|
|
50
|
+
return { () -> bridge.std__shared_ptr_HybridTTSSpec_ in
|
|
51
|
+
let __cxxWrapped = hybridObject.getCxxWrapper()
|
|
52
|
+
return __cxxWrapped.getCxxPart()
|
|
53
|
+
}()
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Creates an instance of a Swift class that implements `HybridSTTSpec`,
|
|
58
|
+
* and wraps it in a Swift class that can directly interop with C++ (`HybridSTTSpec_cxx`)
|
|
59
|
+
*
|
|
60
|
+
* This is generated by Nitrogen and will initialize the class specified
|
|
61
|
+
* in the `"autolinking"` property of `nitro.json` (in this case, `HybridSTT`).
|
|
62
|
+
*/
|
|
63
|
+
public static func createSTT() -> bridge.std__shared_ptr_HybridSTTSpec_ {
|
|
64
|
+
let hybridObject = HybridSTT()
|
|
65
|
+
return { () -> bridge.std__shared_ptr_HybridSTTSpec_ in
|
|
66
|
+
let __cxxWrapped = hybridObject.getCxxWrapper()
|
|
67
|
+
return __cxxWrapped.getCxxPart()
|
|
68
|
+
}()
|
|
69
|
+
}
|
|
40
70
|
}
|
|
@@ -125,6 +125,14 @@ namespace margelo::nitro::mlxreactnative {
|
|
|
125
125
|
auto __value = std::move(__result.value());
|
|
126
126
|
return __value;
|
|
127
127
|
}
|
|
128
|
+
inline std::shared_ptr<Promise<std::string>> streamWithEvents(const std::string& prompt, const std::function<void(const std::string& /* eventJson */)>& onEvent) override {
|
|
129
|
+
auto __result = _swiftPart.streamWithEvents(prompt, onEvent);
|
|
130
|
+
if (__result.hasError()) [[unlikely]] {
|
|
131
|
+
std::rethrow_exception(__result.error());
|
|
132
|
+
}
|
|
133
|
+
auto __value = std::move(__result.value());
|
|
134
|
+
return __value;
|
|
135
|
+
}
|
|
128
136
|
inline void stop() override {
|
|
129
137
|
auto __result = _swiftPart.stop();
|
|
130
138
|
if (__result.hasError()) [[unlikely]] {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridSTTSpecSwift.cpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#include "HybridSTTSpecSwift.hpp"
|
|
9
|
+
|
|
10
|
+
namespace margelo::nitro::mlxreactnative {
|
|
11
|
+
} // namespace margelo::nitro::mlxreactnative
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridSTTSpecSwift.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include "HybridSTTSpec.hpp"
|
|
11
|
+
|
|
12
|
+
// Forward declaration of `HybridSTTSpec_cxx` to properly resolve imports.
|
|
13
|
+
namespace MLXReactNative { class HybridSTTSpec_cxx; }
|
|
14
|
+
|
|
15
|
+
// Forward declaration of `STTLoadOptions` to properly resolve imports.
|
|
16
|
+
namespace margelo::nitro::mlxreactnative { struct STTLoadOptions; }
|
|
17
|
+
// Forward declaration of `ArrayBufferHolder` to properly resolve imports.
|
|
18
|
+
namespace NitroModules { class ArrayBufferHolder; }
|
|
19
|
+
|
|
20
|
+
#include <string>
|
|
21
|
+
#include <NitroModules/Promise.hpp>
|
|
22
|
+
#include "STTLoadOptions.hpp"
|
|
23
|
+
#include <optional>
|
|
24
|
+
#include <functional>
|
|
25
|
+
#include <NitroModules/ArrayBuffer.hpp>
|
|
26
|
+
#include <NitroModules/ArrayBufferHolder.hpp>
|
|
27
|
+
|
|
28
|
+
#include "MLXReactNative-Swift-Cxx-Umbrella.hpp"
|
|
29
|
+
|
|
30
|
+
namespace margelo::nitro::mlxreactnative {
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* The C++ part of HybridSTTSpec_cxx.swift.
|
|
34
|
+
*
|
|
35
|
+
* HybridSTTSpecSwift (C++) accesses HybridSTTSpec_cxx (Swift), and might
|
|
36
|
+
* contain some additional bridging code for C++ <> Swift interop.
|
|
37
|
+
*
|
|
38
|
+
* Since this obviously introduces an overhead, I hope at some point in
|
|
39
|
+
* the future, HybridSTTSpec_cxx can directly inherit from the C++ class HybridSTTSpec
|
|
40
|
+
* to simplify the whole structure and memory management.
|
|
41
|
+
*/
|
|
42
|
+
class HybridSTTSpecSwift: public virtual HybridSTTSpec {
|
|
43
|
+
public:
|
|
44
|
+
// Constructor from a Swift instance
|
|
45
|
+
explicit HybridSTTSpecSwift(const MLXReactNative::HybridSTTSpec_cxx& swiftPart):
|
|
46
|
+
HybridObject(HybridSTTSpec::TAG),
|
|
47
|
+
_swiftPart(swiftPart) { }
|
|
48
|
+
|
|
49
|
+
public:
|
|
50
|
+
// Get the Swift part
|
|
51
|
+
inline MLXReactNative::HybridSTTSpec_cxx& getSwiftPart() noexcept {
|
|
52
|
+
return _swiftPart;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
public:
|
|
56
|
+
inline size_t getExternalMemorySize() noexcept override {
|
|
57
|
+
return _swiftPart.getMemorySize();
|
|
58
|
+
}
|
|
59
|
+
void dispose() noexcept override {
|
|
60
|
+
_swiftPart.dispose();
|
|
61
|
+
}
|
|
62
|
+
std::string toString() override {
|
|
63
|
+
return _swiftPart.toString();
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
public:
|
|
67
|
+
// Properties
|
|
68
|
+
inline bool getIsLoaded() noexcept override {
|
|
69
|
+
return _swiftPart.isLoaded();
|
|
70
|
+
}
|
|
71
|
+
inline bool getIsTranscribing() noexcept override {
|
|
72
|
+
return _swiftPart.isTranscribing();
|
|
73
|
+
}
|
|
74
|
+
inline bool getIsListening() noexcept override {
|
|
75
|
+
return _swiftPart.isListening();
|
|
76
|
+
}
|
|
77
|
+
inline std::string getModelId() noexcept override {
|
|
78
|
+
auto __result = _swiftPart.getModelId();
|
|
79
|
+
return __result;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
public:
|
|
83
|
+
// Methods
|
|
84
|
+
inline std::shared_ptr<Promise<void>> load(const std::string& modelId, const std::optional<STTLoadOptions>& options) override {
|
|
85
|
+
auto __result = _swiftPart.load(modelId, options);
|
|
86
|
+
if (__result.hasError()) [[unlikely]] {
|
|
87
|
+
std::rethrow_exception(__result.error());
|
|
88
|
+
}
|
|
89
|
+
auto __value = std::move(__result.value());
|
|
90
|
+
return __value;
|
|
91
|
+
}
|
|
92
|
+
inline std::shared_ptr<Promise<std::string>> transcribe(const std::shared_ptr<ArrayBuffer>& audio) override {
|
|
93
|
+
auto __result = _swiftPart.transcribe(ArrayBufferHolder(audio));
|
|
94
|
+
if (__result.hasError()) [[unlikely]] {
|
|
95
|
+
std::rethrow_exception(__result.error());
|
|
96
|
+
}
|
|
97
|
+
auto __value = std::move(__result.value());
|
|
98
|
+
return __value;
|
|
99
|
+
}
|
|
100
|
+
inline std::shared_ptr<Promise<std::string>> transcribeStream(const std::shared_ptr<ArrayBuffer>& audio, const std::function<void(const std::string& /* token */)>& onToken) override {
|
|
101
|
+
auto __result = _swiftPart.transcribeStream(ArrayBufferHolder(audio), onToken);
|
|
102
|
+
if (__result.hasError()) [[unlikely]] {
|
|
103
|
+
std::rethrow_exception(__result.error());
|
|
104
|
+
}
|
|
105
|
+
auto __value = std::move(__result.value());
|
|
106
|
+
return __value;
|
|
107
|
+
}
|
|
108
|
+
inline std::shared_ptr<Promise<void>> startListening() override {
|
|
109
|
+
auto __result = _swiftPart.startListening();
|
|
110
|
+
if (__result.hasError()) [[unlikely]] {
|
|
111
|
+
std::rethrow_exception(__result.error());
|
|
112
|
+
}
|
|
113
|
+
auto __value = std::move(__result.value());
|
|
114
|
+
return __value;
|
|
115
|
+
}
|
|
116
|
+
inline std::shared_ptr<Promise<std::string>> transcribeBuffer() override {
|
|
117
|
+
auto __result = _swiftPart.transcribeBuffer();
|
|
118
|
+
if (__result.hasError()) [[unlikely]] {
|
|
119
|
+
std::rethrow_exception(__result.error());
|
|
120
|
+
}
|
|
121
|
+
auto __value = std::move(__result.value());
|
|
122
|
+
return __value;
|
|
123
|
+
}
|
|
124
|
+
inline std::shared_ptr<Promise<std::string>> stopListening() override {
|
|
125
|
+
auto __result = _swiftPart.stopListening();
|
|
126
|
+
if (__result.hasError()) [[unlikely]] {
|
|
127
|
+
std::rethrow_exception(__result.error());
|
|
128
|
+
}
|
|
129
|
+
auto __value = std::move(__result.value());
|
|
130
|
+
return __value;
|
|
131
|
+
}
|
|
132
|
+
inline void stop() override {
|
|
133
|
+
auto __result = _swiftPart.stop();
|
|
134
|
+
if (__result.hasError()) [[unlikely]] {
|
|
135
|
+
std::rethrow_exception(__result.error());
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
inline void unload() override {
|
|
139
|
+
auto __result = _swiftPart.unload();
|
|
140
|
+
if (__result.hasError()) [[unlikely]] {
|
|
141
|
+
std::rethrow_exception(__result.error());
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
private:
|
|
146
|
+
MLXReactNative::HybridSTTSpec_cxx _swiftPart;
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
} // namespace margelo::nitro::mlxreactnative
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridTTSSpecSwift.cpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#include "HybridTTSSpecSwift.hpp"
|
|
9
|
+
|
|
10
|
+
namespace margelo::nitro::mlxreactnative {
|
|
11
|
+
} // namespace margelo::nitro::mlxreactnative
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridTTSSpecSwift.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include "HybridTTSSpec.hpp"
|
|
11
|
+
|
|
12
|
+
// Forward declaration of `HybridTTSSpec_cxx` to properly resolve imports.
|
|
13
|
+
namespace MLXReactNative { class HybridTTSSpec_cxx; }
|
|
14
|
+
|
|
15
|
+
// Forward declaration of `TTSLoadOptions` to properly resolve imports.
|
|
16
|
+
namespace margelo::nitro::mlxreactnative { struct TTSLoadOptions; }
|
|
17
|
+
// Forward declaration of `ArrayBufferHolder` to properly resolve imports.
|
|
18
|
+
namespace NitroModules { class ArrayBufferHolder; }
|
|
19
|
+
// Forward declaration of `TTSGenerateOptions` to properly resolve imports.
|
|
20
|
+
namespace margelo::nitro::mlxreactnative { struct TTSGenerateOptions; }
|
|
21
|
+
|
|
22
|
+
#include <string>
|
|
23
|
+
#include <NitroModules/Promise.hpp>
|
|
24
|
+
#include "TTSLoadOptions.hpp"
|
|
25
|
+
#include <optional>
|
|
26
|
+
#include <functional>
|
|
27
|
+
#include <NitroModules/ArrayBuffer.hpp>
|
|
28
|
+
#include <NitroModules/ArrayBufferHolder.hpp>
|
|
29
|
+
#include "TTSGenerateOptions.hpp"
|
|
30
|
+
|
|
31
|
+
#include "MLXReactNative-Swift-Cxx-Umbrella.hpp"
|
|
32
|
+
|
|
33
|
+
namespace margelo::nitro::mlxreactnative {
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* The C++ part of HybridTTSSpec_cxx.swift.
|
|
37
|
+
*
|
|
38
|
+
* HybridTTSSpecSwift (C++) accesses HybridTTSSpec_cxx (Swift), and might
|
|
39
|
+
* contain some additional bridging code for C++ <> Swift interop.
|
|
40
|
+
*
|
|
41
|
+
* Since this obviously introduces an overhead, I hope at some point in
|
|
42
|
+
* the future, HybridTTSSpec_cxx can directly inherit from the C++ class HybridTTSSpec
|
|
43
|
+
* to simplify the whole structure and memory management.
|
|
44
|
+
*/
|
|
45
|
+
class HybridTTSSpecSwift: public virtual HybridTTSSpec {
|
|
46
|
+
public:
|
|
47
|
+
// Constructor from a Swift instance
|
|
48
|
+
explicit HybridTTSSpecSwift(const MLXReactNative::HybridTTSSpec_cxx& swiftPart):
|
|
49
|
+
HybridObject(HybridTTSSpec::TAG),
|
|
50
|
+
_swiftPart(swiftPart) { }
|
|
51
|
+
|
|
52
|
+
public:
|
|
53
|
+
// Get the Swift part
|
|
54
|
+
inline MLXReactNative::HybridTTSSpec_cxx& getSwiftPart() noexcept {
|
|
55
|
+
return _swiftPart;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
public:
|
|
59
|
+
inline size_t getExternalMemorySize() noexcept override {
|
|
60
|
+
return _swiftPart.getMemorySize();
|
|
61
|
+
}
|
|
62
|
+
void dispose() noexcept override {
|
|
63
|
+
_swiftPart.dispose();
|
|
64
|
+
}
|
|
65
|
+
std::string toString() override {
|
|
66
|
+
return _swiftPart.toString();
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
public:
|
|
70
|
+
// Properties
|
|
71
|
+
inline bool getIsLoaded() noexcept override {
|
|
72
|
+
return _swiftPart.isLoaded();
|
|
73
|
+
}
|
|
74
|
+
inline bool getIsGenerating() noexcept override {
|
|
75
|
+
return _swiftPart.isGenerating();
|
|
76
|
+
}
|
|
77
|
+
inline std::string getModelId() noexcept override {
|
|
78
|
+
auto __result = _swiftPart.getModelId();
|
|
79
|
+
return __result;
|
|
80
|
+
}
|
|
81
|
+
inline double getSampleRate() noexcept override {
|
|
82
|
+
return _swiftPart.getSampleRate();
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
public:
|
|
86
|
+
// Methods
|
|
87
|
+
inline std::shared_ptr<Promise<void>> load(const std::string& modelId, const std::optional<TTSLoadOptions>& options) override {
|
|
88
|
+
auto __result = _swiftPart.load(modelId, options);
|
|
89
|
+
if (__result.hasError()) [[unlikely]] {
|
|
90
|
+
std::rethrow_exception(__result.error());
|
|
91
|
+
}
|
|
92
|
+
auto __value = std::move(__result.value());
|
|
93
|
+
return __value;
|
|
94
|
+
}
|
|
95
|
+
inline std::shared_ptr<Promise<std::shared_ptr<ArrayBuffer>>> generate(const std::string& text, const std::optional<TTSGenerateOptions>& options) override {
|
|
96
|
+
auto __result = _swiftPart.generate(text, options);
|
|
97
|
+
if (__result.hasError()) [[unlikely]] {
|
|
98
|
+
std::rethrow_exception(__result.error());
|
|
99
|
+
}
|
|
100
|
+
auto __value = std::move(__result.value());
|
|
101
|
+
return __value;
|
|
102
|
+
}
|
|
103
|
+
inline std::shared_ptr<Promise<void>> stream(const std::string& text, const std::function<void(const std::shared_ptr<ArrayBuffer>& /* audio */)>& onAudioChunk, const std::optional<TTSGenerateOptions>& options) override {
|
|
104
|
+
auto __result = _swiftPart.stream(text, onAudioChunk, options);
|
|
105
|
+
if (__result.hasError()) [[unlikely]] {
|
|
106
|
+
std::rethrow_exception(__result.error());
|
|
107
|
+
}
|
|
108
|
+
auto __value = std::move(__result.value());
|
|
109
|
+
return __value;
|
|
110
|
+
}
|
|
111
|
+
inline void stop() override {
|
|
112
|
+
auto __result = _swiftPart.stop();
|
|
113
|
+
if (__result.hasError()) [[unlikely]] {
|
|
114
|
+
std::rethrow_exception(__result.error());
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
inline void unload() override {
|
|
118
|
+
auto __result = _swiftPart.unload();
|
|
119
|
+
if (__result.hasError()) [[unlikely]] {
|
|
120
|
+
std::rethrow_exception(__result.error());
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
private:
|
|
125
|
+
MLXReactNative::HybridTTSSpec_cxx _swiftPart;
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
} // namespace margelo::nitro::mlxreactnative
|