@siteed/audio-studio 3.0.2-beta.2 → 3.0.3
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/CHANGELOG.md +16 -150
- package/android/src/main/java/net/siteed/audiostudio/AudioStudioModule.kt +7 -1
- package/build/cjs/AudioAnalysis/AudioAnalysis.types.js.map +1 -1
- package/build/cjs/AudioAnalysis/audioFeaturesWasm.js +10 -7
- package/build/cjs/AudioAnalysis/audioFeaturesWasm.js.map +1 -1
- package/build/cjs/AudioAnalysis/audioFeaturesWasm.web.js +78 -96
- package/build/cjs/AudioAnalysis/audioFeaturesWasm.web.js.map +1 -1
- package/build/cjs/AudioAnalysis/extractAudioAnalysis.js +15 -12
- package/build/cjs/AudioAnalysis/extractAudioAnalysis.js.map +1 -1
- package/build/cjs/AudioAnalysis/extractAudioData.js +144 -2
- package/build/cjs/AudioAnalysis/extractAudioData.js.map +1 -1
- package/build/cjs/AudioAnalysis/melSpectrogramWasm.web.js +9 -55
- package/build/cjs/AudioAnalysis/melSpectrogramWasm.web.js.map +1 -1
- package/build/cjs/AudioAnalysis/wasmConfig.js +4 -4
- package/build/cjs/AudioAnalysis/wasmConfig.js.map +1 -1
- package/build/cjs/AudioAnalysis/wasmLoader.web.js +78 -0
- package/build/cjs/AudioAnalysis/wasmLoader.web.js.map +1 -0
- package/build/cjs/AudioStudioModule.js +4 -599
- package/build/cjs/AudioStudioModule.js.map +1 -1
- package/build/cjs/trimAudio.js +227 -0
- package/build/cjs/trimAudio.js.map +1 -1
- package/build/cjs/utils/encodeCompressedAudio.web.js +65 -0
- package/build/cjs/utils/encodeCompressedAudio.web.js.map +1 -0
- package/build/cjs/utils/resampleAudioBuffer.web.js +25 -0
- package/build/cjs/utils/resampleAudioBuffer.web.js.map +1 -0
- package/build/esm/AudioAnalysis/AudioAnalysis.types.js.map +1 -1
- package/build/esm/AudioAnalysis/audioFeaturesWasm.js +8 -5
- package/build/esm/AudioAnalysis/audioFeaturesWasm.js.map +1 -1
- package/build/esm/AudioAnalysis/audioFeaturesWasm.web.js +76 -61
- package/build/esm/AudioAnalysis/audioFeaturesWasm.web.js.map +1 -1
- package/build/esm/AudioAnalysis/extractAudioAnalysis.js +15 -12
- package/build/esm/AudioAnalysis/extractAudioAnalysis.js.map +1 -1
- package/build/esm/AudioAnalysis/extractAudioData.js +144 -2
- package/build/esm/AudioAnalysis/extractAudioData.js.map +1 -1
- package/build/esm/AudioAnalysis/melSpectrogramWasm.web.js +9 -22
- package/build/esm/AudioAnalysis/melSpectrogramWasm.web.js.map +1 -1
- package/build/esm/AudioAnalysis/wasmConfig.js +4 -4
- package/build/esm/AudioAnalysis/wasmConfig.js.map +1 -1
- package/build/esm/AudioAnalysis/wasmLoader.web.js +42 -0
- package/build/esm/AudioAnalysis/wasmLoader.web.js.map +1 -0
- package/build/esm/AudioStudioModule.js +4 -596
- package/build/esm/AudioStudioModule.js.map +1 -1
- package/build/esm/trimAudio.js +227 -0
- package/build/esm/trimAudio.js.map +1 -1
- package/build/esm/utils/encodeCompressedAudio.web.js +62 -0
- package/build/esm/utils/encodeCompressedAudio.web.js.map +1 -0
- package/build/esm/utils/resampleAudioBuffer.web.js +22 -0
- package/build/esm/utils/resampleAudioBuffer.web.js.map +1 -0
- package/build/types/AudioAnalysis/AudioAnalysis.types.d.ts +11 -0
- package/build/types/AudioAnalysis/AudioAnalysis.types.d.ts.map +1 -1
- package/build/types/AudioAnalysis/audioFeaturesWasm.d.ts +5 -9
- package/build/types/AudioAnalysis/audioFeaturesWasm.d.ts.map +1 -1
- package/build/types/AudioAnalysis/audioFeaturesWasm.web.d.ts +35 -16
- package/build/types/AudioAnalysis/audioFeaturesWasm.web.d.ts.map +1 -1
- package/build/types/AudioAnalysis/extractAudioAnalysis.d.ts.map +1 -1
- package/build/types/AudioAnalysis/extractAudioData.d.ts +2 -2
- package/build/types/AudioAnalysis/extractAudioData.d.ts.map +1 -1
- package/build/types/AudioAnalysis/melSpectrogramWasm.web.d.ts.map +1 -1
- package/build/types/AudioAnalysis/wasmLoader.web.d.ts +3 -0
- package/build/types/AudioAnalysis/wasmLoader.web.d.ts.map +1 -0
- package/build/types/AudioStudioModule.d.ts.map +1 -1
- package/build/types/trimAudio.d.ts.map +1 -1
- package/build/types/utils/encodeCompressedAudio.web.d.ts +10 -0
- package/build/types/utils/encodeCompressedAudio.web.d.ts.map +1 -0
- package/build/types/utils/resampleAudioBuffer.web.d.ts +2 -0
- package/build/types/utils/resampleAudioBuffer.web.d.ts.map +1 -0
- package/package.json +2 -2
- package/src/AudioAnalysis/AudioAnalysis.types.ts +12 -0
- package/src/AudioAnalysis/audioFeaturesWasm.ts +17 -22
- package/src/AudioAnalysis/audioFeaturesWasm.web.ts +102 -92
- package/src/AudioAnalysis/extractAudioAnalysis.ts +23 -20
- package/src/AudioAnalysis/extractAudioData.ts +186 -4
- package/src/AudioAnalysis/melSpectrogramWasm.web.ts +10 -25
- package/src/AudioAnalysis/wasmConfig.ts +4 -4
- package/src/AudioAnalysis/wasmLoader.web.ts +48 -0
- package/src/AudioStudioModule.ts +6 -854
- package/src/trimAudio.ts +337 -0
- package/src/utils/encodeCompressedAudio.web.ts +78 -0
- package/src/utils/resampleAudioBuffer.web.ts +39 -0
- package/build/cjs/AudioAnalysis/extractWaveform.js +0 -18
- package/build/cjs/AudioAnalysis/extractWaveform.js.map +0 -1
- package/build/esm/AudioAnalysis/extractWaveform.js +0 -11
- package/build/esm/AudioAnalysis/extractWaveform.js.map +0 -1
- package/build/types/AudioAnalysis/extractWaveform.d.ts +0 -8
- package/build/types/AudioAnalysis/extractWaveform.d.ts.map +0 -1
- package/src/AudioAnalysis/extractWaveform.ts +0 -22
package/CHANGELOG.md
CHANGED
|
@@ -7,15 +7,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
-
## [3.0.1] - 2026-03-21
|
|
11
10
|
|
|
11
|
+
## [3.0.3] - 2026-04-12
|
|
12
|
+
### Changed
|
|
13
|
+
- fix(audio-studio): convert trim ranges from Double to Long on Android (#347) (#360) ([6099e0e](https://github.com/deeeed/audiolab/commit/6099e0e81f3c8d7b1c109b415ad63e924f3f043b))
|
|
14
|
+
- feat(audio-studio): web trimAudio, WASM refactor, new utilities (#344) ([3d4862a](https://github.com/deeeed/audiolab/commit/3d4862a57a5eb2496169d27f758d7628d7d3659a))
|
|
15
|
+
- feat(sherpa-voice): comprehensive logging + fix Android prod model extraction (#342) ([5b20594](https://github.com/deeeed/audiolab/commit/5b20594c729a9deb703cbc2e23c07daa616149ab))
|
|
16
|
+
- fix(audio-studio): remove blocking CDN poll from publish.sh, sync wasmConfig to 3.0.2 ([290409a](https://github.com/deeeed/audiolab/commit/290409aae8d1160e1952a5ee1961ce3864fbb0c8))
|
|
17
|
+
- chore(audio-studio): release @siteed/audio-studio@3.0.2 ([ebd3300](https://github.com/deeeed/audiolab/commit/ebd330098d2756e6d5a555126e2dfc3fb038d155))
|
|
18
|
+
## [3.0.2] - 2026-03-21
|
|
19
|
+
### Changed
|
|
20
|
+
- fix(audio-studio): load WASM via CDN URL instead of broken relative path ([7427f28](https://github.com/deeeed/audiolab/commit/7427f289d273ffad609a4c6b0fb45c5094445dde))
|
|
21
|
+
- chore(audio-studio): disable conventionalCommits in publisher config, rewrite clean CHANGELOG ([4a2bbfa](https://github.com/deeeed/audiolab/commit/4a2bbfa605a56cab06618c0ca1afe6ff8cb19441))
|
|
22
|
+
- chore(audio-studio): release @siteed/audio-studio@3.0.1 ([04fe6f7](https://github.com/deeeed/audiolab/commit/04fe6f706d372e3ced0f83b796923c490bebd64d))
|
|
23
|
+
## [3.0.1] - 2026-03-21
|
|
12
24
|
### Fixed
|
|
13
25
|
- Add `@expo/config-plugins` to `peerDependencies` — fixes Yarn PnP `ambiguous require` error during `expo prebuild` (#341)
|
|
14
26
|
- WASM path resolution in build output — `prebuilt/` is now copied into `build/cjs/` and `build/esm/` so Metro resolves WASM imports correctly after install (#341)
|
|
15
27
|
- Split WASM modules into separate web/native platform files to prevent Metro bundling issues (#338)
|
|
16
|
-
|
|
17
28
|
## [3.0.0] - 2026-03-20
|
|
18
|
-
|
|
19
29
|
### BREAKING CHANGES
|
|
20
30
|
- Package renamed from `@siteed/expo-audio-studio` to `@siteed/audio-studio`. The old package continues as a backwards-compatible shim.
|
|
21
31
|
- Native module renamed from `ExpoAudioStream` to `AudioStudio`
|
|
@@ -36,214 +46,140 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
36
46
|
|
|
37
47
|
### Performance
|
|
38
48
|
- Optimized mel spectrogram C++ implementation
|
|
39
|
-
|
|
40
49
|
## [2.18.5] - 2026-02-23
|
|
41
|
-
|
|
42
50
|
### Fixed
|
|
43
51
|
- Android: guard Bluetooth API calls behind permission check on API 31+ (#294)
|
|
44
52
|
- Android: migrate phone state listener to `TelephonyCallback` on API 31+ (#275)
|
|
45
53
|
- Android: reset `startTime` in `startRecording` and validate hardware format (#298, #223)
|
|
46
54
|
- Android: gate foreground service on `enableBackgroundAudio` (#288, #294)
|
|
47
55
|
- Android: sanitize options before native bridge calls to prevent crash
|
|
48
|
-
|
|
49
56
|
## [2.18.4] - 2026-02-16
|
|
50
|
-
|
|
51
57
|
### Added
|
|
52
58
|
- Expo SDK 54 (React Native 0.81, React 19) support (#305)
|
|
53
59
|
|
|
54
60
|
### Fixed
|
|
55
61
|
- iOS: include compression data in `onAudioStream` events
|
|
56
62
|
- Android: properly emit final chunk of audio data on stop (#293)
|
|
57
|
-
|
|
58
63
|
## [2.18.1] - 2025-08-02
|
|
59
|
-
|
|
60
64
|
### Added
|
|
61
65
|
- Improved memory monitoring
|
|
62
|
-
|
|
63
66
|
## [2.18.0] - 2025-08-01
|
|
64
|
-
|
|
65
67
|
### Fixed
|
|
66
68
|
- Android: optimize buffer size to prevent OOM errors
|
|
67
69
|
- Android: invalid paused duration calculation
|
|
68
|
-
|
|
69
70
|
## [2.17.0] - 2025-07-31
|
|
70
|
-
|
|
71
71
|
### Fixed
|
|
72
72
|
- Android: fix `OutOfMemoryError` by tracking stream position correctly
|
|
73
|
-
|
|
74
73
|
## [2.16.1] - 2025-07-27
|
|
75
|
-
|
|
76
74
|
### Fixed
|
|
77
75
|
- Android: audio analysis accumulation showing 0 bytes
|
|
78
|
-
|
|
79
76
|
## [2.16.0] - 2025-07-27
|
|
80
|
-
|
|
81
77
|
### Performance
|
|
82
78
|
- Android: optimize stop recording performance for long recordings
|
|
83
|
-
|
|
84
79
|
## [2.15.0] - 2025-07-15
|
|
85
|
-
|
|
86
80
|
### Added
|
|
87
81
|
- Android: `showPauseResumeActions` option to notification config (#282)
|
|
88
|
-
|
|
89
82
|
## [2.14.4] - 2025-07-15
|
|
90
|
-
|
|
91
83
|
### Fixed
|
|
92
84
|
- Plugin: respect `enableDeviceDetection` configuration for Android permissions
|
|
93
85
|
- Android: add missing `BLUETOOTH_ADMIN` permission for device detection
|
|
94
|
-
|
|
95
86
|
## [2.14.3] - 2025-06-12
|
|
96
|
-
|
|
97
87
|
### Changed
|
|
98
88
|
- Remove analysis bit depth logging for cleaner debug output
|
|
99
|
-
|
|
100
89
|
## [2.14.2] - 2025-06-11
|
|
101
|
-
|
|
102
90
|
### Added
|
|
103
91
|
- Platform limitations validation and documentation
|
|
104
92
|
|
|
105
93
|
### Fixed
|
|
106
94
|
- iOS: update compressed file size when primary output is disabled
|
|
107
|
-
|
|
108
95
|
## [2.14.1] - 2025-06-11
|
|
109
|
-
|
|
110
96
|
### Fixed
|
|
111
97
|
- Android: fix duration returning 0 when primary output is disabled (#244)
|
|
112
|
-
|
|
113
98
|
## [2.14.0] - 2025-06-11
|
|
114
|
-
|
|
115
99
|
### Performance
|
|
116
100
|
- Comprehensive cross-platform stop recording performance optimization
|
|
117
|
-
|
|
118
101
|
## [2.13.2] - 2025-06-10
|
|
119
|
-
|
|
120
102
|
### Fixed
|
|
121
103
|
- Invalid type exports
|
|
122
|
-
|
|
123
104
|
## [2.13.1] - 2025-06-09
|
|
124
|
-
|
|
125
105
|
### Added
|
|
126
106
|
- Sub-100ms audio events analysis and improvements (#270)
|
|
127
107
|
|
|
128
108
|
### Fixed
|
|
129
109
|
- Update `expo-modules-core` peer dependency for Expo SDK 53 compatibility
|
|
130
|
-
|
|
131
110
|
## [2.13.0] - 2025-06-09
|
|
132
|
-
|
|
133
111
|
### Added
|
|
134
112
|
- Enhanced device detection and management — configurable `enableDeviceDetection`, automatic connect/disconnect events, force refresh (#269)
|
|
135
|
-
|
|
136
113
|
## [2.12.3] - 2025-06-07
|
|
137
|
-
|
|
138
114
|
### Changed
|
|
139
115
|
- Adjust audio focus request timing in `AudioRecorderManager`
|
|
140
|
-
|
|
141
116
|
## [2.12.2] - 2025-06-07
|
|
142
|
-
|
|
143
117
|
### Fixed
|
|
144
118
|
- Android: audio focus strategy for background recording (#267)
|
|
145
|
-
|
|
146
119
|
## [2.12.0] - 2025-06-07
|
|
147
|
-
|
|
148
120
|
### Added
|
|
149
121
|
- Android-only `audioFocusStrategy` option (#264)
|
|
150
122
|
|
|
151
123
|
### Fixed
|
|
152
124
|
- Android: PCM streaming duration calculation bug (#263, #265)
|
|
153
|
-
|
|
154
125
|
## [2.11.0] - 2025-06-05
|
|
155
|
-
|
|
156
126
|
### Added
|
|
157
127
|
- M4A support with `preferRawStream` option (#261)
|
|
158
128
|
|
|
159
129
|
### Fixed
|
|
160
130
|
- Enforce 10ms minimum interval on both platforms (#262)
|
|
161
131
|
- Android: proper `MediaCodec` resource cleanup in `AudioProcessor`
|
|
162
|
-
|
|
163
132
|
## [2.10.6] - 2025-06-04
|
|
164
|
-
|
|
165
133
|
### Fixed
|
|
166
134
|
- iOS: prevent `durationMs` returning 0 (#244, #260)
|
|
167
|
-
|
|
168
135
|
## [2.10.5] - 2025-06-04
|
|
169
|
-
|
|
170
136
|
### Fixed
|
|
171
137
|
- iOS: enable audio streaming when primary output is disabled (#259)
|
|
172
|
-
|
|
173
138
|
## [2.10.4] - 2025-06-03
|
|
174
|
-
|
|
175
139
|
### Fixed
|
|
176
140
|
- iOS: resolve Swift compilation scope error in `AudioStreamManager` (#256)
|
|
177
|
-
|
|
178
141
|
## [2.10.3] - 2025-06-02
|
|
179
|
-
|
|
180
142
|
### Fixed
|
|
181
143
|
- Prevent `UninitializedPropertyAccessException` crash in developer menu (#250)
|
|
182
144
|
- Return compression info when primary output is disabled (#244, #249)
|
|
183
|
-
|
|
184
145
|
## [2.10.2] - 2025-05-31
|
|
185
|
-
|
|
186
146
|
### Fixed
|
|
187
147
|
- Buffer size calculation and duplicate emission fix (#248)
|
|
188
|
-
|
|
189
148
|
## [2.10.1] - 2025-05-27
|
|
190
|
-
|
|
191
149
|
### Fixed
|
|
192
150
|
- `useAudioRecorder`: update `intervalId` type for better type safety
|
|
193
|
-
|
|
194
151
|
## [2.10.0] - 2025-05-26
|
|
195
|
-
|
|
196
152
|
### Added
|
|
197
153
|
- Buffer duration control and `skipFileWriting` options
|
|
198
154
|
- Enhanced testing framework with instrumented tests (#242)
|
|
199
|
-
|
|
200
155
|
## [2.9.0] - 2025-05-15
|
|
201
|
-
|
|
202
156
|
### Added
|
|
203
157
|
- Web audio chunk handling improvements (#240)
|
|
204
|
-
|
|
205
158
|
## [2.8.4] - 2025-05-11
|
|
206
|
-
|
|
207
159
|
### Fixed
|
|
208
160
|
- Expo plugin setup
|
|
209
|
-
|
|
210
161
|
## [2.8.3] - 2025-05-06
|
|
211
|
-
|
|
212
162
|
### Changed
|
|
213
163
|
- Update plugin configuration to use ESM format
|
|
214
|
-
|
|
215
164
|
## [2.8.2] - 2025-05-06
|
|
216
|
-
|
|
217
165
|
### Changed
|
|
218
166
|
- TypeScript configurations for dual module (ESM/CJS) support
|
|
219
|
-
|
|
220
167
|
## [2.8.1] - 2025-05-06
|
|
221
|
-
|
|
222
168
|
### Added
|
|
223
169
|
- Dual module format (ESM/CommonJS) to resolve module resolution issues (#235)
|
|
224
|
-
|
|
225
170
|
## [2.7.0] - 2025-05-04
|
|
226
|
-
|
|
227
171
|
### Fixed
|
|
228
172
|
- iOS: enhance background audio recording and audio format conversion (#228)
|
|
229
|
-
|
|
230
173
|
## [2.6.2] - 2025-05-01
|
|
231
|
-
|
|
232
174
|
### Fixed
|
|
233
175
|
- Android: ensure foreground-only audio recording works with `FOREGROUND_SERVICE` (#202, #221)
|
|
234
|
-
|
|
235
176
|
## [2.6.1] - 2025-05-01
|
|
236
|
-
|
|
237
177
|
### Fixed
|
|
238
178
|
- iOS: resolve hardware format mismatch crash and enhance logging (#220)
|
|
239
|
-
|
|
240
179
|
## [2.6.0] - 2025-05-01
|
|
241
|
-
|
|
242
180
|
### Fixed
|
|
243
181
|
- Web: resolve audio recording issue without compression (#217, #219)
|
|
244
|
-
|
|
245
182
|
## [2.5.0] - 2025-04-30
|
|
246
|
-
|
|
247
183
|
### Added
|
|
248
184
|
- Complete Android implementation for audio device API (#214)
|
|
249
185
|
- Cross-platform audio device detection, selection, and fallback handling (#213)
|
|
@@ -251,49 +187,33 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
251
187
|
|
|
252
188
|
### Fixed
|
|
253
189
|
- iOS: ensure complete audio data emission on recording stop/pause (#215)
|
|
254
|
-
|
|
255
190
|
## [2.4.1] - 2025-04-08
|
|
256
|
-
|
|
257
191
|
### Added
|
|
258
192
|
- Enhanced background audio handling and permission checks (#200)
|
|
259
|
-
|
|
260
193
|
## [2.4.0] - 2025-04-03
|
|
261
|
-
|
|
262
194
|
### Fixed
|
|
263
195
|
- iOS: resolve sample rate mismatch and enhance recording stability (#198)
|
|
264
196
|
- Android: enhance permission handling for phone state and notifications (#196)
|
|
265
|
-
|
|
266
197
|
## [2.3.1] - 2025-04-03
|
|
267
|
-
|
|
268
198
|
### Changed
|
|
269
199
|
- Remove external CRC32 library dependency (#195)
|
|
270
|
-
|
|
271
200
|
## [2.3.0] - 2025-03-29
|
|
272
|
-
|
|
273
201
|
### Fixed
|
|
274
202
|
- Always generate a new UUID unless filename is provided (#182)
|
|
275
|
-
|
|
276
203
|
## [2.2.0] - 2025-03-28
|
|
277
|
-
|
|
278
204
|
### Changed
|
|
279
205
|
- Platform-specific CRC32 handling
|
|
280
|
-
|
|
281
206
|
## [2.1.0] - 2025-03-04
|
|
282
|
-
|
|
283
207
|
### Added
|
|
284
208
|
- Mel spectrogram extraction and language detection (#157)
|
|
285
209
|
- Audio import functionality and decibel visualization (#156)
|
|
286
210
|
- iOS trim support with custom filename (#152)
|
|
287
211
|
- Sample rate control and web trimming support (#151)
|
|
288
212
|
- Audio trimming with optimized processing and detailed feedback (#150, #149)
|
|
289
|
-
|
|
290
213
|
## [2.0.1] - 2025-02-27
|
|
291
|
-
|
|
292
214
|
### Changed
|
|
293
215
|
- Update background mode handling for audio stream plugin
|
|
294
|
-
|
|
295
216
|
## [2.0.0] - 2025-02-27
|
|
296
|
-
|
|
297
217
|
### Added
|
|
298
218
|
- Full audio analysis with spectral features and time range controls (#132)
|
|
299
219
|
- `extractAudioData` API
|
|
@@ -302,166 +222,110 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
302
222
|
|
|
303
223
|
### Fixed
|
|
304
224
|
- Audio recording reliability improvements and web IndexedDB management (#146)
|
|
305
|
-
|
|
306
225
|
## [1.17.0] - 2025-02-18
|
|
307
|
-
|
|
308
226
|
### Added
|
|
309
227
|
- Interval audio analysis for web, Android, and iOS (#125, #126)
|
|
310
|
-
|
|
311
228
|
## [1.16.0] - 2025-02-17
|
|
312
|
-
|
|
313
229
|
### Fixed
|
|
314
230
|
- iOS: prevent adding background modes when disabled
|
|
315
231
|
- iOS: replace CallKit with `AVAudioSession` for phone call detection
|
|
316
|
-
|
|
317
232
|
## [1.15.1] - 2025-02-17
|
|
318
|
-
|
|
319
233
|
### Fixed
|
|
320
234
|
- iOS: restore Opus compression support (#122)
|
|
321
235
|
- Emit audio analysis without blocking the recording thread
|
|
322
|
-
|
|
323
236
|
## [1.15.0] - 2025-02-15
|
|
324
|
-
|
|
325
237
|
### Fixed
|
|
326
238
|
- iOS: improve audio recording interruption handling and auto-resume (#119)
|
|
327
239
|
- Android: improve background recording and call interruption handling (#118)
|
|
328
|
-
|
|
329
240
|
## [1.14.2] - 2025-02-13
|
|
330
|
-
|
|
331
241
|
### Fixed
|
|
332
242
|
- Clear recording metadata on STOP action
|
|
333
|
-
|
|
334
243
|
## [1.14.1] - 2025-02-12
|
|
335
|
-
|
|
336
244
|
### Fixed
|
|
337
245
|
- Enable background recording by default (#114)
|
|
338
|
-
|
|
339
246
|
## [1.14.0] - 2025-02-12
|
|
340
|
-
|
|
341
247
|
### Fixed
|
|
342
248
|
- `keepAwake` issue on iOS and auto-resume after call (#113)
|
|
343
|
-
|
|
344
249
|
## [1.13.2] - 2025-02-10
|
|
345
|
-
|
|
346
250
|
### Fixed
|
|
347
251
|
- Ensure foreground service starts within required timeframe
|
|
348
|
-
|
|
349
252
|
## [1.13.0] - 2025-02-09
|
|
350
|
-
|
|
351
253
|
### Added
|
|
352
254
|
- Audio decode support (#104)
|
|
353
255
|
|
|
354
256
|
### Fixed
|
|
355
257
|
- Background recording issues and status checking (#103)
|
|
356
|
-
|
|
357
258
|
## [1.12.1] - 2025-02-01
|
|
358
|
-
|
|
359
259
|
### Fixed
|
|
360
260
|
- Improve audio recording interruption handling and consistency (#98)
|
|
361
|
-
|
|
362
261
|
## [1.12.0] - 2025-01-31
|
|
363
|
-
|
|
364
262
|
### Added
|
|
365
263
|
- Call state checks before starting or resuming recording (#94)
|
|
366
264
|
- Custom filename and directory support for recordings (#92)
|
|
367
265
|
- Compressed recording info with file size (#90)
|
|
368
|
-
|
|
369
266
|
## [1.11.3] - 2025-01-25
|
|
370
|
-
|
|
371
267
|
### Fixed
|
|
372
268
|
- Disable duplicate notification alerts (#82)
|
|
373
|
-
|
|
374
269
|
## [1.11.2] - 2025-01-22
|
|
375
|
-
|
|
376
270
|
### Fixed
|
|
377
271
|
- Resources not cleaned up properly on app kill (#80)
|
|
378
|
-
|
|
379
272
|
## [1.11.0] - 2025-01-22
|
|
380
|
-
|
|
381
273
|
### Added
|
|
382
274
|
- Intelligent call interruption handling and compression improvements (#78)
|
|
383
|
-
|
|
384
275
|
## [1.10.0] - 2025-01-14
|
|
385
|
-
|
|
386
276
|
### Added
|
|
387
277
|
- Support for pausing and resuming compressed recordings
|
|
388
278
|
- Optimized notification channel settings
|
|
389
|
-
|
|
390
279
|
## [1.9.2] - 2025-01-12
|
|
391
|
-
|
|
392
280
|
### Fixed
|
|
393
281
|
- iOS: bitrate verification to prevent invalid values
|
|
394
|
-
|
|
395
282
|
## [1.9.1] - 2025-01-12
|
|
396
|
-
|
|
397
283
|
### Fixed
|
|
398
284
|
- iOS: potentially missing compressed file info
|
|
399
|
-
|
|
400
285
|
## [1.9.0] - 2025-01-11
|
|
401
|
-
|
|
402
286
|
### Performance
|
|
403
287
|
- Optimize memory usage and streaming performance for web audio recording (#75)
|
|
404
|
-
|
|
405
288
|
## [1.8.0] - 2025-01-10
|
|
406
|
-
|
|
407
289
|
### Added
|
|
408
290
|
- Audio compression support
|
|
409
|
-
|
|
410
291
|
## [1.7.2] - 2025-01-07
|
|
411
|
-
|
|
412
292
|
### Fixed
|
|
413
293
|
- Web: correct WAV header handling in audio recording
|
|
414
|
-
|
|
415
294
|
## [1.7.1] - 2025-01-07
|
|
416
|
-
|
|
417
295
|
### Fixed
|
|
418
296
|
- Notification: avoid triggering new alerts on update (#71)
|
|
419
|
-
|
|
420
297
|
## [1.7.0] - 2025-01-05
|
|
421
|
-
|
|
422
298
|
### Fixed
|
|
423
299
|
- iOS: improve audio resampling and duration tracking (#69)
|
|
424
300
|
- Handle paused state in `stopRecording` (#68)
|
|
425
301
|
- Reset audio recording state properly on iOS and Android (#66)
|
|
426
302
|
- Android: total size not resetting on new recording (#64)
|
|
427
|
-
|
|
428
303
|
## [1.3.1] - 2024-12-05
|
|
429
|
-
|
|
430
304
|
### Added
|
|
431
305
|
- Web: throttling and optimized event processing (#49)
|
|
432
|
-
|
|
433
306
|
## [1.3.0] - 2024-11-28
|
|
434
|
-
|
|
435
307
|
### Added
|
|
436
308
|
- Standardize permission status response structure across platforms (#44)
|
|
437
|
-
|
|
438
309
|
## [1.2.4] - 2024-11-05
|
|
439
|
-
|
|
440
310
|
### Changed
|
|
441
311
|
- Android: minimum audio interval set to 10ms
|
|
442
312
|
- Plugin: do not include `notification` config by default to prevent iOS version mismatch
|
|
443
313
|
|
|
444
314
|
### Fixed
|
|
445
315
|
- Remove frequently firing log statements on web
|
|
446
|
-
|
|
447
316
|
## [1.2.0] - 2024-10-24
|
|
448
|
-
|
|
449
317
|
### Added
|
|
450
318
|
- `keepAwake` — continue recording when app is in background (default: true)
|
|
451
319
|
- Customizable recording notifications for Android and iOS
|
|
452
320
|
- Android: rich notification with live waveform, configurable actions/colors/priorities
|
|
453
321
|
- iOS: media player integration
|
|
454
|
-
|
|
455
322
|
## [1.1.17] - 2024-10-21
|
|
456
|
-
|
|
457
323
|
### Added
|
|
458
324
|
- Bluetooth headset support on iOS
|
|
459
325
|
|
|
460
326
|
### Fixed
|
|
461
327
|
- Android: not reading custom interval audio update
|
|
462
|
-
|
|
463
328
|
## [1.0.0] - 2024-04-01
|
|
464
|
-
|
|
465
329
|
### Added
|
|
466
330
|
- Initial release
|
|
467
331
|
- Real-time audio streaming across iOS, Android, and web
|
|
@@ -471,6 +335,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
471
335
|
- Audio features extraction during recording
|
|
472
336
|
- Consistent WAV PCM recording format across all platforms
|
|
473
337
|
|
|
474
|
-
[unreleased]: https://github.com/deeeed/audiolab/compare/@siteed/audio-studio@3.0.
|
|
338
|
+
[unreleased]: https://github.com/deeeed/audiolab/compare/@siteed/audio-studio@3.0.3...HEAD
|
|
339
|
+
[3.0.3]: https://github.com/deeeed/audiolab/compare/@siteed/audio-studio@3.0.2...@siteed/audio-studio@3.0.3
|
|
340
|
+
[3.0.2]: https://github.com/deeeed/audiolab/compare/@siteed/audio-studio@3.0.2-beta.2...@siteed/audio-studio@3.0.2
|
|
475
341
|
[3.0.1]: https://github.com/deeeed/audiolab/compare/@siteed/audio-studio@3.0.0...@siteed/audio-studio@3.0.1
|
|
476
342
|
[3.0.0]: https://github.com/deeeed/audiolab/compare/@siteed/audio-studio@2.18.5...@siteed/audio-studio@3.0.0
|
|
@@ -382,7 +382,13 @@ class AudioStudioModule : Module(), EventSender {
|
|
|
382
382
|
val endTimeMs = (options["endTimeMs"] as? Number)?.toLong()
|
|
383
383
|
|
|
384
384
|
@Suppress("UNCHECKED_CAST")
|
|
385
|
-
val
|
|
385
|
+
val rawRanges = options["ranges"] as? List<Map<String, Any>>
|
|
386
|
+
val ranges = rawRanges?.map { range ->
|
|
387
|
+
mapOf(
|
|
388
|
+
"startTimeMs" to ((range["startTimeMs"] as? Number)?.toLong() ?: 0L),
|
|
389
|
+
"endTimeMs" to ((range["endTimeMs"] as? Number)?.toLong() ?: 0L)
|
|
390
|
+
)
|
|
391
|
+
}
|
|
386
392
|
|
|
387
393
|
val outputFileName = options["outputFileName"] as? String
|
|
388
394
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AudioAnalysis.types.js","sourceRoot":"","sources":["../../../src/AudioAnalysis/AudioAnalysis.types.ts"],"names":[],"mappings":";AAAA,iEAAiE","sourcesContent":["// packages/audio-studio/src/AudioAnalysis/AudioAnalysis.types.ts\n\nimport { BitDepth, ConsoleLike } from '../AudioStudio.types'\n\n/**\n * Represents the configuration for decoding audio data.\n */\nexport interface DecodingConfig {\n /** Target sample rate for decoded audio (Android and Web) */\n targetSampleRate?: number\n /** Target number of channels (Android and Web) */\n targetChannels?: number\n /** Target bit depth (Android and Web) */\n targetBitDepth?: BitDepth\n /** Whether to normalize audio levels (Android and Web) */\n normalizeAudio?: boolean\n}\n\n/**\n * Represents speech-related features extracted from audio.\n */\nexport interface SpeechFeatures {\n isActive: boolean // Whether speech is detected in this segment\n speakerId?: number // Optional speaker identification\n // Could add more speech-related features here like:\n // confidence: number\n // language?: string\n // sentiment?: number\n // etc.\n}\n\n/**\n * Represents various audio features extracted from an audio signal.\n */\nexport interface AudioFeatures {\n energy?: number // The infinite integral of the squared signal, representing the overall energy of the audio.\n mfcc?: number[] // Mel-frequency cepstral coefficients, describing the short-term power spectrum of a sound.\n rms?: number // Root mean square value, indicating the amplitude of the audio signal.\n minAmplitude?: number // Minimum amplitude value in the audio signal.\n maxAmplitude?: number // Maximum amplitude value in the audio signal.\n zcr?: number // Zero-crossing rate, indicating the rate at which the signal changes sign.\n spectralCentroid?: number // The center of mass of the spectrum, indicating the brightness of the sound.\n spectralFlatness?: number // Measure of the flatness of the spectrum, indicating how noise-like the signal is.\n spectralRolloff?: number // The frequency below which a specified percentage (usually 85%) of the total spectral energy lies.\n spectralBandwidth?: number // The width of the spectrum, indicating the range of frequencies present.\n chromagram?: number[] // Chromagram, representing the 12 different pitch classes of the audio.\n tempo?: number // Estimated tempo of the audio signal, measured in beats per minute (BPM).\n hnr?: number // Harmonics-to-noise ratio, indicating the proportion of harmonics to noise in the audio signal.\n melSpectrogram?: number[] // Mel-scaled spectrogram representation of the audio.\n spectralContrast?: number[] // Spectral contrast features representing the difference between peaks and valleys.\n tonnetz?: number[] // Tonal network features representing harmonic relationships.\n pitch?: number // Pitch of the audio signal, measured in Hertz (Hz).\n crc32?: number // crc32 checksum of the audio signal, used to verify the integrity of the audio.\n}\n\n/**\n * Options to specify which audio features to extract.\n * Note: Advanced features (spectral features, chromagram, pitch, etc.) are experimental,\n * especially during live recording, due to high processing requirements.\n */\nexport interface AudioFeaturesOptions {\n // Basic features - well optimized\n energy?: boolean\n rms?: boolean\n zcr?: boolean\n\n // Advanced features - experimental, may impact performance in live recording\n mfcc?: boolean\n spectralCentroid?: boolean\n spectralFlatness?: boolean\n spectralRolloff?: boolean\n spectralBandwidth?: boolean\n chromagram?: boolean\n tempo?: boolean\n hnr?: boolean\n melSpectrogram?: boolean\n spectralContrast?: boolean\n tonnetz?: boolean\n pitch?: boolean\n\n // Utility\n crc32?: boolean\n}\n\n/**\n * Represents a single data point in the audio analysis.\n */\nexport interface DataPoint {\n id: number\n amplitude: number // Peak amplitude for the segment\n rms: number // Root mean square value\n dB: number // dBFS (decibels relative to full scale) computed from RMS value\n silent: boolean // Always computed\n features?: AudioFeatures\n speech?: SpeechFeatures\n startTime?: number\n endTime?: number\n // start / end position in bytes\n startPosition?: number\n endPosition?: number\n // number of audio samples for this point (samples size depends on bit depth)\n samples?: number\n}\n\n/**\n * Represents the complete data from the audio analysis.\n */\nexport interface AudioAnalysis {\n segmentDurationMs: number // Duration of each segment in milliseconds\n durationMs: number // Duration of the audio in milliseconds\n /**\n * Bit depth used for audio analysis processing.\n *\n * **Important**: This represents the internal processing bit depth, which may differ\n * from the recording bit depth. Audio is typically converted to 32-bit float for\n * analysis to ensure precision in calculations, regardless of the original recording format.\n *\n * Platform behavior:\n * - iOS: Always 32 (float processing)\n * - Android: Always 32 (float processing)\n * - Web: Always 32 (Web Audio API standard)\n *\n * The actual recorded file will maintain the requested bit depth (8, 16, or 32).\n */\n bitDepth: number\n samples: number // Size of the audio in bytes\n numberOfChannels: number // Number of audio channels\n sampleRate: number // Sample rate of the audio\n dataPoints: DataPoint[] // Array of data points from the analysis.\n amplitudeRange: {\n min: number\n max: number\n }\n rmsRange: {\n min: number\n max: number\n }\n extractionTimeMs: number // Time taken to extract/process the analysis in milliseconds\n // TODO: speaker changes into a broader speech analysis section\n speechAnalysis?: {\n speakerChanges: {\n timestamp: number\n speakerId: number\n }[]\n // Could add more speech analysis data here like:\n // dominantSpeaker?: number\n // totalSpeechDuration?: number\n // speakerStats?: { [speakerId: number]: { duration: number, segments: number } }\n }\n}\n\n/**\n * Options for specifying a time range within an audio file.\n */\nexport interface AudioRangeOptions {\n /** Start time in milliseconds */\n startTimeMs?: number\n /** End time in milliseconds */\n endTimeMs?: number\n}\n\n/**\n * Options for generating a quick preview of audio waveform.\n * This is optimized for UI rendering with a specified number of points.\n */\nexport interface PreviewOptions extends AudioRangeOptions {\n /** URI of the audio file to analyze */\n fileUri: string\n /**\n * Total number of points to generate for the preview.\n * @default 100\n */\n numberOfPoints?: number\n /**\n * Optional logger for debugging.\n */\n logger?: ConsoleLike\n /**\n * Optional configuration for decoding the audio file.\n * Defaults to:\n * - targetSampleRate: undefined (keep original)\n * - targetChannels: undefined (keep original)\n * - targetBitDepth: 16\n * - normalizeAudio: false\n */\n decodingOptions?: DecodingConfig\n}\n\n/**\n * Options for mel-spectrogram extraction\n *\n * @experimental This feature is experimental and currently only available on Android.\n * The API may change in future versions.\n */\nexport interface ExtractMelSpectrogramOptions {\n fileUri?: string // Path to audio file\n arrayBuffer?: ArrayBuffer // Raw audio buffer\n windowSizeMs: number // Window size in ms (e.g., 25)\n hopLengthMs: number // Hop length in ms (e.g., 10)\n nMels: number // Number of mel filters (e.g., 60)\n fMin?: number // Min frequency (default: 0)\n fMax?: number // Max frequency (default: sampleRate / 2)\n windowType?: 'hann' | 'hamming' // Window function (default: 'hann')\n normalize?: boolean // Mean normalization (default: false)\n logScale?: boolean // Log scaling of mel energies (default: true)\n decodingOptions?: DecodingConfig // Audio decoding settings\n /** Optional start time in ms. If neither startTimeMs nor endTimeMs is set, defaults to 0. */\n startTimeMs?: number\n /** Optional end time in ms. Clamped so that the range does not exceed MAX_DURATION_MS (30 s). */\n endTimeMs?: number\n logger?: ConsoleLike\n}\n\n/**\n * Return type for mel spectrogram extraction\n *\n * @experimental This feature is experimental and currently only available on Android.\n * The API may change in future versions.\n */\nexport interface MelSpectrogram {\n spectrogram: number[][] // 2D array [time][mel]\n sampleRate: number // Audio sample rate\n nMels: number // Number of mel filters\n timeSteps: number // Number of time frames\n durationMs: number // Audio duration in ms\n}\n"]}
|
|
1
|
+
{"version":3,"file":"AudioAnalysis.types.js","sourceRoot":"","sources":["../../../src/AudioAnalysis/AudioAnalysis.types.ts"],"names":[],"mappings":";AAAA,iEAAiE","sourcesContent":["// packages/audio-studio/src/AudioAnalysis/AudioAnalysis.types.ts\n\nimport { BitDepth, ConsoleLike } from '../AudioStudio.types'\n\n/**\n * Represents the configuration for decoding audio data.\n */\nexport interface DecodingConfig {\n /** Target sample rate for decoded audio (Android and Web) */\n targetSampleRate?: number\n /** Target number of channels (Android and Web) */\n targetChannels?: number\n /** Target bit depth (Android and Web) */\n targetBitDepth?: BitDepth\n /** Whether to normalize audio levels (Android and Web) */\n normalizeAudio?: boolean\n}\n\n/**\n * Represents speech-related features extracted from audio.\n */\nexport interface SpeechFeatures {\n isActive: boolean // Whether speech is detected in this segment\n speakerId?: number // Optional speaker identification\n // Could add more speech-related features here like:\n // confidence: number\n // language?: string\n // sentiment?: number\n // etc.\n}\n\n/**\n * Represents various audio features extracted from an audio signal.\n */\nexport interface AudioFeatures {\n energy?: number // The infinite integral of the squared signal, representing the overall energy of the audio.\n mfcc?: number[] // Mel-frequency cepstral coefficients, describing the short-term power spectrum of a sound.\n rms?: number // Root mean square value, indicating the amplitude of the audio signal.\n minAmplitude?: number // Minimum amplitude value in the audio signal.\n maxAmplitude?: number // Maximum amplitude value in the audio signal.\n zcr?: number // Zero-crossing rate, indicating the rate at which the signal changes sign.\n spectralCentroid?: number // The center of mass of the spectrum, indicating the brightness of the sound.\n spectralFlatness?: number // Measure of the flatness of the spectrum, indicating how noise-like the signal is.\n spectralRolloff?: number // The frequency below which a specified percentage (usually 85%) of the total spectral energy lies.\n spectralBandwidth?: number // The width of the spectrum, indicating the range of frequencies present.\n chromagram?: number[] // Chromagram, representing the 12 different pitch classes of the audio.\n tempo?: number // Estimated tempo of the audio signal, measured in beats per minute (BPM).\n hnr?: number // Harmonics-to-noise ratio, indicating the proportion of harmonics to noise in the audio signal.\n melSpectrogram?: number[] // Mel-scaled spectrogram representation of the audio.\n spectralContrast?: number[] // Spectral contrast features representing the difference between peaks and valleys.\n tonnetz?: number[] // Tonal network features representing harmonic relationships.\n pitch?: number // Pitch of the audio signal, measured in Hertz (Hz).\n crc32?: number // crc32 checksum of the audio signal, used to verify the integrity of the audio.\n}\n\n/**\n * Options to specify which audio features to extract.\n * Note: Advanced features (spectral features, chromagram, pitch, etc.) are experimental,\n * especially during live recording, due to high processing requirements.\n */\nexport interface AudioFeaturesOptions {\n // Basic features - well optimized\n energy?: boolean\n rms?: boolean\n zcr?: boolean\n\n // Advanced features - experimental, may impact performance in live recording\n mfcc?: boolean\n spectralCentroid?: boolean\n spectralFlatness?: boolean\n spectralRolloff?: boolean\n spectralBandwidth?: boolean\n chromagram?: boolean\n tempo?: boolean\n hnr?: boolean\n melSpectrogram?: boolean\n spectralContrast?: boolean\n tonnetz?: boolean\n pitch?: boolean\n\n // Utility\n crc32?: boolean\n}\n\n/**\n * Represents a single data point in the audio analysis.\n */\nexport interface DataPoint {\n id: number\n amplitude: number // Peak amplitude for the segment\n rms: number // Root mean square value\n dB: number // dBFS (decibels relative to full scale) computed from RMS value\n silent: boolean // Always computed\n features?: AudioFeatures\n speech?: SpeechFeatures\n startTime?: number\n endTime?: number\n // start / end position in bytes\n startPosition?: number\n endPosition?: number\n // number of audio samples for this point (samples size depends on bit depth)\n samples?: number\n}\n\n/**\n * Represents the complete data from the audio analysis.\n */\nexport interface AudioAnalysis {\n segmentDurationMs: number // Duration of each segment in milliseconds\n durationMs: number // Duration of the audio in milliseconds\n /**\n * Bit depth used for audio analysis processing.\n *\n * **Important**: This represents the internal processing bit depth, which may differ\n * from the recording bit depth. Audio is typically converted to 32-bit float for\n * analysis to ensure precision in calculations, regardless of the original recording format.\n *\n * Platform behavior:\n * - iOS: Always 32 (float processing)\n * - Android: Always 32 (float processing)\n * - Web: Always 32 (Web Audio API standard)\n *\n * The actual recorded file will maintain the requested bit depth (8, 16, or 32).\n */\n bitDepth: number\n samples: number // Size of the audio in bytes\n numberOfChannels: number // Number of audio channels\n sampleRate: number // Sample rate of the audio\n dataPoints: DataPoint[] // Array of data points from the analysis.\n amplitudeRange: {\n min: number\n max: number\n }\n rmsRange: {\n min: number\n max: number\n }\n extractionTimeMs: number // Time taken to extract/process the analysis in milliseconds\n // TODO: speaker changes into a broader speech analysis section\n speechAnalysis?: {\n speakerChanges: {\n timestamp: number\n speakerId: number\n }[]\n // Could add more speech analysis data here like:\n // dominantSpeaker?: number\n // totalSpeechDuration?: number\n // speakerStats?: { [speakerId: number]: { duration: number, segments: number } }\n }\n}\n\n/**\n * Options for specifying a time range within an audio file.\n */\nexport interface AudioRangeOptions {\n /** Start time in milliseconds */\n startTimeMs?: number\n /** End time in milliseconds */\n endTimeMs?: number\n}\n\n/**\n * Options for generating a quick preview of audio waveform.\n * This is optimized for UI rendering with a specified number of points.\n */\nexport interface PreviewOptions extends AudioRangeOptions {\n /** URI of the audio file to analyze */\n fileUri: string\n /**\n * Total number of points to generate for the preview.\n * @default 100\n */\n numberOfPoints?: number\n /**\n * Optional logger for debugging.\n */\n logger?: ConsoleLike\n /**\n * Optional configuration for decoding the audio file.\n * Defaults to:\n * - targetSampleRate: undefined (keep original)\n * - targetChannels: undefined (keep original)\n * - targetBitDepth: 16\n * - normalizeAudio: false\n */\n decodingOptions?: DecodingConfig\n}\n\n/**\n * Options for mel-spectrogram extraction\n *\n * @experimental This feature is experimental and currently only available on Android.\n * The API may change in future versions.\n */\nexport interface ExtractMelSpectrogramOptions {\n fileUri?: string // Path to audio file\n arrayBuffer?: ArrayBuffer // Raw audio buffer\n windowSizeMs: number // Window size in ms (e.g., 25)\n hopLengthMs: number // Hop length in ms (e.g., 10)\n nMels: number // Number of mel filters (e.g., 60)\n fMin?: number // Min frequency (default: 0)\n fMax?: number // Max frequency (default: sampleRate / 2)\n windowType?: 'hann' | 'hamming' // Window function (default: 'hann')\n normalize?: boolean // Mean normalization (default: false)\n logScale?: boolean // Log scaling of mel energies (default: true)\n decodingOptions?: DecodingConfig // Audio decoding settings\n /** Optional start time in ms. If neither startTimeMs nor endTimeMs is set, defaults to 0. */\n startTimeMs?: number\n /** Optional end time in ms. Clamped so that the range does not exceed MAX_DURATION_MS (30 s). */\n endTimeMs?: number\n logger?: ConsoleLike\n}\n\n/**\n * Result type for WASM-based audio feature extraction.\n */\nexport interface AudioFeaturesWasmResult {\n spectralCentroid: number\n spectralFlatness: number\n spectralRolloff: number\n spectralBandwidth: number\n mfcc: number[]\n chromagram: number[]\n}\n\n/**\n * Return type for mel spectrogram extraction\n *\n * @experimental This feature is experimental and currently only available on Android.\n * The API may change in future versions.\n */\nexport interface MelSpectrogram {\n spectrogram: number[][] // 2D array [time][mel]\n sampleRate: number // Audio sample rate\n nMels: number // Number of mel filters\n timeSteps: number // Number of time frames\n durationMs: number // Audio duration in ms\n}\n"]}
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// Native stub — WASM audio features is web-only.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.
|
|
5
|
-
exports.computeAudioFeaturesFrameWasm = computeAudioFeaturesFrameWasm;
|
|
4
|
+
exports.AudioFeaturesStreamingSession = void 0;
|
|
6
5
|
exports.computeAudioFeaturesWasm = computeAudioFeaturesWasm;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
class AudioFeaturesStreamingSession {
|
|
7
|
+
static async create(_sampleRate, _fftLength, _nMfcc, _nMelFilters, _computeMfcc, _computeChroma) {
|
|
8
|
+
throw new Error('WASM audio features is not available on native');
|
|
9
|
+
}
|
|
10
|
+
computeFrame(_samples) {
|
|
11
|
+
return null;
|
|
12
|
+
}
|
|
13
|
+
dispose() { }
|
|
12
14
|
}
|
|
15
|
+
exports.AudioFeaturesStreamingSession = AudioFeaturesStreamingSession;
|
|
13
16
|
async function computeAudioFeaturesWasm(_audioData, _sampleRate, _fftLength, _nMfcc, _nMelFilters, _computeMfcc, _computeChroma) {
|
|
14
17
|
throw new Error('WASM audio features is not available on native');
|
|
15
18
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audioFeaturesWasm.js","sourceRoot":"","sources":["../../../src/AudioAnalysis/audioFeaturesWasm.ts"],"names":[],"mappings":";AAAA,iDAAiD
|
|
1
|
+
{"version":3,"file":"audioFeaturesWasm.js","sourceRoot":"","sources":["../../../src/AudioAnalysis/audioFeaturesWasm.ts"],"names":[],"mappings":";AAAA,iDAAiD;;;AAuBjD,4DAUC;AA7BD,MAAa,6BAA6B;IACtC,MAAM,CAAC,KAAK,CAAC,MAAM,CACf,WAAmB,EACnB,UAAmB,EACnB,MAAe,EACf,YAAqB,EACrB,YAAsB,EACtB,cAAwB;QAExB,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAA;IACrE,CAAC;IAED,YAAY,CAAC,QAAsB;QAC/B,OAAO,IAAI,CAAA;IACf,CAAC;IAED,OAAO,KAAU,CAAC;CACrB;AAjBD,sEAiBC;AAEM,KAAK,UAAU,wBAAwB,CAC1C,UAAwB,EACxB,WAAmB,EACnB,UAAmB,EACnB,MAAe,EACf,YAAqB,EACrB,YAAsB,EACtB,cAAwB;IAExB,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAA;AACrE,CAAC","sourcesContent":["// Native stub — WASM audio features is web-only.\n\nimport type { AudioFeaturesWasmResult } from './AudioAnalysis.types'\n\nexport class AudioFeaturesStreamingSession {\n static async create(\n _sampleRate: number,\n _fftLength?: number,\n _nMfcc?: number,\n _nMelFilters?: number,\n _computeMfcc?: boolean,\n _computeChroma?: boolean\n ): Promise<AudioFeaturesStreamingSession> {\n throw new Error('WASM audio features is not available on native')\n }\n\n computeFrame(_samples: Float32Array): AudioFeaturesWasmResult | null {\n return null\n }\n\n dispose(): void {}\n}\n\nexport async function computeAudioFeaturesWasm(\n _audioData: Float32Array,\n _sampleRate: number,\n _fftLength?: number,\n _nMfcc?: number,\n _nMelFilters?: number,\n _computeMfcc?: boolean,\n _computeChroma?: boolean\n): Promise<AudioFeaturesWasmResult> {\n throw new Error('WASM audio features is not available on native')\n}\n"]}
|