@gmessier/nitro-speech 0.2.0 → 0.3.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.
Files changed (52) hide show
  1. package/README.md +11 -3
  2. package/lib/tsconfig.tsbuildinfo +1 -1
  3. package/nitrogen/generated/android/NitroSpeech+autolinking.cmake +1 -1
  4. package/nitrogen/generated/android/NitroSpeech+autolinking.gradle +1 -1
  5. package/nitrogen/generated/android/NitroSpeechOnLoad.cpp +32 -22
  6. package/nitrogen/generated/android/NitroSpeechOnLoad.hpp +14 -5
  7. package/nitrogen/generated/android/c++/JFunc_void.hpp +1 -1
  8. package/nitrogen/generated/android/c++/JFunc_void_double.hpp +1 -1
  9. package/nitrogen/generated/android/c++/JFunc_void_std__string.hpp +1 -1
  10. package/nitrogen/generated/android/c++/JFunc_void_std__vector_std__string_.hpp +1 -1
  11. package/nitrogen/generated/android/c++/JHapticFeedbackStyle.hpp +5 -6
  12. package/nitrogen/generated/android/c++/JHybridNitroSpeechSpec.cpp +23 -22
  13. package/nitrogen/generated/android/c++/JHybridNitroSpeechSpec.hpp +20 -22
  14. package/nitrogen/generated/android/c++/JHybridRecognizerSpec.cpp +39 -38
  15. package/nitrogen/generated/android/c++/JHybridRecognizerSpec.hpp +20 -22
  16. package/nitrogen/generated/android/c++/JSpeechToTextParams.hpp +1 -1
  17. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrospeech/Func_void.kt +1 -1
  18. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrospeech/Func_void_double.kt +1 -1
  19. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrospeech/Func_void_std__string.kt +1 -1
  20. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrospeech/Func_void_std__vector_std__string_.kt +1 -1
  21. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrospeech/HapticFeedbackStyle.kt +3 -1
  22. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrospeech/HybridNitroSpeechSpec.kt +16 -19
  23. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrospeech/HybridRecognizerSpec.kt +16 -19
  24. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrospeech/NitroSpeechOnLoad.kt +1 -1
  25. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrospeech/SpeechToTextParams.kt +2 -2
  26. package/nitrogen/generated/ios/NitroSpeech+autolinking.rb +2 -2
  27. package/nitrogen/generated/ios/NitroSpeech-Swift-Cxx-Bridge.cpp +1 -1
  28. package/nitrogen/generated/ios/NitroSpeech-Swift-Cxx-Bridge.hpp +11 -11
  29. package/nitrogen/generated/ios/NitroSpeech-Swift-Cxx-Umbrella.hpp +1 -1
  30. package/nitrogen/generated/ios/NitroSpeechAutolinking.mm +1 -1
  31. package/nitrogen/generated/ios/NitroSpeechAutolinking.swift +9 -8
  32. package/nitrogen/generated/ios/c++/HybridNitroSpeechSpecSwift.cpp +1 -1
  33. package/nitrogen/generated/ios/c++/HybridNitroSpeechSpecSwift.hpp +7 -1
  34. package/nitrogen/generated/ios/c++/HybridRecognizerSpecSwift.cpp +1 -1
  35. package/nitrogen/generated/ios/c++/HybridRecognizerSpecSwift.hpp +7 -1
  36. package/nitrogen/generated/ios/swift/Func_void.swift +1 -2
  37. package/nitrogen/generated/ios/swift/Func_void_double.swift +1 -2
  38. package/nitrogen/generated/ios/swift/Func_void_std__string.swift +1 -2
  39. package/nitrogen/generated/ios/swift/Func_void_std__vector_std__string_.swift +1 -2
  40. package/nitrogen/generated/ios/swift/HapticFeedbackStyle.swift +1 -1
  41. package/nitrogen/generated/ios/swift/HybridNitroSpeechSpec.swift +3 -4
  42. package/nitrogen/generated/ios/swift/HybridNitroSpeechSpec_cxx.swift +10 -3
  43. package/nitrogen/generated/ios/swift/HybridRecognizerSpec.swift +3 -4
  44. package/nitrogen/generated/ios/swift/HybridRecognizerSpec_cxx.swift +17 -3
  45. package/nitrogen/generated/ios/swift/SpeechToTextParams.swift +86 -218
  46. package/nitrogen/generated/shared/c++/HapticFeedbackStyle.hpp +1 -1
  47. package/nitrogen/generated/shared/c++/HybridNitroSpeechSpec.cpp +1 -1
  48. package/nitrogen/generated/shared/c++/HybridNitroSpeechSpec.hpp +1 -1
  49. package/nitrogen/generated/shared/c++/HybridRecognizerSpec.cpp +1 -1
  50. package/nitrogen/generated/shared/c++/HybridRecognizerSpec.hpp +1 -1
  51. package/nitrogen/generated/shared/c++/SpeechToTextParams.hpp +43 -35
  52. package/package.json +6 -3
