Add cloud voice model support for iOS

This commit is contained in:
James Babcock committed 2026-10-10 22:56:07 -07:00
1 parent 5df873e5b1
commit 920cce6a26
24 files changed
+518 -176

No files matched your search

+5
View File
@@ -2,6 +2,8 @@
/** On-device speech recognition fed by G2 BLE audio or the default phone microphone. */
@interface FaceclawSpeech : NSObject
@property(nonatomic, copy) void (^eventHandler)(NSString *json);
/** 16 kHz mono PCM16LE chunks from a PCM capture, on the main queue in capture order. */
@property(nonatomic, copy) void (^pcmHandler)(NSData *pcm);
+ (NSInteger)authorizationStatus;
+ (NSInteger)microphoneAuthorizationStatus;
+ (void)requestMicrophoneAuthorization:(void (^)(NSInteger status))completion;
@@ -9,6 +11,9 @@
/** Returns an actionable error, or an empty string when capture starts. */
- (NSString *)startWithEndpointing:(BOOL)endpointing;
- (NSString *)startPhoneWithEndpointing:(BOOL)endpointing;
/** Capture without the recognizer (for a cloud provider): audio goes to
* pcmHandler, and "ended" follows the last chunk. No transcript events. */
- (NSString *)startPcmCaptureWithEndpointing:(BOOL)endpointing phone:(BOOL)phone;
- (void)acceptPacket:(NSData *)packet;
- (void)finish;
- (void)cancel;