@ohm_studio/sdk-react-native 0.3.0 → 0.5.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/dist/bare-recorder.d.ts +96 -0
- package/dist/bare-recorder.d.ts.map +1 -0
- package/dist/bare-recorder.js +242 -0
- package/dist/bare-recorder.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +8 -4
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bare React Native recorder — adapter around `react-native-audio-recorder-player`.
|
|
3
|
+
*
|
|
4
|
+
* Mirrors `ExpoRecorder`'s lifecycle (state machine, typed errors, level
|
|
5
|
+
* metering, max-duration cap) so apps can switch between Expo and bare
|
|
6
|
+
* RN without touching their UI code. Also mirrors the same `RNFile`
|
|
7
|
+
* shape so `ohm.audio.extract({ file })` works identically.
|
|
8
|
+
*
|
|
9
|
+
* import AudioRecorderPlayer from "react-native-audio-recorder-player";
|
|
10
|
+
* import { BareRecorder } from "@ohm_studio/sdk-react-native";
|
|
11
|
+
*
|
|
12
|
+
* const rec = new BareRecorder(AudioRecorderPlayer);
|
|
13
|
+
* await rec.start();
|
|
14
|
+
* const file = await rec.stop();
|
|
15
|
+
* const { data } = await ohm.audio.extract({ apiSlug, file });
|
|
16
|
+
*
|
|
17
|
+
* We don't take a hard dependency on the underlying lib — pass either
|
|
18
|
+
* the class itself OR an existing instance.
|
|
19
|
+
*/
|
|
20
|
+
import { RecorderError, type RecorderState, type RNFile } from "./recorder";
|
|
21
|
+
interface ARPInstance {
|
|
22
|
+
startRecorder: (uri?: string, audioSet?: any, meteringEnabled?: boolean) => Promise<string>;
|
|
23
|
+
stopRecorder: () => Promise<string>;
|
|
24
|
+
pauseRecorder?: () => Promise<unknown>;
|
|
25
|
+
resumeRecorder?: () => Promise<unknown>;
|
|
26
|
+
addRecordBackListener?: (cb: (e: any) => void) => void;
|
|
27
|
+
removeRecordBackListener?: () => void;
|
|
28
|
+
setSubscriptionDuration?: (sec: number) => Promise<unknown>;
|
|
29
|
+
}
|
|
30
|
+
type ARPCtor = new () => ARPInstance;
|
|
31
|
+
export interface BareRecorderOptions {
|
|
32
|
+
/** File URI to record into. If omitted, the lib picks a default. */
|
|
33
|
+
uri?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Native `audioSet` passed to `startRecorder`. If omitted, a clinical
|
|
36
|
+
* preset is built (16 kHz mono AAC at 32 kbps).
|
|
37
|
+
*/
|
|
38
|
+
audioSet?: any;
|
|
39
|
+
/** Mime type tag attached to the file shape — default `audio/mp4`. */
|
|
40
|
+
mimeType?: string;
|
|
41
|
+
/** Filename tag attached to the file shape — default `rec.m4a`. */
|
|
42
|
+
fileName?: string;
|
|
43
|
+
/** Hard cap — auto-stop after this many ms. Default off. */
|
|
44
|
+
maxDurationMs?: number;
|
|
45
|
+
/**
|
|
46
|
+
* Auto-stop after `ms` of sustained metering below `thresholdDb`.
|
|
47
|
+
* dBFS in the same scale as Expo's metering.
|
|
48
|
+
*/
|
|
49
|
+
silenceAutoStop?: {
|
|
50
|
+
ms?: number;
|
|
51
|
+
thresholdDb?: number;
|
|
52
|
+
};
|
|
53
|
+
/** Periodic linear level 0–1, derived from the lib's metering callback. */
|
|
54
|
+
onLevel?: (linearLevel: number) => void;
|
|
55
|
+
/** Recorder state changes. */
|
|
56
|
+
onStateChange?: (state: RecorderState) => void;
|
|
57
|
+
/** All errors flow through here in addition to the awaited rejection. */
|
|
58
|
+
onError?: (err: RecorderError) => void;
|
|
59
|
+
/** Per-tick status from the recorder back-listener. */
|
|
60
|
+
onStatus?: (s: {
|
|
61
|
+
durationMillis: number;
|
|
62
|
+
metering?: number;
|
|
63
|
+
}) => void;
|
|
64
|
+
}
|
|
65
|
+
export declare class BareRecorder {
|
|
66
|
+
private arp;
|
|
67
|
+
private opts;
|
|
68
|
+
private state;
|
|
69
|
+
private uri;
|
|
70
|
+
private startedAt;
|
|
71
|
+
private pausedAccumMs;
|
|
72
|
+
private pauseStartedAt;
|
|
73
|
+
private durationMs;
|
|
74
|
+
private silenceSinceMs;
|
|
75
|
+
private maxStopTimer;
|
|
76
|
+
/**
|
|
77
|
+
* @param libOrInstance Pass `AudioRecorderPlayer` (the class) or an
|
|
78
|
+
* existing `new AudioRecorderPlayer()` instance. We use one
|
|
79
|
+
* instance per recorder.
|
|
80
|
+
*/
|
|
81
|
+
constructor(libOrInstance: ARPCtor | ARPInstance, opts?: BareRecorderOptions);
|
|
82
|
+
get currentState(): RecorderState;
|
|
83
|
+
getDuration(): number;
|
|
84
|
+
start(): Promise<void>;
|
|
85
|
+
pause(): Promise<void>;
|
|
86
|
+
resume(): Promise<void>;
|
|
87
|
+
stop(): Promise<RNFile>;
|
|
88
|
+
cancel(): Promise<void>;
|
|
89
|
+
private onTick;
|
|
90
|
+
private cleanupListeners;
|
|
91
|
+
private cleanup;
|
|
92
|
+
private setState;
|
|
93
|
+
private fail;
|
|
94
|
+
}
|
|
95
|
+
export {};
|
|
96
|
+
//# sourceMappingURL=bare-recorder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bare-recorder.d.ts","sourceRoot":"","sources":["../src/bare-recorder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EACL,aAAa,EACb,KAAK,aAAa,EAElB,KAAK,MAAM,EACZ,MAAM,YAAY,CAAC;AAEpB,UAAU,WAAW;IACnB,aAAa,EAAE,CAAC,GAAG,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,GAAG,EAAE,eAAe,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IAC5F,YAAY,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC;IACpC,aAAa,CAAC,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;IACvC,cAAc,CAA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K,CAAyB;IACtC,OAAO,CAAC,GAAG,CAAuB;IAClC,OAAO,CAAC,SAAS,CAAK;IACtB,OAAO,CAAC,aAAa,CAAK;IAC1B,OAAO,CAAC,cAAc,CAAK;IAC3B,OAAO,CAAC,UAAU,CAAK;IACvB,OAAO,CAAC,cAAc,CAAK;IAC3B,OAAO,CAAC,YAAY,CAA8C;IAElE;;;;OAIG;gBAED,aAAa,EAAE,OAAO,GAAG,WAAW,EACpC,IAAI,GAAE,mBAAwB;IAShC,IAAI,YAAY,IAAI,aAAa,CAEhC;IAED,WAAW,IAAI,MAAM;IAQf,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAiDtB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAetB,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAevB,IAAI,IAAI,OAAO,CAAC,MAAM,CAAC;IA4BvB,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAa7B,OAAO,CAAC,MAAM;IA8Bd,OAAO,CAAC,gBAAgB;IAUxB,OAAO,CAAC,OAAO;IAef,OAAO,CAAC,QAAQ;IAMhB,OAAO,CAAC,IAAI;CASb"}
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bare React Native recorder — adapter around `react-native-audio-recorder-player`.
|
|
3
|
+
*
|
|
4
|
+
* Mirrors `ExpoRecorder`'s lifecycle (state machine, typed errors, level
|
|
5
|
+
* metering, max-duration cap) so apps can switch between Expo and bare
|
|
6
|
+
* RN without touching their UI code. Also mirrors the same `RNFile`
|
|
7
|
+
* shape so `ohm.audio.extract({ file })` works identically.
|
|
8
|
+
*
|
|
9
|
+
* import AudioRecorderPlayer from "react-native-audio-recorder-player";
|
|
10
|
+
* import { BareRecorder } from "@ohm_studio/sdk-react-native";
|
|
11
|
+
*
|
|
12
|
+
* const rec = new BareRecorder(AudioRecorderPlayer);
|
|
13
|
+
* await rec.start();
|
|
14
|
+
* const file = await rec.stop();
|
|
15
|
+
* const { data } = await ohm.audio.extract({ apiSlug, file });
|
|
16
|
+
*
|
|
17
|
+
* We don't take a hard dependency on the underlying lib — pass either
|
|
18
|
+
* the class itself OR an existing instance.
|
|
19
|
+
*/
|
|
20
|
+
import { RecorderError, } from "./recorder";
|
|
21
|
+
const CLINICAL_AUDIO_SET = {
|
|
22
|
+
// iOS
|
|
23
|
+
AVSampleRateKeyIOS: 16_000,
|
|
24
|
+
AVNumberOfChannelsKeyIOS: 1,
|
|
25
|
+
AVEncoderAudioQualityKeyIOS: "medium",
|
|
26
|
+
AVFormatIDKeyIOS: "aac",
|
|
27
|
+
// Android
|
|
28
|
+
AudioEncoderAndroid: 3, // AAC
|
|
29
|
+
AudioSourceAndroid: 6, // VOICE_RECOGNITION — boosts speech, attenuates noise
|
|
30
|
+
OutputFormatAndroid: 2, // MPEG_4
|
|
31
|
+
AudioSamplingRateAndroid: 16_000,
|
|
32
|
+
AudioChannelsAndroid: 1,
|
|
33
|
+
AudioEncodingBitRateAndroid: 32_000,
|
|
34
|
+
};
|
|
35
|
+
function dbToLinear(db, floorDb = -50) {
|
|
36
|
+
if (!Number.isFinite(db))
|
|
37
|
+
return 0;
|
|
38
|
+
if (db <= floorDb)
|
|
39
|
+
return 0;
|
|
40
|
+
if (db >= 0)
|
|
41
|
+
return 1;
|
|
42
|
+
return (db - floorDb) / -floorDb;
|
|
43
|
+
}
|
|
44
|
+
export class BareRecorder {
|
|
45
|
+
arp;
|
|
46
|
+
opts;
|
|
47
|
+
state = "idle";
|
|
48
|
+
uri = null;
|
|
49
|
+
startedAt = 0;
|
|
50
|
+
pausedAccumMs = 0;
|
|
51
|
+
pauseStartedAt = 0;
|
|
52
|
+
durationMs = 0;
|
|
53
|
+
silenceSinceMs = 0;
|
|
54
|
+
maxStopTimer = null;
|
|
55
|
+
/**
|
|
56
|
+
* @param libOrInstance Pass `AudioRecorderPlayer` (the class) or an
|
|
57
|
+
* existing `new AudioRecorderPlayer()` instance. We use one
|
|
58
|
+
* instance per recorder.
|
|
59
|
+
*/
|
|
60
|
+
constructor(libOrInstance, opts = {}) {
|
|
61
|
+
this.arp =
|
|
62
|
+
typeof libOrInstance === "function"
|
|
63
|
+
? new libOrInstance()
|
|
64
|
+
: libOrInstance;
|
|
65
|
+
this.opts = opts;
|
|
66
|
+
}
|
|
67
|
+
get currentState() {
|
|
68
|
+
return this.state;
|
|
69
|
+
}
|
|
70
|
+
getDuration() {
|
|
71
|
+
if (this.state === "idle")
|
|
72
|
+
return 0;
|
|
73
|
+
if (this.state === "paused") {
|
|
74
|
+
return this.pauseStartedAt - this.startedAt - this.pausedAccumMs;
|
|
75
|
+
}
|
|
76
|
+
return Date.now() - this.startedAt - this.pausedAccumMs;
|
|
77
|
+
}
|
|
78
|
+
async start() {
|
|
79
|
+
if (this.state !== "idle") {
|
|
80
|
+
throw this.fail("InvalidState", `Cannot start while "${this.state}".`);
|
|
81
|
+
}
|
|
82
|
+
this.setState("starting");
|
|
83
|
+
if (typeof this.arp.setSubscriptionDuration === "function") {
|
|
84
|
+
try {
|
|
85
|
+
await this.arp.setSubscriptionDuration(0.1); // 100 ms metering ticks
|
|
86
|
+
}
|
|
87
|
+
catch {
|
|
88
|
+
/* best-effort */
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
if (typeof this.arp.addRecordBackListener === "function") {
|
|
92
|
+
this.arp.addRecordBackListener((e) => this.onTick(e));
|
|
93
|
+
}
|
|
94
|
+
try {
|
|
95
|
+
this.uri = await this.arp.startRecorder(this.opts.uri, this.opts.audioSet ?? CLINICAL_AUDIO_SET, true);
|
|
96
|
+
}
|
|
97
|
+
catch (e) {
|
|
98
|
+
this.cleanupListeners();
|
|
99
|
+
this.setState("idle");
|
|
100
|
+
throw this.fail("Unknown", "Could not start recording: " + (e?.message || ""), e);
|
|
101
|
+
}
|
|
102
|
+
this.startedAt = Date.now();
|
|
103
|
+
this.pausedAccumMs = 0;
|
|
104
|
+
this.silenceSinceMs = 0;
|
|
105
|
+
this.durationMs = 0;
|
|
106
|
+
this.setState("recording");
|
|
107
|
+
if (this.opts.maxDurationMs && this.opts.maxDurationMs > 0) {
|
|
108
|
+
this.maxStopTimer = setTimeout(() => {
|
|
109
|
+
this.stop().catch(() => {
|
|
110
|
+
/* swallow */
|
|
111
|
+
});
|
|
112
|
+
}, this.opts.maxDurationMs);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
async pause() {
|
|
116
|
+
if (this.state !== "recording") {
|
|
117
|
+
throw this.fail("InvalidState", `Cannot pause while "${this.state}".`);
|
|
118
|
+
}
|
|
119
|
+
if (typeof this.arp.pauseRecorder !== "function") {
|
|
120
|
+
throw this.fail("NotSupported", "This native module doesn't support pause().");
|
|
121
|
+
}
|
|
122
|
+
await this.arp.pauseRecorder();
|
|
123
|
+
this.pauseStartedAt = Date.now();
|
|
124
|
+
this.setState("paused");
|
|
125
|
+
}
|
|
126
|
+
async resume() {
|
|
127
|
+
if (this.state !== "paused") {
|
|
128
|
+
throw this.fail("InvalidState", `Cannot resume while "${this.state}".`);
|
|
129
|
+
}
|
|
130
|
+
if (typeof this.arp.resumeRecorder !== "function") {
|
|
131
|
+
throw this.fail("NotSupported", "This native module doesn't support resume().");
|
|
132
|
+
}
|
|
133
|
+
this.pausedAccumMs += Date.now() - this.pauseStartedAt;
|
|
134
|
+
await this.arp.resumeRecorder();
|
|
135
|
+
this.setState("recording");
|
|
136
|
+
}
|
|
137
|
+
async stop() {
|
|
138
|
+
if (this.state !== "recording" && this.state !== "paused") {
|
|
139
|
+
throw this.fail("InvalidState", `Cannot stop while "${this.state}".`);
|
|
140
|
+
}
|
|
141
|
+
this.setState("stopping");
|
|
142
|
+
let finalUri;
|
|
143
|
+
try {
|
|
144
|
+
finalUri = await this.arp.stopRecorder();
|
|
145
|
+
}
|
|
146
|
+
catch (e) {
|
|
147
|
+
this.cleanup();
|
|
148
|
+
throw this.fail("Unknown", "Could not stop recording: " + (e?.message || ""), e);
|
|
149
|
+
}
|
|
150
|
+
const uri = finalUri || this.uri || "";
|
|
151
|
+
this.cleanup();
|
|
152
|
+
if (!uri) {
|
|
153
|
+
throw this.fail("Unknown", "Recording produced no file URI");
|
|
154
|
+
}
|
|
155
|
+
return {
|
|
156
|
+
uri,
|
|
157
|
+
name: this.opts.fileName ?? "rec.m4a",
|
|
158
|
+
type: this.opts.mimeType ?? "audio/mp4",
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
async cancel() {
|
|
162
|
+
if (this.state === "recording" || this.state === "paused") {
|
|
163
|
+
try {
|
|
164
|
+
await this.arp.stopRecorder();
|
|
165
|
+
}
|
|
166
|
+
catch {
|
|
167
|
+
/* ignore */
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
this.cleanup();
|
|
171
|
+
}
|
|
172
|
+
// ─── internals ─────────────────────────────────────────────────────
|
|
173
|
+
onTick(e) {
|
|
174
|
+
if (!e)
|
|
175
|
+
return;
|
|
176
|
+
const dur = Number(e.currentPosition ?? e.current_position ?? 0);
|
|
177
|
+
if (Number.isFinite(dur))
|
|
178
|
+
this.durationMs = dur;
|
|
179
|
+
const meter = Number(e.currentMetering ?? e.current_metering ?? NaN);
|
|
180
|
+
if (Number.isFinite(meter)) {
|
|
181
|
+
const linear = dbToLinear(meter);
|
|
182
|
+
this.opts.onLevel?.(linear);
|
|
183
|
+
if (this.opts.silenceAutoStop && this.state === "recording") {
|
|
184
|
+
const silenceMs = this.opts.silenceAutoStop.ms ?? 6000;
|
|
185
|
+
const thresholdDb = this.opts.silenceAutoStop.thresholdDb ?? -40;
|
|
186
|
+
if (meter < thresholdDb) {
|
|
187
|
+
if (this.silenceSinceMs === 0)
|
|
188
|
+
this.silenceSinceMs = Date.now();
|
|
189
|
+
else if (Date.now() - this.silenceSinceMs >= silenceMs) {
|
|
190
|
+
this.silenceSinceMs = 0;
|
|
191
|
+
this.stop().catch(() => {
|
|
192
|
+
/* swallow */
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
else {
|
|
197
|
+
this.silenceSinceMs = 0;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
this.opts.onStatus?.({
|
|
202
|
+
durationMillis: this.durationMs,
|
|
203
|
+
metering: Number.isFinite(meter) ? meter : undefined,
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
cleanupListeners() {
|
|
207
|
+
if (typeof this.arp.removeRecordBackListener === "function") {
|
|
208
|
+
try {
|
|
209
|
+
this.arp.removeRecordBackListener();
|
|
210
|
+
}
|
|
211
|
+
catch {
|
|
212
|
+
/* ignore */
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
cleanup() {
|
|
217
|
+
if (this.maxStopTimer) {
|
|
218
|
+
clearTimeout(this.maxStopTimer);
|
|
219
|
+
this.maxStopTimer = null;
|
|
220
|
+
}
|
|
221
|
+
this.cleanupListeners();
|
|
222
|
+
this.uri = null;
|
|
223
|
+
this.durationMs = 0;
|
|
224
|
+
this.silenceSinceMs = 0;
|
|
225
|
+
this.startedAt = 0;
|
|
226
|
+
this.pausedAccumMs = 0;
|
|
227
|
+
this.pauseStartedAt = 0;
|
|
228
|
+
this.setState("idle");
|
|
229
|
+
}
|
|
230
|
+
setState(next) {
|
|
231
|
+
if (this.state === next)
|
|
232
|
+
return;
|
|
233
|
+
this.state = next;
|
|
234
|
+
this.opts.onStateChange?.(next);
|
|
235
|
+
}
|
|
236
|
+
fail(code, message, cause) {
|
|
237
|
+
const err = new RecorderError(code, message, cause);
|
|
238
|
+
this.opts.onError?.(err);
|
|
239
|
+
return err;
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
//# sourceMappingURL=bare-recorder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bare-recorder.js","sourceRoot":"","sources":["../src/bare-recorder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EACL,aAAa,GAId,MAAM,YAAY,CA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,MAAM,CAAC;gBACP,YAAY;YACd,CAAC;QACH,CAAC;IACH,CAAC;IAEO,OAAO;QACb,IAAI,IAAI,CAAC,YAAY,EAAE,CAAC;YACtB,YAAY,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;YAChC,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;QAC3B,CAAC;QACD,IAAI,CAAC,gBAAgB,EAAE,CAAC;QACxB,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC;QAChB,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC;QACpB,IAAI,CAAC,cAAc,GAAG,CAAC,CAAC;QACxB,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC;QACnB,IAAI,CAAC,aAAa,GAAG,CAAC,CAAC;QACvB,IAAI,CAAC,cAAc,GAAG,CAAC,CAAC;QACxB,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IACxB,CAAC;IAEO,QAAQ,CAAC,IAAmB;QAClC,IAAI,IAAI,CAAC,KAAK,KAAK,IAAI;YAAE,OAAO;QAChC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAClB,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC,IAAI,CAAC,CAAC;IAClC,CAAC;IAEO,IAAI,CACV,IAAuB,EACvB,OAAe,EACf,KAAe;QAEf,MAAM,GAAG,GAAG,IAAI,aAAa,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;QACpD,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,GAAG,CAAC,CAAC;QACzB,OAAO,GAAG,CAAC;IACb,CAAC;CACF"}
|
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,8 @@ import type { OHMInit } from "@ohm_studio/sdk-core";
|
|
|
3
3
|
export * from "@ohm_studio/sdk-core";
|
|
4
4
|
export { ExpoRecorder, RecorderError, isExpoAvAvailable, } from "./recorder";
|
|
5
5
|
export type { ExpoRecorderOptions, RNFile, RecorderState, RecorderErrorCode, } from "./recorder";
|
|
6
|
+
export { BareRecorder } from "./bare-recorder";
|
|
7
|
+
export type { BareRecorderOptions } from "./bare-recorder";
|
|
6
8
|
/**
|
|
7
9
|
* OHM Studio SDK for React Native.
|
|
8
10
|
*
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,KAAK,EAAoB,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAEtE,cAAc,sBAAsB,CAAC;AACrC,OAAO,EACL,YAAY,EACZ,aAAa,EACb,iBAAiB,GAClB,MAAM,YAAY,CAAC;AACpB,YAAY,EACV,mBAAmB,EACnB,MAAM,EACN,aAAa,EACb,iBAAiB,GAClB,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,KAAK,EAAoB,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAEtE,cAAc,sBAAsB,CAAC;AACrC,OAAO,EACL,YAAY,EACZ,aAAa,EACb,iBAAiB,GAClB,MAAM,YAAY,CAAC;AACpB,YAAY,EACV,mBAAmB,EACnB,MAAM,EACN,aAAa,EACb,iBAAiB,GAClB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,YAAY,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAY3D;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,qBAAa,GAAI,SAAQ,aAAa;gBACxB,IAAI,EAAE,OAAO;cAiBT,YAAY,CAAC,CAAC,EAAE,IAAI,EAAE;QACpC,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,GAAG,CAAC;QACV,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;KACjC,GAAG,OAAO,CAAC,CAAC,CAAC;cAQE,kBAAkB,CAChC,IAAI,EAAE,OAAO,EACb,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC9B,OAAO,CAAC,OAAO,CAAC;CAuBpB;AAED,eAAe,GAAG,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { OHMConfigError, OHMCoreClient } from "@ohm_studio/sdk-core";
|
|
2
2
|
export * from "@ohm_studio/sdk-core";
|
|
3
3
|
export { ExpoRecorder, RecorderError, isExpoAvAvailable, } from "./recorder";
|
|
4
|
+
export { BareRecorder } from "./bare-recorder";
|
|
4
5
|
/** Detect React Native runtime — used to gate the bundled-key safeguard. */
|
|
5
6
|
function isReactNative() {
|
|
6
7
|
return (
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAGrE,cAAc,sBAAsB,CAAC;AACrC,OAAO,EACL,YAAY,EACZ,aAAa,EACb,iBAAiB,GAClB,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAGrE,cAAc,sBAAsB,CAAC;AACrC,OAAO,EACL,YAAY,EACZ,aAAa,EACb,iBAAiB,GAClB,MAAM,YAAY,CAAC;AAOpB,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAG/C,4EAA4E;AAC5E,SAAS,aAAa;IACpB,OAAO;IACL,+BAA+B;IAC/B,OAAO,SAAS,KAAK,WAAW;QAChC,a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AC3B,IAAI,EAAE,CAAC,CAAC,IAAI,IAAI,WAAW;aAC5B,CAAC,CAAC;QACL,CAAC;aAAM,IAAI,OAAO,IAAI,KAAK,WAAW,IAAI,IAAI,YAAY,IAAI,EAAE,CAAC;YAC/D,EAAE,CAAC,MAAM,CAAC,MAAM,EAAE,IAAW,EAAE,WAAW,CAAC,CAAC;QAC9C,CAAC;aAAM,CAAC;YACN,MAAM,IAAI,KAAK,CACb,qEAAqE,CACtE,CAAC;QACJ,CAAC;QACD,KAAK,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,IAAI,EAAE,CAAC,EAAE,CAAC;YAClD,EAAE,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QAClB,CAAC;QACD,OAAO,EAAE,CAAC;IACZ,CAAC;CACF;AAED,eAAe,GAAG,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ohm_studio/sdk-react-native",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "OHM Studio SDK for React Native. Voice-to-structured-JSON clinical extraction APIs in your mobile app.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -39,8 +39,11 @@
|
|
|
39
39
|
"access": "public"
|
|
40
40
|
},
|
|
41
41
|
"scripts": {
|
|
42
|
-
"
|
|
43
|
-
"
|
|
42
|
+
"clean": "rm -rf dist",
|
|
43
|
+
"build": "rm -rf dist && tsc -p tsconfig.json",
|
|
44
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
45
|
+
"test": "vitest run",
|
|
46
|
+
"test:watch": "vitest"
|
|
44
47
|
},
|
|
45
48
|
"dependencies": {
|
|
46
49
|
"@ohm_studio/sdk-core": "workspace:*"
|
|
@@ -56,6 +59,7 @@
|
|
|
56
59
|
"devDependencies": {
|
|
57
60
|
"@types/react": "^18.3.23",
|
|
58
61
|
"react": "^18.3.1",
|
|
59
|
-
"typescript": "^5.8.3"
|
|
62
|
+
"typescript": "^5.8.3",
|
|
63
|
+
"vitest": "^4.1.5"
|
|
60
64
|
}
|
|
61
65
|
}
|