@@ -2,7 +2,7 @@
2
2
  /// SpeechToTextParams.kt
3
3
  /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
4
  /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2026 Marc Rousavy @ Margelo
5
+ /// Copyright © Marc Rousavy @ Margelo
6
6
  ///
7
7
 
8
8
  package com.margelo.nitro.nitrospeech
@@ -53,7 +53,7 @@ data class SpeechToTextParams(
53
53
  ) {
54
54
  /* primary constructor */
55
55
 
56
- private companion object {
56
+ companion object {
57
57
  /**
58
58
  * Constructor called from C++
59
59
  */
@@ -2,7 +2,7 @@
2
2
  # NitroSpeech+autolinking.rb
3
3
  # This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
4
  # https://github.com/mrousavy/nitro
5
- # Copyright © 2026 Marc Rousavy @ Margelo
5
+ # Copyright © Marc Rousavy @ Margelo
6
6
  #
7
7
 
8
8
  # This is a Ruby script that adds all files generated by Nitrogen
@@ -52,7 +52,7 @@ def add_nitrogen_files(spec)
52
52
  spec.pod_target_xcconfig = current_pod_target_xcconfig.merge({
53
53
  # Use C++ 20
54
54
  "CLANG_CXX_LANGUAGE_STANDARD" => "c++20",
55
- # Enables C++ <-> Swift interop (by default it's only C)
55
+ # Enables C++ <-> Swift interop (by default it's only ObjC)
56
56
  "SWIFT_OBJC_INTEROP_MODE" => "objcxx",
57
57
  # Enables stricter modular headers
58
58
  "DEFINES_MODULE" => "YES",
@@ -2,7 +2,7 @@
2
2
  /// NitroSpeech-Swift-Cxx-Bridge.cpp
3
3
  /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
4
  /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2026 Marc Rousavy @ Margelo
5
+ /// Copyright © Marc Rousavy @ Margelo
6
6
  ///
7
7
 
8
8
  #include "NitroSpeech-Swift-Cxx-Bridge.hpp"
@@ -2,7 +2,7 @@
2
2
  /// NitroSpeech-Swift-Cxx-Bridge.hpp
3
3
  /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
4
  /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2026 Marc Rousavy @ Margelo
5
+ /// Copyright © Marc Rousavy @ Margelo
6
6
  ///
7
7
 
8
8
  #pragma once
@@ -51,7 +51,7 @@ namespace margelo::nitro::nitrospeech::bridge::swift {
51
51
  return optional.has_value();
52
52
  }
53
53
  inline std::string get_std__optional_std__string_(const std::optional<std::string>& optional) noexcept {
54
- return *optional;
54
+ return optional.value();
55
55
  }
56
56
 
57
57
  // pragma MARK: std::optional<double>
@@ -66,7 +66,7 @@ namespace margelo::nitro::nitrospeech::bridge::swift {
66
66
  return optional.has_value();
67
67
  }
68
68
  inline double get_std__optional_double_(const std::optional<double>& optional) noexcept {
69
- return *optional;
69
+ return optional.value();
70
70
  }
71
71
 
72
72
  // pragma MARK: std::optional<bool>
@@ -81,7 +81,7 @@ namespace margelo::nitro::nitrospeech::bridge::swift {
81
81
  return optional.has_value();
82
82
  }
83
83
  inline bool get_std__optional_bool_(const std::optional<bool>& optional) noexcept {
84
- return *optional;
84
+ return optional.value();
85
85
  }
86
86
 
87
87
  // pragma MARK: std::vector<std::string>
@@ -107,7 +107,7 @@ namespace margelo::nitro::nitrospeech::bridge::swift {
107
107
  return optional.has_value();
108
108
  }
109
109
  inline std::vector<std::string> get_std__optional_std__vector_std__string__(const std::optional<std::vector<std::string>>& optional) noexcept {
110
- return *optional;
110
+ return optional.value();
111
111
  }
112
112
 
113
113
  // pragma MARK: std::optional<HapticFeedbackStyle>
@@ -122,7 +122,7 @@ namespace margelo::nitro::nitrospeech::bridge::swift {
122
122
  return optional.has_value();
123
123
  }
124
124
  inline HapticFeedbackStyle get_std__optional_HapticFeedbackStyle_(const std::optional<HapticFeedbackStyle>& optional) noexcept {
125
- return *optional;
125
+ return optional.value();
126
126
  }
127
127
 
128
128
  // pragma MARK: std::function<void()>
@@ -159,7 +159,7 @@ namespace margelo::nitro::nitrospeech::bridge::swift {
159
159
  return optional.has_value();
160
160
  }
161
161
  inline std::function<void()> get_std__optional_std__function_void____(const std::optional<std::function<void()>>& optional) noexcept {
162
- return *optional;
162
+ return optional.value();
163
163
  }
164
164
 
165
165
  // pragma MARK: std::function<void(const std::vector<std::string>& /* resultBatches */)>
@@ -196,7 +196,7 @@ namespace margelo::nitro::nitrospeech::bridge::swift {
196
196
  return optional.has_value();
197
197
  }
198
198
  inline std::function<void(const std::vector<std::string>& /* resultBatches */)> get_std__optional_std__function_void_const_std__vector_std__string______resultBatches______(const std::optional<std::function<void(const std::vector<std::string>& /* resultBatches */)>>& optional) noexcept {
199
- return *optional;
199
+ return optional.value();
200
200
  }
201
201
 
202
202
  // pragma MARK: std::function<void(double /* timeLeftMs */)>
@@ -233,7 +233,7 @@ namespace margelo::nitro::nitrospeech::bridge::swift {
233
233
  return optional.has_value();
234
234
  }
235
235
  inline std::function<void(double /* timeLeftMs */)> get_std__optional_std__function_void_double____timeLeftMs______(const std::optional<std::function<void(double /* timeLeftMs */)>>& optional) noexcept {
236
- return *optional;
236
+ return optional.value();
237
237
  }
238
238
 
239
239
  // pragma MARK: std::function<void(const std::string& /* message */)>
@@ -270,7 +270,7 @@ namespace margelo::nitro::nitrospeech::bridge::swift {
270
270
  return optional.has_value();
271
271
  }
272
272
  inline std::function<void(const std::string& /* message */)> get_std__optional_std__function_void_const_std__string_____message______(const std::optional<std::function<void(const std::string& /* message */)>>& optional) noexcept {
273
- return *optional;
273
+ return optional.value();
274
274
  }
275
275
 
276
276
  // pragma MARK: std::optional<std::function<void(double /* normVolume */)>>
@@ -285,7 +285,7 @@ namespace margelo::nitro::nitrospeech::bridge::swift {
285
285
  return optional.has_value();
286
286
  }
287
287
  inline std::function<void(double /* normVolume */)> get_std__optional_std__function_void_double____normVolume______(const std::optional<std::function<void(double /* normVolume */)>>& optional) noexcept {
288
- return *optional;
288
+ return optional.value();
289
289
  }
290
290
 
291
291
  // pragma MARK: std::shared_ptr<HybridRecognizerSpec>
@@ -2,7 +2,7 @@
2
2
  /// NitroSpeech-Swift-Cxx-Umbrella.hpp
3
3
  /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
4
  /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2026 Marc Rousavy @ Margelo
5
+ /// Copyright © Marc Rousavy @ Margelo
6
6
  ///
7
7
 
8
8
  #pragma once
@@ -2,7 +2,7 @@
2
2
  /// NitroSpeechAutolinking.mm
3
3
  /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
4
  /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2026 Marc Rousavy @ Margelo
5
+ /// Copyright © Marc Rousavy @ Margelo
6
6
  ///
7
7
 
8
8
  #import <Foundation/Foundation.h>
@@ -2,19 +2,16 @@
2
2
  /// NitroSpeechAutolinking.swift
3
3
  /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
4
  /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2026 Marc Rousavy @ Margelo
5
+ /// Copyright © Marc Rousavy @ Margelo
6
6
  ///
7
7
 
8
+ import NitroModules
9
+
10
+ // TODO: Use empty enums once Swift supports exporting them as namespaces
11
+ // See: https://github.com/swiftlang/swift/pull/83616
8
12
  public final class NitroSpeechAutolinking {
9
13
  public typealias bridge = margelo.nitro.nitrospeech.bridge.swift
10
14
 
11
- /**
12
- * Creates an instance of a Swift class that implements `HybridNitroSpeechSpec`,
13
- * and wraps it in a Swift class that can directly interop with C++ (`HybridNitroSpeechSpec_cxx`)
14
- *
15
- * This is generated by Nitrogen and will initialize the class specified
16
- * in the `"autolinking"` property of `nitro.json` (in this case, `HybridNitroSpeech`).
17
- */
18
15
  public static func createNitroSpeech() -> bridge.std__shared_ptr_HybridNitroSpeechSpec_ {
19
16
  let hybridObject = HybridNitroSpeech()
20
17
  return { () -> bridge.std__shared_ptr_HybridNitroSpeechSpec_ in
@@ -22,4 +19,8 @@ public final class NitroSpeechAutolinking {
22
19
  return __cxxWrapped.getCxxPart()
23
20
  }()
24
21
  }
22
+
23
+ public static func isNitroSpeechRecyclable() -> Bool {
24
+ return HybridNitroSpeech.self is any RecyclableView.Type
25
+ }
25
26
  }
@@ -2,7 +2,7 @@
2
2
  /// HybridNitroSpeechSpecSwift.cpp
3
3
  /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
4
  /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2026 Marc Rousavy @ Margelo
5
+ /// Copyright © Marc Rousavy @ Margelo
6
6
  ///
7
7
 
8
8
  #include "HybridNitroSpeechSpecSwift.hpp"
@@ -2,7 +2,7 @@
2
2
  /// HybridNitroSpeechSpecSwift.hpp
3
3
  /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
4
  /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2026 Marc Rousavy @ Margelo
5
+ /// Copyright © Marc Rousavy @ Margelo
6
6
  ///
7
7
 
8
8
  #pragma once
@@ -49,6 +49,12 @@ namespace margelo::nitro::nitrospeech {
49
49
  inline size_t getExternalMemorySize() noexcept override {
50
50
  return _swiftPart.getMemorySize();
51
51
  }
52
+ bool equals(const std::shared_ptr<HybridObject>& other) override {
53
+ if (auto otherCast = std::dynamic_pointer_cast<HybridNitroSpeechSpecSwift>(other)) {
54
+ return _swiftPart.equals(otherCast->_swiftPart);
55
+ }
56
+ return false;
57
+ }
52
58
  void dispose() noexcept override {
53
59
  _swiftPart.dispose();
54
60
  }
@@ -2,7 +2,7 @@
2
2
  /// HybridRecognizerSpecSwift.cpp
3
3
  /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
4
  /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2026 Marc Rousavy @ Margelo
5
+ /// Copyright © Marc Rousavy @ Margelo
6
6
  ///
7
7
 
8
8
  #include "HybridRecognizerSpecSwift.hpp"
@@ -2,7 +2,7 @@
2
2
  /// HybridRecognizerSpecSwift.hpp
3
3
  /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
4
  /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2026 Marc Rousavy @ Margelo
5
+ /// Copyright © Marc Rousavy @ Margelo
6
6
  ///
7
7
 
8
8
  #pragma once
@@ -55,6 +55,12 @@ namespace margelo::nitro::nitrospeech {
55
55
  inline size_t getExternalMemorySize() noexcept override {
56
56
  return _swiftPart.getMemorySize();
57
57
  }
58
+ bool equals(const std::shared_ptr<HybridObject>& other) override {
59
+ if (auto otherCast = std::dynamic_pointer_cast<HybridRecognizerSpecSwift>(other)) {
60
+ return _swiftPart.equals(otherCast->_swiftPart);
61
+ }
62
+ return false;
63
+ }
58
64
  void dispose() noexcept override {
59
65
  _swiftPart.dispose();
60
66
  }
@@ -2,10 +2,9 @@
2
2
  /// Func_void.swift
3
3
  /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
4
  /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2026 Marc Rousavy @ Margelo
5
+ /// Copyright © Marc Rousavy @ Margelo
6
6
  ///
7
7
 
8
- import Foundation
9
8
  import NitroModules
10
9
 
11
10
  /**
@@ -2,10 +2,9 @@
2
2
  /// Func_void_double.swift
3
3
  /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
4
  /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2026 Marc Rousavy @ Margelo
5
+ /// Copyright © Marc Rousavy @ Margelo
6
6
  ///
7
7
 
8
- import Foundation
9
8
  import NitroModules
10
9
 
11
10
  /**
@@ -2,10 +2,9 @@
2
2
  /// Func_void_std__string.swift
3
3
  /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
4
  /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2026 Marc Rousavy @ Margelo
5
+ /// Copyright © Marc Rousavy @ Margelo
6
6
  ///
7
7
 
8
- import Foundation
9
8
  import NitroModules
10
9
 
11
10
  /**
@@ -2,10 +2,9 @@
2
2
  /// Func_void_std__vector_std__string_.swift
3
3
  /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
4
  /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2026 Marc Rousavy @ Margelo
5
+ /// Copyright © Marc Rousavy @ Margelo
6
6
  ///
7
7
 
8
- import Foundation
9
8
  import NitroModules
10
9
 
11
10
  /**
@@ -2,7 +2,7 @@
2
2
  /// HapticFeedbackStyle.swift
3
3
  /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
4
  /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2026 Marc Rousavy @ Margelo
5
+ /// Copyright © Marc Rousavy @ Margelo
6
6
  ///
7
7
 
8
8
  /**
@@ -2,10 +2,9 @@
2
2
  /// HybridNitroSpeechSpec.swift
3
3
  /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
4
  /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2026 Marc Rousavy @ Margelo
5
+ /// Copyright © Marc Rousavy @ Margelo
6
6
  ///
7
7
 
8
- import Foundation
9
8
  import NitroModules
10
9
 
11
10
  /// See ``HybridNitroSpeechSpec``
@@ -30,14 +29,14 @@ open class HybridNitroSpeechSpec_base {
30
29
  public init() { }
31
30
  public func getCxxWrapper() -> HybridNitroSpeechSpec_cxx {
32
31
  #if DEBUG
33
- guard self is HybridNitroSpeechSpec else {
32
+ guard self is any HybridNitroSpeechSpec else {
34
33
  fatalError("`self` is not a `HybridNitroSpeechSpec`! Did you accidentally inherit from `HybridNitroSpeechSpec_base` instead of `HybridNitroSpeechSpec`?")
35
34
  }
36
35
  #endif
37
36
  if let cxxWrapper = self.cxxWrapper {
38
37
  return cxxWrapper
39
38
  } else {
40
- let cxxWrapper = HybridNitroSpeechSpec_cxx(self as! HybridNitroSpeechSpec)
39
+ let cxxWrapper = HybridNitroSpeechSpec_cxx(self as! any HybridNitroSpeechSpec)
41
40
  self.cxxWrapper = cxxWrapper
42
41
  return cxxWrapper
43
42
  }
@@ -2,10 +2,9 @@
2
2
  /// HybridNitroSpeechSpec_cxx.swift
3
3
  /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
4
  /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2026 Marc Rousavy @ Margelo
5
+ /// Copyright © Marc Rousavy @ Margelo
6
6
  ///
7
7
 
8
- import Foundation
9
8
  import NitroModules
10
9
 
11
10
  /**
@@ -96,6 +95,14 @@ open class HybridNitroSpeechSpec_cxx {
96
95
  return MemoryHelper.getSizeOf(self.__implementation) + self.__implementation.memorySize
97
96
  }
98
97
 
98
+ /**
99
+ * Compares this object with the given [other] object for reference equality.
100
+ */
101
+ @inline(__always)
102
+ public func equals(other: HybridNitroSpeechSpec_cxx) -> Bool {
103
+ return self.__implementation === other.__implementation
104
+ }
105
+
99
106
  /**
100
107
  * Call dispose() on the Swift class.
101
108
  * This _may_ be called manually from JS.
@@ -124,7 +131,7 @@ open class HybridNitroSpeechSpec_cxx {
124
131
  }
125
132
  @inline(__always)
126
133
  set {
127
- self.__implementation.recognizer = { () -> HybridRecognizerSpec in
134
+ self.__implementation.recognizer = { () -> any HybridRecognizerSpec in
128
135
  let __unsafePointer = bridge.get_std__shared_ptr_HybridRecognizerSpec_(newValue)
129
136
  let __instance = HybridRecognizerSpec_cxx.fromUnsafe(__unsafePointer)
130
137
  return __instance.getHybridRecognizerSpec()
@@ -2,10 +2,9 @@
2
2
  /// HybridRecognizerSpec.swift
3
3
  /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
4
  /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2026 Marc Rousavy @ Margelo
5
+ /// Copyright © Marc Rousavy @ Margelo
6
6
  ///
7
7
 
8
- import Foundation
9
8
  import NitroModules
10
9
 
11
10
  /// See ``HybridRecognizerSpec``
@@ -40,14 +39,14 @@ open class HybridRecognizerSpec_base {
40
39
  public init() { }
41
40
  public func getCxxWrapper() -> HybridRecognizerSpec_cxx {
42
41
  #if DEBUG
43
- guard self is HybridRecognizerSpec else {
42
+ guard self is any HybridRecognizerSpec else {
44
43
  fatalError("`self` is not a `HybridRecognizerSpec`! Did you accidentally inherit from `HybridRecognizerSpec_base` instead of `HybridRecognizerSpec`?")
45
44
  }
46
45
  #endif
47
46
  if let cxxWrapper = self.cxxWrapper {
48
47
  return cxxWrapper
49
48
  } else {
50
- let cxxWrapper = HybridRecognizerSpec_cxx(self as! HybridRecognizerSpec)
49
+ let cxxWrapper = HybridRecognizerSpec_cxx(self as! any HybridRecognizerSpec)
51
50
  self.cxxWrapper = cxxWrapper
52
51
  return cxxWrapper
53
52
  }
@@ -2,10 +2,9 @@
2
2
  /// HybridRecognizerSpec_cxx.swift
3
3
  /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
4
  /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2026 Marc Rousavy @ Margelo
5
+ /// Copyright © Marc Rousavy @ Margelo
6
6
  ///
7
7
 
8
- import Foundation
9
8
  import NitroModules
10
9
 
11
10
  /**
@@ -96,6 +95,14 @@ open class HybridRecognizerSpec_cxx {
96
95
  return MemoryHelper.getSizeOf(self.__implementation) + self.__implementation.memorySize
97
96
  }
98
97
 
98
+ /**
99
+ * Compares this object with the given [other] object for reference equality.
100
+ */
101
+ @inline(__always)
102
+ public func equals(other: HybridRecognizerSpec_cxx) -> Bool {
103
+ return self.__implementation === other.__implementation
104
+ }
105
+
99
106
  /**
100
107
  * Call dispose() on the Swift class.
101
108
  * This _may_ be called manually from JS.
@@ -370,7 +377,14 @@ open class HybridRecognizerSpec_cxx {
370
377
  @inline(__always)
371
378
  public final func addAutoFinishTime(additionalTimeMs: bridge.std__optional_double_) -> bridge.Result_void_ {
372
379
  do {
373
- try self.__implementation.addAutoFinishTime(additionalTimeMs: additionalTimeMs.value)
380
+ try self.__implementation.addAutoFinishTime(additionalTimeMs: { () -> Double? in
381
+ if bridge.has_value_std__optional_double_(additionalTimeMs) {
382
+ let __unwrapped = bridge.get_std__optional_double_(additionalTimeMs)
383
+ return __unwrapped
384
+ } else {
385
+ return nil
386
+ }
387
+ }())
374
388
  return bridge.create_Result_void_()
375
389
  } catch (let __error) {
376
390
  let __exceptionPtr = __error.toCpp()