@rexai/pulse-react 1.0.1 → 1.1.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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @rexai/pulse-react
2
2
 
3
- React SDK for rPPG health analysis - measure heart rate, HRV, SpO2, and more from any camera using remote photoplethysmography.
3
+ React SDK for comprehensive health analysis - measure heart rate, HRV, SpO2, skin health, voice biomarkers, and eye health from any camera or microphone using AI-powered analysis.
4
4
 
5
5
  ## Installation
6
6
 
@@ -101,7 +101,7 @@ const client = new PulseClient({
101
101
  apiKey: 'pk_live_YOUR_API_KEY'
102
102
  });
103
103
 
104
- // Analyze a video blob
104
+ // Analyze a video blob for medical vitals
105
105
  const vitals = await client.analyze({
106
106
  video: videoBlob,
107
107
  age: 30,
@@ -110,6 +110,35 @@ const vitals = await client.analyze({
110
110
 
111
111
  console.log(vitals.heart_rate); // 72
112
112
  console.log(vitals.spo2); // 98
113
+
114
+ // Analyze beauty/skin metrics
115
+ const beauty = await client.analyzeBeauty({
116
+ video: videoBlob,
117
+ age: 30,
118
+ gender: 'female'
119
+ });
120
+
121
+ console.log(beauty.summary.skin_age); // 28
122
+ console.log(beauty.surface.hydration); // 75
123
+
124
+ // Analyze voice for health biomarkers
125
+ const voice = await client.analyzeVoice({
126
+ audio: audioBlob
127
+ });
128
+
129
+ console.log(voice.stress_score); // 35
130
+ console.log(voice.respiratory_rate); // 16
131
+ console.log(voice.wellness_score); // 72
132
+
133
+ // Analyze eye health
134
+ const eye = await client.analyzeEye({
135
+ video: videoBlob
136
+ });
137
+
138
+ console.log(eye.overall_score); // 85
139
+ console.log(eye.cataract.risk_level); // "low"
140
+ console.log(eye.red_eye.is_inflamed); // false
141
+ console.log(eye.recommendations); // ["Maintain regular eye exams", ...]
113
142
  ```
114
143
 
115
144
  ## Hooks
@@ -130,6 +159,8 @@ function CustomScanner() {
130
159
 
131
160
  ## Vitals Returned
132
161
 
162
+ ### Medical Analysis (`analyze`)
163
+
133
164
  | Metric | Type | Description |
134
165
  |--------|------|-------------|
135
166
  | `heart_rate` | number | Heart rate in BPM |
@@ -142,6 +173,41 @@ function CustomScanner() {
142
173
  | `recovery_score` | number | Recovery score % |
143
174
  | `vascular_age` | number | Estimated vascular age |
144
175
 
176
+ ### Voice Analysis (`analyzeVoice`)
177
+
178
+ | Metric | Type | Description |
179
+ |--------|------|-------------|
180
+ | `stress_score` | number | Voice stress score (0-100) |
181
+ | `fatigue_score` | number | Fatigue indicator (0-100) |
182
+ | `anxiety_level` | string | Anxiety level (low/mild/moderate/high) |
183
+ | `respiratory_rate` | number | Breathing rate from audio |
184
+ | `respiratory_health` | number | Respiratory health score |
185
+ | `cough_detected` | boolean | Cough presence detected |
186
+ | `depression_risk` | string | Depression risk indicator |
187
+ | `cognitive_load` | string | Mental load level |
188
+ | `wellness_score` | number | Overall wellness (0-100) |
189
+ | `composite_scores` | object | Mental, physical, cognitive, resilience scores |
190
+
191
+ ### Eye Analysis (`analyzeEye`)
192
+
193
+ | Metric | Type | Description |
194
+ |--------|------|-------------|
195
+ | `overall_score` | number | Overall eye health score (0-100) |
196
+ | `health_level` | string | Health level (Excellent/Good/Fair/Needs Attention) |
197
+ | `cataract` | object | Cataract screening results |
198
+ | `cataract.opacity_score` | number | Lens opacity measurement (0-100) |
199
+ | `cataract.risk_level` | string | Risk level (low/mild/moderate/high) |
200
+ | `red_eye` | object | Red eye/inflammation detection |
201
+ | `red_eye.redness_score` | number | Redness measurement (0-100) |
202
+ | `red_eye.is_inflamed` | boolean | Inflammation detected |
203
+ | `lens_clarity` | object | Lens clarity assessment |
204
+ | `pupil` | object | Pupil analysis results |
205
+ | `pterygium` | object | Pterygium detection |
206
+ | `stye` | object | Stye/chalazion detection |
207
+ | `sclera` | object | Sclera health (yellowing/jaundice risk) |
208
+ | `recommendations` | string[] | Personalized recommendations |
209
+ | `analysis_confidence` | number | Analysis confidence % |
210
+
145
211
  ## Getting an API Key
146
212
 
147
213
  Contact us for API access or visit the developer portal to generate your API key.
package/dist/index.d.mts CHANGED
@@ -127,6 +127,117 @@ interface BeautyResult {
127
127
  physiology: BeautyPhysiology;
128
128
  recommendations: BeautyRecommendations;
129
129
  }
130
+ interface VoiceCompositeScores {
131
+ mental_score: number;
132
+ physical_score: number;
133
+ cognitive_score: number;
134
+ resilience_score: number;
135
+ }
136
+ interface VoiceMoodIndicators {
137
+ monotone_speech?: boolean;
138
+ reduced_prosody?: boolean;
139
+ normal_prosody?: boolean;
140
+ slow_speech?: boolean;
141
+ slightly_slow?: boolean;
142
+ normal_rate?: boolean;
143
+ excessive_pauses?: boolean;
144
+ frequent_pauses?: boolean;
145
+ normal_pauses?: boolean;
146
+ low_energy?: boolean;
147
+ reduced_energy?: boolean;
148
+ normal_energy?: boolean;
149
+ low_pitch?: boolean;
150
+ }
151
+ interface VoiceResult {
152
+ stress_score: number;
153
+ fatigue_score: number;
154
+ anxiety_level: 'low' | 'mild' | 'moderate' | 'high' | 'unknown';
155
+ anxiety_confidence: number;
156
+ voice_quality: 'normal' | 'slightly_strained' | 'strained' | 'unknown';
157
+ pitch_variability: number;
158
+ speech_rate: number;
159
+ pause_ratio: number;
160
+ tremor_index: number;
161
+ energy_variability: number;
162
+ respiratory_rate: number;
163
+ breathing_regularity: number;
164
+ breath_depth: 'shallow' | 'normal' | 'deep' | 'unknown';
165
+ respiratory_health: number;
166
+ cough_detected: boolean;
167
+ cough_count: number;
168
+ wheeze_detected: boolean;
169
+ respiratory_concern: 'none' | 'mild' | 'moderate' | 'high' | 'unknown';
170
+ depression_risk: 'low' | 'mild' | 'moderate' | 'elevated' | 'unknown';
171
+ depression_score: number;
172
+ mood_indicators: VoiceMoodIndicators;
173
+ cognitive_load: 'low' | 'normal' | 'moderate' | 'high' | 'unknown';
174
+ cognitive_score: number;
175
+ focus_indicator: 'relaxed' | 'stable' | 'engaged' | 'distracted' | 'unknown';
176
+ composite_scores: VoiceCompositeScores;
177
+ wellness_score: number;
178
+ wellness_level: 'excellent' | 'good' | 'fair' | 'needs_attention' | 'concerning' | 'unknown';
179
+ pitch_mean: number;
180
+ pitch_range: number;
181
+ energy_dynamics: number;
182
+ rhythm_regularity: number;
183
+ jitter: number;
184
+ shimmer: number;
185
+ duration_seconds: number;
186
+ analysis_confidence: number;
187
+ analysis_version: string;
188
+ }
189
+ interface EyeCataract {
190
+ opacity_score: number;
191
+ risk_level: 'low' | 'mild' | 'moderate' | 'elevated' | 'high' | 'unknown';
192
+ risk_confidence: number;
193
+ description: string;
194
+ recommendation: string;
195
+ }
196
+ interface EyeRedEye {
197
+ redness_score: number;
198
+ risk_level: 'low' | 'mild' | 'moderate' | 'elevated' | 'high' | 'unknown';
199
+ is_inflamed: boolean;
200
+ description: string;
201
+ }
202
+ interface EyeLensClarity {
203
+ score: number;
204
+ level: 'clear' | 'moderate' | 'cloudy' | 'unknown';
205
+ }
206
+ interface EyePupil {
207
+ regularity_score: number;
208
+ status: 'normal' | 'irregular' | 'unknown';
209
+ }
210
+ interface EyePterygium {
211
+ detected: boolean;
212
+ confidence: number;
213
+ severity?: 'mild' | 'moderate' | 'severe';
214
+ description?: string;
215
+ }
216
+ interface EyeStye {
217
+ detected: boolean;
218
+ confidence: number;
219
+ }
220
+ interface EyeSclera {
221
+ yellowing_score: number;
222
+ jaundice_risk: 'low' | 'moderate' | 'high' | 'unknown';
223
+ color_health: 'healthy' | 'monitor' | 'unknown';
224
+ }
225
+ interface EyeResult {
226
+ status: 'success' | 'partial' | 'error';
227
+ overall_score: number;
228
+ health_level: 'Excellent' | 'Good' | 'Fair' | 'Needs Attention' | 'Unknown';
229
+ cataract: EyeCataract;
230
+ red_eye: EyeRedEye;
231
+ lens_clarity: EyeLensClarity;
232
+ pupil: EyePupil;
233
+ pterygium: EyePterygium;
234
+ stye: EyeStye;
235
+ sclera: EyeSclera;
236
+ recommendations: string[];
237
+ frames_analyzed: number;
238
+ analysis_confidence: number;
239
+ analysis_version?: string;
240
+ }
130
241
  interface APIResponse<T> {
131
242
  status: 'success' | 'error';
132
243
  data: T;
@@ -291,6 +402,20 @@ interface BeautyAnalyzeOptions {
291
402
  /** User's gender */
292
403
  gender?: 'male' | 'female';
293
404
  }
405
+ /**
406
+ * Options for voice health analysis
407
+ */
408
+ interface VoiceAnalyzeOptions {
409
+ /** Audio blob to analyze (webm, wav, mp3, ogg, m4a) */
410
+ audio: Blob;
411
+ }
412
+ /**
413
+ * Options for eye health analysis
414
+ */
415
+ interface EyeAnalyzeOptions {
416
+ /** Video blob to analyze (webm or mp4) */
417
+ video: Blob;
418
+ }
294
419
  /**
295
420
  * PulseAI API Client
296
421
  *
@@ -316,6 +441,30 @@ declare class PulseClient {
316
441
  * Returns skin age, texture, hydration, symmetry, and recommendations.
317
442
  */
318
443
  analyzeBeauty(options: BeautyAnalyzeOptions): Promise<BeautyResult>;
444
+ /**
445
+ * Analyze audio for voice health biomarkers
446
+ * Returns stress, fatigue, respiratory rate, cognitive load, and wellness scores.
447
+ *
448
+ * @example
449
+ * ```typescript
450
+ * const voiceResult = await client.analyzeVoice({ audio: audioBlob });
451
+ * console.log(voiceResult.stress_score);
452
+ * console.log(voiceResult.respiratory_rate);
453
+ * ```
454
+ */
455
+ analyzeVoice(options: VoiceAnalyzeOptions): Promise<VoiceResult>;
456
+ /**
457
+ * Analyze video for eye health screening
458
+ * Returns cataract risk, red eye detection, lens clarity, pupil analysis, and more.
459
+ *
460
+ * @example
461
+ * ```typescript
462
+ * const eyeResult = await client.analyzeEye({ video: videoBlob });
463
+ * console.log(eyeResult.overall_score);
464
+ * console.log(eyeResult.cataract.risk_level);
465
+ * ```
466
+ */
467
+ analyzeEye(options: EyeAnalyzeOptions): Promise<EyeResult>;
319
468
  /**
320
469
  * Check API health status
321
470
  */
@@ -427,6 +576,6 @@ declare function useRecording(stream: MediaStream | null, options?: UseRecording
427
576
  * @packageDocumentation
428
577
  */
429
578
 
430
- declare const VERSION = "1.0.0";
579
+ declare const VERSION = "1.2.0";
431
580
 
432
- export { type APIError, type APIResponse, type AnalyzeOptions, type ArrhythmiaResult, type BMIEstimate, type BeautyAnalyzeOptions, type BeautyGeometry, type BeautyPhysiology, type BeautyRecommendations, type BeautyResult, type BeautySummary, type BeautySurface, type BloodPressure, type CompositeScores, type FaceDetectionResult, type MentalWellness, PulseClient, type PulseClientConfig, PulseScanner, type PulseScannerProps, type ScannerStatus, type UseCameraOptions, type UseCameraReturn, type UseFaceDetectionOptions, type UseFaceDetectionReturn, type UseRecordingOptions, type UseRecordingReturn, VERSION, type VisualAnalysis, VitalsCard, VitalsCardFromResult, type VitalsCardProps, type VitalsResult, useCamera, useFaceDetection, useRecording };
581
+ export { type APIError, type APIResponse, type AnalyzeOptions, type ArrhythmiaResult, type BMIEstimate, type BeautyAnalyzeOptions, type BeautyGeometry, type BeautyPhysiology, type BeautyRecommendations, type BeautyResult, type BeautySummary, type BeautySurface, type BloodPressure, type CompositeScores, type EyeAnalyzeOptions, type EyeCataract, type EyeLensClarity, type EyePterygium, type EyePupil, type EyeRedEye, type EyeResult, type EyeSclera, type EyeStye, type FaceDetectionResult, type MentalWellness, PulseClient, type PulseClientConfig, PulseScanner, type PulseScannerProps, type ScannerStatus, type UseCameraOptions, type UseCameraReturn, type UseFaceDetectionOptions, type UseFaceDetectionReturn, type UseRecordingOptions, type UseRecordingReturn, VERSION, type VisualAnalysis, VitalsCard, VitalsCardFromResult, type VitalsCardProps, type VitalsResult, type VoiceAnalyzeOptions, type VoiceCompositeScores, type VoiceMoodIndicators, type VoiceResult, useCamera, useFaceDetection, useRecording };
package/dist/index.d.ts CHANGED
@@ -127,6 +127,117 @@ interface BeautyResult {
127
127
  physiology: BeautyPhysiology;
128
128
  recommendations: BeautyRecommendations;
129
129
  }
130
+ interface VoiceCompositeScores {
131
+ mental_score: number;
132
+ physical_score: number;
133
+ cognitive_score: number;
134
+ resilience_score: number;
135
+ }
136
+ interface VoiceMoodIndicators {
137
+ monotone_speech?: boolean;
138
+ reduced_prosody?: boolean;
139
+ normal_prosody?: boolean;
140
+ slow_speech?: boolean;
141
+ slightly_slow?: boolean;
142
+ normal_rate?: boolean;
143
+ excessive_pauses?: boolean;
144
+ frequent_pauses?: boolean;
145
+ normal_pauses?: boolean;
146
+ low_energy?: boolean;
147
+ reduced_energy?: boolean;
148
+ normal_energy?: boolean;
149
+ low_pitch?: boolean;
150
+ }
151
+ interface VoiceResult {
152
+ stress_score: number;
153
+ fatigue_score: number;
154
+ anxiety_level: 'low' | 'mild' | 'moderate' | 'high' | 'unknown';
155
+ anxiety_confidence: number;
156
+ voice_quality: 'normal' | 'slightly_strained' | 'strained' | 'unknown';
157
+ pitch_variability: number;
158
+ speech_rate: number;
159
+ pause_ratio: number;
160
+ tremor_index: number;
161
+ energy_variability: number;
162
+ respiratory_rate: number;
163
+ breathing_regularity: number;
164
+ breath_depth: 'shallow' | 'normal' | 'deep' | 'unknown';
165
+ respiratory_health: number;
166
+ cough_detected: boolean;
167
+ cough_count: number;
168
+ wheeze_detected: boolean;
169
+ respiratory_concern: 'none' | 'mild' | 'moderate' | 'high' | 'unknown';
170
+ depression_risk: 'low' | 'mild' | 'moderate' | 'elevated' | 'unknown';
171
+ depression_score: number;
172
+ mood_indicators: VoiceMoodIndicators;
173
+ cognitive_load: 'low' | 'normal' | 'moderate' | 'high' | 'unknown';
174
+ cognitive_score: number;
175
+ focus_indicator: 'relaxed' | 'stable' | 'engaged' | 'distracted' | 'unknown';
176
+ composite_scores: VoiceCompositeScores;
177
+ wellness_score: number;
178
+ wellness_level: 'excellent' | 'good' | 'fair' | 'needs_attention' | 'concerning' | 'unknown';
179
+ pitch_mean: number;
180
+ pitch_range: number;
181
+ energy_dynamics: number;
182
+ rhythm_regularity: number;
183
+ jitter: number;
184
+ shimmer: number;
185
+ duration_seconds: number;
186
+ analysis_confidence: number;
187
+ analysis_version: string;
188
+ }
189
+ interface EyeCataract {
190
+ opacity_score: number;
191
+ risk_level: 'low' | 'mild' | 'moderate' | 'elevated' | 'high' | 'unknown';
192
+ risk_confidence: number;
193
+ description: string;
194
+ recommendation: string;
195
+ }
196
+ interface EyeRedEye {
197
+ redness_score: number;
198
+ risk_level: 'low' | 'mild' | 'moderate' | 'elevated' | 'high' | 'unknown';
199
+ is_inflamed: boolean;
200
+ description: string;
201
+ }
202
+ interface EyeLensClarity {
203
+ score: number;
204
+ level: 'clear' | 'moderate' | 'cloudy' | 'unknown';
205
+ }
206
+ interface EyePupil {
207
+ regularity_score: number;
208
+ status: 'normal' | 'irregular' | 'unknown';
209
+ }
210
+ interface EyePterygium {
211
+ detected: boolean;
212
+ confidence: number;
213
+ severity?: 'mild' | 'moderate' | 'severe';
214
+ description?: string;
215
+ }
216
+ interface EyeStye {
217
+ detected: boolean;
218
+ confidence: number;
219
+ }
220
+ interface EyeSclera {
221
+ yellowing_score: number;
222
+ jaundice_risk: 'low' | 'moderate' | 'high' | 'unknown';
223
+ color_health: 'healthy' | 'monitor' | 'unknown';
224
+ }
225
+ interface EyeResult {
226
+ status: 'success' | 'partial' | 'error';
227
+ overall_score: number;
228
+ health_level: 'Excellent' | 'Good' | 'Fair' | 'Needs Attention' | 'Unknown';
229
+ cataract: EyeCataract;
230
+ red_eye: EyeRedEye;
231
+ lens_clarity: EyeLensClarity;
232
+ pupil: EyePupil;
233
+ pterygium: EyePterygium;
234
+ stye: EyeStye;
235
+ sclera: EyeSclera;
236
+ recommendations: string[];
237
+ frames_analyzed: number;
238
+ analysis_confidence: number;
239
+ analysis_version?: string;
240
+ }
130
241
  interface APIResponse<T> {
131
242
  status: 'success' | 'error';
132
243
  data: T;
@@ -291,6 +402,20 @@ interface BeautyAnalyzeOptions {
291
402
  /** User's gender */
292
403
  gender?: 'male' | 'female';
293
404
  }
405
+ /**
406
+ * Options for voice health analysis
407
+ */
408
+ interface VoiceAnalyzeOptions {
409
+ /** Audio blob to analyze (webm, wav, mp3, ogg, m4a) */
410
+ audio: Blob;
411
+ }
412
+ /**
413
+ * Options for eye health analysis
414
+ */
415
+ interface EyeAnalyzeOptions {
416
+ /** Video blob to analyze (webm or mp4) */
417
+ video: Blob;
418
+ }
294
419
  /**
295
420
  * PulseAI API Client
296
421
  *
@@ -316,6 +441,30 @@ declare class PulseClient {
316
441
  * Returns skin age, texture, hydration, symmetry, and recommendations.
317
442
  */
318
443
  analyzeBeauty(options: BeautyAnalyzeOptions): Promise<BeautyResult>;
444
+ /**
445
+ * Analyze audio for voice health biomarkers
446
+ * Returns stress, fatigue, respiratory rate, cognitive load, and wellness scores.
447
+ *
448
+ * @example
449
+ * ```typescript
450
+ * const voiceResult = await client.analyzeVoice({ audio: audioBlob });
451
+ * console.log(voiceResult.stress_score);
452
+ * console.log(voiceResult.respiratory_rate);
453
+ * ```
454
+ */
455
+ analyzeVoice(options: VoiceAnalyzeOptions): Promise<VoiceResult>;
456
+ /**
457
+ * Analyze video for eye health screening
458
+ * Returns cataract risk, red eye detection, lens clarity, pupil analysis, and more.
459
+ *
460
+ * @example
461
+ * ```typescript
462
+ * const eyeResult = await client.analyzeEye({ video: videoBlob });
463
+ * console.log(eyeResult.overall_score);
464
+ * console.log(eyeResult.cataract.risk_level);
465
+ * ```
466
+ */
467
+ analyzeEye(options: EyeAnalyzeOptions): Promise<EyeResult>;
319
468
  /**
320
469
  * Check API health status
321
470
  */
@@ -427,6 +576,6 @@ declare function useRecording(stream: MediaStream | null, options?: UseRecording
427
576
  * @packageDocumentation
428
577
  */
429
578
 
430
- declare const VERSION = "1.0.0";
579
+ declare const VERSION = "1.2.0";
431
580
 
432
- export { type APIError, type APIResponse, type AnalyzeOptions, type ArrhythmiaResult, type BMIEstimate, type BeautyAnalyzeOptions, type BeautyGeometry, type BeautyPhysiology, type BeautyRecommendations, type BeautyResult, type BeautySummary, type BeautySurface, type BloodPressure, type CompositeScores, type FaceDetectionResult, type MentalWellness, PulseClient, type PulseClientConfig, PulseScanner, type PulseScannerProps, type ScannerStatus, type UseCameraOptions, type UseCameraReturn, type UseFaceDetectionOptions, type UseFaceDetectionReturn, type UseRecordingOptions, type UseRecordingReturn, VERSION, type VisualAnalysis, VitalsCard, VitalsCardFromResult, type VitalsCardProps, type VitalsResult, useCamera, useFaceDetection, useRecording };
581
+ export { type APIError, type APIResponse, type AnalyzeOptions, type ArrhythmiaResult, type BMIEstimate, type BeautyAnalyzeOptions, type BeautyGeometry, type BeautyPhysiology, type BeautyRecommendations, type BeautyResult, type BeautySummary, type BeautySurface, type BloodPressure, type CompositeScores, type EyeAnalyzeOptions, type EyeCataract, type EyeLensClarity, type EyePterygium, type EyePupil, type EyeRedEye, type EyeResult, type EyeSclera, type EyeStye, type FaceDetectionResult, type MentalWellness, PulseClient, type PulseClientConfig, PulseScanner, type PulseScannerProps, type ScannerStatus, type UseCameraOptions, type UseCameraReturn, type UseFaceDetectionOptions, type UseFaceDetectionReturn, type UseRecordingOptions, type UseRecordingReturn, VERSION, type VisualAnalysis, VitalsCard, VitalsCardFromResult, type VitalsCardProps, type VitalsResult, type VoiceAnalyzeOptions, type VoiceCompositeScores, type VoiceMoodIndicators, type VoiceResult, useCamera, useFaceDetection, useRecording };
package/dist/index.js CHANGED
@@ -426,6 +426,40 @@ var PulseClient = class {
426
426
  const response = await this.request("/analyze/beauty", formData);
427
427
  return response;
428
428
  }
429
+ /**
430
+ * Analyze audio for voice health biomarkers
431
+ * Returns stress, fatigue, respiratory rate, cognitive load, and wellness scores.
432
+ *
433
+ * @example
434
+ * ```typescript
435
+ * const voiceResult = await client.analyzeVoice({ audio: audioBlob });
436
+ * console.log(voiceResult.stress_score);
437
+ * console.log(voiceResult.respiratory_rate);
438
+ * ```
439
+ */
440
+ async analyzeVoice(options) {
441
+ const formData = new FormData();
442
+ formData.append("audio", options.audio, "voice_recording.webm");
443
+ const response = await this.request("/analyze-voice", formData);
444
+ return response;
445
+ }
446
+ /**
447
+ * Analyze video for eye health screening
448
+ * Returns cataract risk, red eye detection, lens clarity, pupil analysis, and more.
449
+ *
450
+ * @example
451
+ * ```typescript
452
+ * const eyeResult = await client.analyzeEye({ video: videoBlob });
453
+ * console.log(eyeResult.overall_score);
454
+ * console.log(eyeResult.cataract.risk_level);
455
+ * ```
456
+ */
457
+ async analyzeEye(options) {
458
+ const formData = new FormData();
459
+ formData.append("video", options.video, "eye_scan.webm");
460
+ const response = await this.request("/analyze/eye", formData);
461
+ return response;
462
+ }
429
463
  /**
430
464
  * Check API health status
431
465
  */
@@ -836,7 +870,7 @@ var VitalsCardFromResult = ({ result, ...props }) => {
836
870
  };
837
871
 
838
872
  // src/index.ts
839
- var VERSION = "1.0.0";
873
+ var VERSION = "1.2.0";
840
874
  // Annotate the CommonJS export names for ESM import in node:
841
875
  0 && (module.exports = {
842
876
  PulseClient,
package/dist/index.mjs CHANGED
@@ -382,6 +382,40 @@ var PulseClient = class {
382
382
  const response = await this.request("/analyze/beauty", formData);
383
383
  return response;
384
384
  }
385
+ /**
386
+ * Analyze audio for voice health biomarkers
387
+ * Returns stress, fatigue, respiratory rate, cognitive load, and wellness scores.
388
+ *
389
+ * @example
390
+ * ```typescript
391
+ * const voiceResult = await client.analyzeVoice({ audio: audioBlob });
392
+ * console.log(voiceResult.stress_score);
393
+ * console.log(voiceResult.respiratory_rate);
394
+ * ```
395
+ */
396
+ async analyzeVoice(options) {
397
+ const formData = new FormData();
398
+ formData.append("audio", options.audio, "voice_recording.webm");
399
+ const response = await this.request("/analyze-voice", formData);
400
+ return response;
401
+ }
402
+ /**
403
+ * Analyze video for eye health screening
404
+ * Returns cataract risk, red eye detection, lens clarity, pupil analysis, and more.
405
+ *
406
+ * @example
407
+ * ```typescript
408
+ * const eyeResult = await client.analyzeEye({ video: videoBlob });
409
+ * console.log(eyeResult.overall_score);
410
+ * console.log(eyeResult.cataract.risk_level);
411
+ * ```
412
+ */
413
+ async analyzeEye(options) {
414
+ const formData = new FormData();
415
+ formData.append("video", options.video, "eye_scan.webm");
416
+ const response = await this.request("/analyze/eye", formData);
417
+ return response;
418
+ }
385
419
  /**
386
420
  * Check API health status
387
421
  */
@@ -792,7 +826,7 @@ var VitalsCardFromResult = ({ result, ...props }) => {
792
826
  };
793
827
 
794
828
  // src/index.ts
795
- var VERSION = "1.0.0";
829
+ var VERSION = "1.2.0";
796
830
  export {
797
831
  PulseClient,
798
832
  PulseScanner,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@rexai/pulse-react",
3
- "version": "1.0.1",
4
- "description": "React SDK for rPPG health analysis - measure heart rate, HRV, SpO2 from any camera",
3
+ "version": "1.1.0",
4
+ "description": "React SDK for rPPG health analysis - measure heart rate, HRV, SpO2, voice biomarkers from any camera",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
7
7
  "types": "dist/index.d.ts",
@@ -55,7 +55,11 @@
55
55
  "react",
56
56
  "telehealth",
57
57
  "telemedicine",
58
- "rexai"
58
+ "rexai",
59
+ "voice-analysis",
60
+ "respiratory",
61
+ "stress-detection",
62
+ "wellness"
59
63
  ],
60
64
  "author": "RexAI",
61
65
  "license": "MIT",