@siteed/expo-audio-stream 2.1.0 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (187) hide show
  1. package/README.md +40 -222
  2. package/build/index.d.ts +11 -15
  3. package/build/index.js +44 -14
  4. package/package.json +49 -110
  5. package/src/index.ts +18 -32
  6. package/CHANGELOG.md +0 -206
  7. package/android/build.gradle +0 -105
  8. package/android/src/main/AndroidManifest.xml +0 -27
  9. package/android/src/main/java/net/siteed/audiostream/AudioAnalysisData.kt +0 -166
  10. package/android/src/main/java/net/siteed/audiostream/AudioDataEncoder.kt +0 -9
  11. package/android/src/main/java/net/siteed/audiostream/AudioFileHandler.kt +0 -131
  12. package/android/src/main/java/net/siteed/audiostream/AudioFormatUtils.kt +0 -103
  13. package/android/src/main/java/net/siteed/audiostream/AudioNotificationsManager.kt +0 -435
  14. package/android/src/main/java/net/siteed/audiostream/AudioProcessor.kt +0 -2235
  15. package/android/src/main/java/net/siteed/audiostream/AudioRecorderManager.kt +0 -1437
  16. package/android/src/main/java/net/siteed/audiostream/AudioRecordingService.kt +0 -152
  17. package/android/src/main/java/net/siteed/audiostream/AudioTrimmer.kt +0 -1099
  18. package/android/src/main/java/net/siteed/audiostream/Constants.kt +0 -21
  19. package/android/src/main/java/net/siteed/audiostream/EventSender.kt +0 -7
  20. package/android/src/main/java/net/siteed/audiostream/ExpoAudioStreamModule.kt +0 -739
  21. package/android/src/main/java/net/siteed/audiostream/FFT.kt +0 -99
  22. package/android/src/main/java/net/siteed/audiostream/Features.kt +0 -98
  23. package/android/src/main/java/net/siteed/audiostream/NotificationConfig.kt +0 -70
  24. package/android/src/main/java/net/siteed/audiostream/PermissionUtils.kt +0 -59
  25. package/android/src/main/java/net/siteed/audiostream/RecordingActionReceiver.kt +0 -59
  26. package/android/src/main/java/net/siteed/audiostream/RecordingConfig.kt +0 -205
  27. package/android/src/main/java/net/siteed/audiostream/WaveformConfig.kt +0 -19
  28. package/android/src/main/java/net/siteed/audiostream/WaveformRenderer.kt +0 -159
  29. package/android/src/main/res/drawable/ic_default_action_icon.xml +0 -16
  30. package/android/src/main/res/drawable/ic_microphone.xml +0 -13
  31. package/android/src/main/res/drawable/ic_pause.xml +0 -10
  32. package/android/src/main/res/drawable/ic_play.xml +0 -10
  33. package/android/src/main/res/drawable/ic_stop.xml +0 -10
  34. package/android/src/main/res/layout/notification_recording.xml +0 -37
  35. package/android/src/main/test/java/net/siteed/audiostream/AudioProcessorTest.kt +0 -56
  36. package/app.plugin.js +0 -1
  37. package/build/AudioAnalysis/AudioAnalysis.types.d.ts +0 -179
  38. package/build/AudioAnalysis/AudioAnalysis.types.d.ts.map +0 -1
  39. package/build/AudioAnalysis/AudioAnalysis.types.js +0 -3
  40. package/build/AudioAnalysis/AudioAnalysis.types.js.map +0 -1
  41. package/build/AudioAnalysis/extractAudioAnalysis.d.ts +0 -68
  42. package/build/AudioAnalysis/extractAudioAnalysis.d.ts.map +0 -1
  43. package/build/AudioAnalysis/extractAudioAnalysis.js +0 -203
  44. package/build/AudioAnalysis/extractAudioAnalysis.js.map +0 -1
  45. package/build/AudioAnalysis/extractAudioData.d.ts +0 -3
  46. package/build/AudioAnalysis/extractAudioData.d.ts.map +0 -1
  47. package/build/AudioAnalysis/extractAudioData.js +0 -5
  48. package/build/AudioAnalysis/extractAudioData.js.map +0 -1
  49. package/build/AudioAnalysis/extractMelSpectrogram.d.ts +0 -14
  50. package/build/AudioAnalysis/extractMelSpectrogram.d.ts.map +0 -1
  51. package/build/AudioAnalysis/extractMelSpectrogram.js +0 -85
  52. package/build/AudioAnalysis/extractMelSpectrogram.js.map +0 -1
  53. package/build/AudioAnalysis/extractPreview.d.ts +0 -11
  54. package/build/AudioAnalysis/extractPreview.d.ts.map +0 -1
  55. package/build/AudioAnalysis/extractPreview.js +0 -25
  56. package/build/AudioAnalysis/extractPreview.js.map +0 -1
  57. package/build/AudioAnalysis/extractWaveform.d.ts +0 -8
  58. package/build/AudioAnalysis/extractWaveform.d.ts.map +0 -1
  59. package/build/AudioAnalysis/extractWaveform.js +0 -11
  60. package/build/AudioAnalysis/extractWaveform.js.map +0 -1
  61. package/build/AudioRecorder.provider.d.ts +0 -11
  62. package/build/AudioRecorder.provider.d.ts.map +0 -1
  63. package/build/AudioRecorder.provider.js +0 -37
  64. package/build/AudioRecorder.provider.js.map +0 -1
  65. package/build/ExpoAudioStream.native.d.ts +0 -3
  66. package/build/ExpoAudioStream.native.d.ts.map +0 -1
  67. package/build/ExpoAudioStream.native.js +0 -6
  68. package/build/ExpoAudioStream.native.js.map +0 -1
  69. package/build/ExpoAudioStream.types.d.ts +0 -532
  70. package/build/ExpoAudioStream.types.d.ts.map +0 -1
  71. package/build/ExpoAudioStream.types.js +0 -2
  72. package/build/ExpoAudioStream.types.js.map +0 -1
  73. package/build/ExpoAudioStream.web.d.ts +0 -59
  74. package/build/ExpoAudioStream.web.d.ts.map +0 -1
  75. package/build/ExpoAudioStream.web.js +0 -285
  76. package/build/ExpoAudioStream.web.js.map +0 -1
  77. package/build/ExpoAudioStreamModule.d.ts +0 -3
  78. package/build/ExpoAudioStreamModule.d.ts.map +0 -1
  79. package/build/ExpoAudioStreamModule.js +0 -693
  80. package/build/ExpoAudioStreamModule.js.map +0 -1
  81. package/build/WebRecorder.web.d.ts +0 -119
  82. package/build/WebRecorder.web.d.ts.map +0 -1
  83. package/build/WebRecorder.web.js +0 -436
  84. package/build/WebRecorder.web.js.map +0 -1
  85. package/build/constants.d.ts +0 -11
  86. package/build/constants.d.ts.map +0 -1
  87. package/build/constants.js +0 -14
  88. package/build/constants.js.map +0 -1
  89. package/build/events.d.ts +0 -26
  90. package/build/events.d.ts.map +0 -1
  91. package/build/events.js +0 -21
  92. package/build/events.js.map +0 -1
  93. package/build/index.d.ts.map +0 -1
  94. package/build/index.js.map +0 -1
  95. package/build/trimAudio.d.ts +0 -25
  96. package/build/trimAudio.d.ts.map +0 -1
  97. package/build/trimAudio.js +0 -67
  98. package/build/trimAudio.js.map +0 -1
  99. package/build/useAudioRecorder.d.ts +0 -21
  100. package/build/useAudioRecorder.d.ts.map +0 -1
  101. package/build/useAudioRecorder.js +0 -427
  102. package/build/useAudioRecorder.js.map +0 -1
  103. package/build/utils/BlobFix.d.ts +0 -9
  104. package/build/utils/BlobFix.d.ts.map +0 -1
  105. package/build/utils/BlobFix.js +0 -498
  106. package/build/utils/BlobFix.js.map +0 -1
  107. package/build/utils/audioProcessing.d.ts +0 -24
  108. package/build/utils/audioProcessing.d.ts.map +0 -1
  109. package/build/utils/audioProcessing.js +0 -133
  110. package/build/utils/audioProcessing.js.map +0 -1
  111. package/build/utils/concatenateBuffers.d.ts +0 -8
  112. package/build/utils/concatenateBuffers.d.ts.map +0 -1
  113. package/build/utils/concatenateBuffers.js +0 -21
  114. package/build/utils/concatenateBuffers.js.map +0 -1
  115. package/build/utils/convertPCMToFloat32.d.ts +0 -13
  116. package/build/utils/convertPCMToFloat32.d.ts.map +0 -1
  117. package/build/utils/convertPCMToFloat32.js +0 -120
  118. package/build/utils/convertPCMToFloat32.js.map +0 -1
  119. package/build/utils/encodingToBitDepth.d.ts +0 -5
  120. package/build/utils/encodingToBitDepth.d.ts.map +0 -1
  121. package/build/utils/encodingToBitDepth.js +0 -13
  122. package/build/utils/encodingToBitDepth.js.map +0 -1
  123. package/build/utils/getWavFileInfo.d.ts +0 -26
  124. package/build/utils/getWavFileInfo.d.ts.map +0 -1
  125. package/build/utils/getWavFileInfo.js +0 -92
  126. package/build/utils/getWavFileInfo.js.map +0 -1
  127. package/build/utils/writeWavHeader.d.ts +0 -49
  128. package/build/utils/writeWavHeader.d.ts.map +0 -1
  129. package/build/utils/writeWavHeader.js +0 -91
  130. package/build/utils/writeWavHeader.js.map +0 -1
  131. package/build/workers/InlineFeaturesExtractor.web.d.ts +0 -2
  132. package/build/workers/InlineFeaturesExtractor.web.d.ts.map +0 -1
  133. package/build/workers/InlineFeaturesExtractor.web.js +0 -828
  134. package/build/workers/InlineFeaturesExtractor.web.js.map +0 -1
  135. package/build/workers/inlineAudioWebWorker.web.d.ts +0 -2
  136. package/build/workers/inlineAudioWebWorker.web.d.ts.map +0 -1
  137. package/build/workers/inlineAudioWebWorker.web.js +0 -157
  138. package/build/workers/inlineAudioWebWorker.web.js.map +0 -1
  139. package/expo-module.config.json +0 -9
  140. package/ios/AudioAnalysisData.swift +0 -74
  141. package/ios/AudioNotificationManager.swift +0 -135
  142. package/ios/AudioProcessingHelpers.swift +0 -743
  143. package/ios/AudioProcessor.swift +0 -1313
  144. package/ios/AudioStreamError.swift +0 -7
  145. package/ios/AudioStreamManager.swift +0 -1708
  146. package/ios/AudioStreamManagerDelegate.swift +0 -16
  147. package/ios/DataPoint.swift +0 -54
  148. package/ios/DecodingConfig.swift +0 -47
  149. package/ios/ExpoAudioStream.podspec +0 -27
  150. package/ios/ExpoAudioStreamModule.swift +0 -805
  151. package/ios/FFT.swift +0 -62
  152. package/ios/Features.swift +0 -95
  153. package/ios/Logger.swift +0 -7
  154. package/ios/NotificationExtension.swift +0 -15
  155. package/ios/RecordingResult.swift +0 -22
  156. package/ios/RecordingSettings.swift +0 -265
  157. package/ios/WaveformExtractor.swift +0 -105
  158. package/plugin/build/index.d.ts +0 -21
  159. package/plugin/build/index.js +0 -191
  160. package/plugin/src/index.ts +0 -278
  161. package/plugin/tsconfig.json +0 -10
  162. package/plugin/tsconfig.tsbuildinfo +0 -1
  163. package/src/AudioAnalysis/AudioAnalysis.types.ts +0 -202
  164. package/src/AudioAnalysis/extractAudioAnalysis.ts +0 -333
  165. package/src/AudioAnalysis/extractAudioData.ts +0 -6
  166. package/src/AudioAnalysis/extractMelSpectrogram.ts +0 -144
  167. package/src/AudioAnalysis/extractPreview.ts +0 -34
  168. package/src/AudioAnalysis/extractWaveform.ts +0 -22
  169. package/src/AudioRecorder.provider.tsx +0 -54
  170. package/src/ExpoAudioStream.native.ts +0 -6
  171. package/src/ExpoAudioStream.types.ts +0 -641
  172. package/src/ExpoAudioStream.web.ts +0 -359
  173. package/src/ExpoAudioStreamModule.ts +0 -967
  174. package/src/WebRecorder.web.ts +0 -580
  175. package/src/constants.ts +0 -18
  176. package/src/events.ts +0 -60
  177. package/src/trimAudio.ts +0 -90
  178. package/src/useAudioRecorder.tsx +0 -620
  179. package/src/utils/BlobFix.ts +0 -559
  180. package/src/utils/audioProcessing.ts +0 -205
  181. package/src/utils/concatenateBuffers.ts +0 -24
  182. package/src/utils/convertPCMToFloat32.ts +0 -170
  183. package/src/utils/encodingToBitDepth.ts +0 -18
  184. package/src/utils/getWavFileInfo.ts +0 -132
  185. package/src/utils/writeWavHeader.ts +0 -114
  186. package/src/workers/InlineFeaturesExtractor.web.tsx +0 -827
  187. package/src/workers/inlineAudioWebWorker.web.tsx +0 -156
package/README.md CHANGED
@@ -1,5 +1,30 @@
1
1
  # @siteed/expo-audio-stream
2
2
 
3
+ > ## ⚠️ Package Renamed
4
+ >
5
+ > **This package has been renamed to [@siteed/expo-audio-studio](https://www.npmjs.com/package/@siteed/expo-audio-studio) to better reflect its expanded capabilities beyond just audio streaming.**
6
+ >
7
+ > While this package will continue to work as a compatibility wrapper, we recommend migrating to the new package name for future updates and improvements.
8
+ >
9
+ > ```bash
10
+ > # Install the new package
11
+ > npm install @siteed/expo-audio-studio
12
+ >
13
+ > # or with yarn
14
+ > yarn add @siteed/expo-audio-studio
15
+ > ```
16
+ >
17
+ > **All imports should be updated from:**
18
+ > ```typescript
19
+ > import { ... } from '@siteed/expo-audio-stream';
20
+ > ```
21
+ > **To:**
22
+ > ```typescript
23
+ > import { ... } from '@siteed/expo-audio-studio';
24
+ > ```
25
+ >
26
+ > The API remains identical, so this is the only change required.
27
+
3
28
  [![kandi X-Ray](https://kandi.openweaver.com/badges/xray.svg)](https://kandi.openweaver.com/typescript/siteed/expo-audio-stream)
4
29
  [![Version](https://img.shields.io/npm/v/@siteed/expo-audio-stream.svg)](https://www.npmjs.com/package/@siteed/expo-audio-stream)
5
30
  [![Dependency Status](https://img.shields.io/npm/dt/@siteed/expo-audio-stream.svg)](https://www.npmjs.com/package/@siteed/expo-audio-stream)
@@ -7,7 +32,7 @@
7
32
 
8
33
  <div align="center">
9
34
  <p align="center">
10
- <strong>Comprehensive library designed to facilitate real-time audio processing and streaming across iOS, Android, and web platforms, with support for dual-stream recording and audio compression.</strong>
35
+ <strong>This package now serves as a compatibility wrapper for @siteed/expo-audio-studio.</strong>
11
36
  </p>
12
37
 
13
38
  <div style="display: flex; justify-content: center; gap: 20px; margin: 30px 0;">
@@ -31,233 +56,26 @@
31
56
  **Give it a GitHub star 🌟, if you found this repo useful.**
32
57
  [![GitHub stars](https://img.shields.io/github/stars/deeeed/expo-audio-stream.svg?style=social&label=Star&maxAge=2592000)](https://github.com/deeeed/expo-audio-stream)
33
58
 
34
- ## Features
35
-
36
- - Real-time audio streaming across iOS, Android, and web.
37
- - Dual-stream recording capabilities:
38
- - Simultaneous raw PCM and compressed audio recording
39
- - Compression formats: OPUS or AAC
40
- - Configurable bitrate for compressed audio
41
- - Optimized storage for both high-quality and compressed formats
42
- - Intelligent interruption handling:
43
- - Automatic pause/resume during phone calls
44
- - Configurable automatic resumption
45
- - Detailed interruption event callbacks
46
- - Configurable intervals for audio buffer receipt.
47
- - Automated microphone permissions setup in managed Expo projects.
48
- - Background audio recording on iOS.
49
- - Audio features extraction during recording.
50
- - Consistent WAV PCM recording format across all platforms.
51
- - Keep recording active while app is in background
52
- - Rich notification system for recording status:
53
- - Android: Live waveform visualization in notifications
54
- - Android: Fully customizable notification appearance and actions
55
- - iOS: Media player integration
56
- - Advanced audio analysis capabilities:
57
- - Mel spectrogram generation for machine learning and visualization
58
- - Comprehensive audio feature extraction (MFCC, spectral features, etc.)
59
- - Lightweight waveform preview generation
60
- - Precision audio manipulation:
61
- - Advanced audio splitting and trimming API
62
- - Support for trimming multiple segments in a single operation
63
- - Ability to keep or remove specific time ranges
64
- - Complete ecosystem:
65
- - Full-featured AudioPlayground application showcasing advanced API usage
66
- - Ready-to-use UI components via [@siteed/expo-audio-ui](https://github.com/deeeed/expo-audio-stream/tree/main/packages/expo-audio-ui) package
67
- - Visualizations, waveforms, and audio controls that can be directly incorporated into your app
68
-
69
- ## Audio Analysis Features
70
-
71
- Extract powerful audio features for advanced audio processing and visualization:
72
-
73
- ```typescript
74
- // Extract audio analysis with specific features enabled
75
- const analysis = await extractAudioAnalysis({
76
- fileUri: 'path/to/recording.wav',
77
- features: {
78
- energy: true, // Overall energy of the audio
79
- rms: true, // Root mean square (amplitude)
80
- zcr: true, // Zero-crossing rate
81
- mfcc: true, // Mel-frequency cepstral coefficients
82
- spectralCentroid: true, // Brightness of sound
83
- tempo: true, // Estimated BPM
84
- }
85
- });
86
- ```
87
-
88
- ### Available Audio Features
89
-
90
- - **Basic Analysis**: RMS, energy, amplitude range, zero-crossing rate
91
- - **Spectral Features**: Spectral centroid, flatness, rolloff, bandwidth
92
- - **Advanced Analysis**:
93
- - MFCC (Mel-frequency cepstral coefficients)
94
- - Chromagram (pitch class representation)
95
- - Mel Spectrogram
96
- - Harmonics-to-noise ratio
97
- - Tempo estimation
98
- - Pitch detection
99
-
100
- ### Use Cases
101
-
102
- - Visualize audio waveforms with detailed metrics
103
- - Implement speech recognition preprocessing
104
- - Create music analysis applications
105
- - Build audio fingerprinting systems
106
- - Develop voice activity detection
107
-
108
- ## API Overview
109
-
110
- The library provides several specialized APIs for different audio processing needs:
111
-
112
- ### Recording and Playback
113
-
114
- - **useAudioRecorder**: Hook for recording audio with configurable quality settings
115
- - **AudioRecorderProvider**: Context provider for sharing recording state across components
116
- - **useSharedAudioRecorder**: Hook to access shared recording state from any component
117
-
118
- ```typescript
119
- // Start a new recording with configuration
120
- const { startRecording, stopRecording, isRecording, recordingUri } = useAudioRecorder({
121
- audioQuality: 'high',
122
- sampleRate: 44100,
123
- numberOfChannels: 2,
124
- bitDepth: 16,
125
- outputFormat: 'wav',
126
- });
127
-
128
- // Share recording state across components
129
- const AudioApp = () => (
130
- <AudioRecorderProvider>
131
- <RecordButton />
132
- <AudioVisualizer />
133
- </AudioRecorderProvider>
134
- );
135
- ```
136
-
137
- ### Audio Analysis
138
-
139
- - **extractAudioAnalysis**: Extract comprehensive audio features for detailed analysis
140
- - **extractPreview**: Generate lightweight waveform data for visualization
141
- - **extractAudioData**: Extract raw PCM data for custom processing
142
- - **extractRawWavAnalysis**: Analyze WAV files without decoding, preserving original PCM values
143
-
144
- ```typescript
145
- // Extract detailed audio analysis with feature extraction
146
- const analysis = await extractAudioAnalysis({
147
- fileUri: 'path/to/recording.wav',
148
- features: { rms: true, zcr: true, mfcc: true }
149
- });
150
-
151
- // Generate a lightweight waveform preview
152
- const preview = await extractPreview({
153
- fileUri: 'path/to/recording.wav',
154
- pointsPerSecond: 50
155
- });
156
-
157
- // Extract raw PCM data for custom processing
158
- const audioData = await extractAudioData({
159
- fileUri: 'path/to/recording.wav',
160
- includeWavHeader: true
161
- });
162
- ```
163
-
164
- #### Choosing the Right Audio Analysis Method
165
-
166
- | Method | Purpose | Performance | Use When |
167
- |--------|---------|-------------|----------|
168
- | `extractAudioAnalysis` | Comprehensive audio feature extraction | Medium-Heavy | You need detailed audio features like MFCC, spectral features |
169
- | `extractPreview` | Lightweight waveform visualization | Very Light | You only need amplitude data for visualization |
170
- | `extractAudioData` | Raw PCM data extraction | Medium | You need the raw audio data for custom processing |
171
- | `extractRawWavAnalysis` | WAV analysis without decoding | Light | You want to analyze WAV files while preserving original values |
172
- | `extractMelSpectrogram` | Mel spectrogram generation | Heavy | You need frequency-domain representation for ML or visualization |
173
-
174
- ### Specialized Audio Processing
175
-
176
- - **extractMelSpectrogram**: Generate mel spectrogram for audio visualization or ML models
177
- - **trimAudio**: Trim audio files with precision, supporting multiple segments and formats
178
-
179
- ```typescript
180
- // Generate mel spectrogram for audio visualization or ML models
181
- const melSpectrogram = await extractMelSpectrogram({
182
- fileUri: 'path/to/recording.wav',
183
- windowSizeMs: 25,
184
- hopLengthMs: 10,
185
- nMels: 40
186
- });
187
-
188
- // Trim audio files with precision
189
- const trimmedAudio = await trimAudio({
190
- fileUri: 'path/to/recording.wav',
191
- startTimeMs: 1000,
192
- endTimeMs: 5000,
193
- outputFormat: { format: 'wav' }
194
- });
195
-
196
- // Trim multiple segments from an audio file
197
- const compiledAudio = await trimAudio({
198
- fileUri: 'path/to/recording.wav',
199
- mode: 'keep',
200
- ranges: [
201
- { startTimeMs: 1000, endTimeMs: 5000 },
202
- { startTimeMs: 10000, endTimeMs: 15000 }
203
- ]
204
- });
205
- ```
206
-
207
- ### Utility Functions
208
-
209
- - **convertPCMToFloat32**: Convert PCM data to Float32Array for processing
210
- - **getWavFileInfo**: Extract metadata from WAV files
211
- - **writeWavHeader**: Create WAV headers for raw PCM data
212
-
213
- ### Low-Level Access
214
-
215
- For advanced use cases, the library provides direct access to the native module:
216
-
217
- ```typescript
218
- import { ExpoAudioStreamModule } from '@siteed/expo-audio-stream';
219
-
220
- // Access platform-specific functionality
221
- const status = await ExpoAudioStreamModule.status();
222
- const permissions = await ExpoAudioStreamModule.getPermissionsAsync();
223
- ```
224
-
225
- ## Documentation
226
-
227
- For detailed documentation, please refer to the [Getting Started Guide](https://deeeed.github.io/expo-audio-stream/docs/).
228
-
229
- ## Companion Resources
230
-
231
- ### AudioPlayground Application
232
-
233
- The repository includes a complete AudioPlayground application that demonstrates advanced usage of the API. This playground serves as both a demonstration and a learning resource:
234
-
235
- - Interactive examples of all major API features
236
- - Real-time audio visualization and analysis
237
- - Code samples you can directly reference for your own implementation
238
-
239
- Try it online at [https://deeeed.github.io/expo-audio-stream/playground](https://deeeed.github.io/expo-audio-stream/playground) or run it locally from the repository.
59
+ ## Why the name change?
240
60
 
241
- ### UI Components Package
61
+ The library has evolved significantly beyond its initial focus on audio streaming. It now provides a comprehensive suite of audio tools including:
242
62
 
243
- The [@siteed/expo-audio-ui](https://github.com/deeeed/expo-audio-stream/tree/main/packages/expo-audio-ui) package provides ready-to-use UI components for audio applications:
63
+ - Advanced audio recording capabilities
64
+ - Audio analysis and feature extraction
65
+ - Waveform visualization
66
+ - Audio trimming and manipulation
67
+ - Mel spectrogram generation
68
+ - And much more
244
69
 
245
- ```bash
246
- # Install the UI components package
247
- npm install @siteed/expo-audio-ui
70
+ The new name, "Audio Studio," better represents this expanded functionality as a complete audio processing toolkit.
248
71
 
249
- # or with yarn
250
- yarn add @siteed/expo-audio-ui
251
- ```
72
+ ## Migration
252
73
 
253
- This package includes:
254
- - Waveform visualizers
255
- - Audio recording controls
256
- - Playback components
257
- - Spectrogram displays
258
- - And more!
74
+ The migration process is simple:
259
75
 
260
- All components are built with React Native, Reanimated, and Skia for optimal performance across platforms.
76
+ 1. Install the new package: `yarn add @siteed/expo-audio-studio`
77
+ 2. Update your imports to use the new package name
78
+ 3. That's it! The API remains identical
261
79
 
262
80
  ## License
263
81
 
package/build/index.d.ts CHANGED
@@ -1,15 +1,11 @@
1
- import { extractRawWavAnalysis, extractAudioAnalysis } from './AudioAnalysis/extractAudioAnalysis';
2
- import { extractAudioData } from './AudioAnalysis/extractAudioData';
3
- import { extractMelSpectrogram } from './AudioAnalysis/extractMelSpectrogram';
4
- import { extractPreview } from './AudioAnalysis/extractPreview';
5
- import { AudioRecorderProvider, useSharedAudioRecorder } from './AudioRecorder.provider';
6
- import ExpoAudioStreamModule from './ExpoAudioStreamModule';
7
- import { trimAudio } from './trimAudio';
8
- import { useAudioRecorder } from './useAudioRecorder';
9
- export * from './utils/convertPCMToFloat32';
10
- export * from './utils/getWavFileInfo';
11
- export * from './utils/writeWavHeader';
12
- export { AudioRecorderProvider, ExpoAudioStreamModule, extractRawWavAnalysis, extractAudioAnalysis, extractPreview, trimAudio, extractAudioData, extractMelSpectrogram, useAudioRecorder, useSharedAudioRecorder, };
13
- export type * from './AudioAnalysis/AudioAnalysis.types';
14
- export type * from './ExpoAudioStream.types';
15
- //# sourceMappingURL=index.d.ts.map
1
+ /**
2
+ * @siteed/expo-audio-stream
3
+ *
4
+ * DEPRECATED: This package has been renamed to @siteed/expo-audio-studio
5
+ * This file serves as a compatibility wrapper that re-exports everything from the new package.
6
+ *
7
+ * Please update your imports to use @siteed/expo-audio-studio directly.
8
+ */
9
+ import * as ExpoAudioStudio from '@siteed/expo-audio-studio';
10
+ export * from '@siteed/expo-audio-studio';
11
+ export default ExpoAudioStudio;
package/build/index.js CHANGED
@@ -1,14 +1,44 @@
1
- // src/index.ts
2
- import { extractRawWavAnalysis, extractAudioAnalysis, } from './AudioAnalysis/extractAudioAnalysis';
3
- import { extractAudioData } from './AudioAnalysis/extractAudioData';
4
- import { extractMelSpectrogram } from './AudioAnalysis/extractMelSpectrogram';
5
- import { extractPreview } from './AudioAnalysis/extractPreview';
6
- import { AudioRecorderProvider, useSharedAudioRecorder, } from './AudioRecorder.provider';
7
- import ExpoAudioStreamModule from './ExpoAudioStreamModule';
8
- import { trimAudio } from './trimAudio';
9
- import { useAudioRecorder } from './useAudioRecorder';
10
- export * from './utils/convertPCMToFloat32';
11
- export * from './utils/getWavFileInfo';
12
- export * from './utils/writeWavHeader';
13
- export { AudioRecorderProvider, ExpoAudioStreamModule, extractRawWavAnalysis, extractAudioAnalysis, extractPreview, trimAudio, extractAudioData, extractMelSpectrogram, useAudioRecorder, useSharedAudioRecorder, };
14
- //# sourceMappingURL=index.js.map
1
+ "use strict";
2
+ /**
3
+ * @siteed/expo-audio-stream
4
+ *
5
+ * DEPRECATED: This package has been renamed to @siteed/expo-audio-studio
6
+ * This file serves as a compatibility wrapper that re-exports everything from the new package.
7
+ *
8
+ * Please update your imports to use @siteed/expo-audio-studio directly.
9
+ */
10
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ var desc = Object.getOwnPropertyDescriptor(m, k);
13
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
14
+ desc = { enumerable: true, get: function() { return m[k]; } };
15
+ }
16
+ Object.defineProperty(o, k2, desc);
17
+ }) : (function(o, m, k, k2) {
18
+ if (k2 === undefined) k2 = k;
19
+ o[k2] = m[k];
20
+ }));
21
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
22
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
23
+ }) : function(o, v) {
24
+ o["default"] = v;
25
+ });
26
+ var __importStar = (this && this.__importStar) || function (mod) {
27
+ if (mod && mod.__esModule) return mod;
28
+ var result = {};
29
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
30
+ __setModuleDefault(result, mod);
31
+ return result;
32
+ };
33
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
34
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
35
+ };
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ const ExpoAudioStudio = __importStar(require("@siteed/expo-audio-studio"));
38
+ // Display deprecation warning
39
+ console.warn('@siteed/expo-audio-stream is deprecated and will be removed in a future version. ' +
40
+ 'Please migrate to @siteed/expo-audio-studio, which provides the same functionality with additional features.');
41
+ // Re-export everything from the new package
42
+ __exportStar(require("@siteed/expo-audio-studio"), exports);
43
+ // For backward compatibility with default imports
44
+ exports.default = ExpoAudioStudio;
package/package.json CHANGED
@@ -1,111 +1,50 @@
1
1
  {
2
- "name": "@siteed/expo-audio-stream",
3
- "version": "2.1.0",
4
- "description": "stream audio crossplatform",
5
- "license": "MIT",
6
- "main": "build/index.js",
7
- "types": "build/index.d.ts",
8
- "author": "Arthur Breton <abreton@siteed.net> (https://github.com/deeeed)",
9
- "homepage": "https://github.com/deeeed/expo-audio-stream/blob/main/packages/expo-audio-stream/README.md",
10
- "repository": {
11
- "type": "git",
12
- "url": "git+https://github.com/deeeed/expo-audio-stream.git",
13
- "directory": "packages/expo-audio-stream"
14
- },
15
- "bugs": {
16
- "url": "https://github.com/deeeed/expo-audio-stream/issues"
17
- },
18
- "keywords": [
19
- "react-native",
20
- "expo",
21
- "expo-audio-stream",
22
- "ExpoAudioStream"
23
- ],
24
- "files": [
25
- "src",
26
- "android",
27
- "ios",
28
- "cpp",
29
- "plugin",
30
- "app.plugin.js",
31
- "LICENSE",
32
- "CHANGELOG.md",
33
- "generated",
34
- "expo-module.config.json",
35
- "README.md",
36
- "package.json",
37
- "*.podspec",
38
- "build",
39
- "!ios/build",
40
- "!android/build",
41
- "!android/gradle",
42
- "!android/gradlew",
43
- "!android/gradlew.bat",
44
- "!android/local.properties",
45
- "!**/__tests__",
46
- "!**/__fixtures__",
47
- "!**/__mocks__",
48
- "!**/.*"
49
- ],
50
- "scripts": {
51
- "build": "tsc",
52
- "build:plugin": "tsc --build plugin/tsconfig.json",
53
- "build:plugin:dev": "expo-module build plugin",
54
- "build:dev": "expo-module build",
55
- "clean": "expo-module clean && rimraf plugin/build",
56
- "lint": "expo-module lint",
57
- "test": "expo-module test",
58
- "typecheck": "tsc --noEmit",
59
- "docgen": "typedoc src/index.ts --plugin typedoc-plugin-markdown --readme none --out ../../documentation_site/docs/api-reference/API",
60
- "prepare": "yarn build && yarn build:plugin",
61
- "prepublishOnly": "expo-module prepublishOnly",
62
- "expo-module": "expo-module",
63
- "open:ios": "open -a \"Xcode\" ../../apps/playground/ios",
64
- "open:android": "open -a \"Android Studio\" ../../apps/playground/android",
65
- "size": "bundle-size && size-limit",
66
- "release": "./publish.sh"
67
- },
68
- "devDependencies": {
69
- "@expo/config-plugins": "~9.0.0",
70
- "@siteed/publisher": "^0.4.18",
71
- "@size-limit/preset-big-lib": "^11.1.4",
72
- "@types/jest": "^29.5.12",
73
- "@types/node": "^20.12.7",
74
- "@types/react": "~18.3.12",
75
- "@typescript-eslint/eslint-plugin": "^7.7.0",
76
- "@typescript-eslint/parser": "^7.7.0",
77
- "bundle-size": "^1.1.5",
78
- "eslint": "^8.56.0",
79
- "eslint-config-prettier": "^9.1.0",
80
- "eslint-config-universe": "^12.0.0",
81
- "eslint-plugin-import": "^2.29.1",
82
- "eslint-plugin-prettier": "^5.1.3",
83
- "eslint-plugin-promise": "^6.1.1",
84
- "eslint-plugin-react": "^7.34.1",
85
- "expo": "^52.0.27",
86
- "expo-module-scripts": "^4.0.2",
87
- "jest": "^29.7.0",
88
- "prettier": "^3.2.5",
89
- "react-native": "0.76.6",
90
- "rimraf": "^6.0.1",
91
- "size-limit": "^11.1.4",
92
- "ts-node": "^10.9.2",
93
- "typedoc": "^0.27.4",
94
- "typedoc-plugin-markdown": "^4.3.2",
95
- "typescript": "~5.3.3"
96
- },
97
- "peerDependencies": {
98
- "expo": "*",
99
- "react": "*",
100
- "react-native": "*"
101
- },
102
- "publishConfig": {
103
- "access": "public",
104
- "registry": "https://registry.npmjs.org"
105
- },
106
- "dependencies": {
107
- "@siteed/design-system": "^0.35.1",
108
- "crc-32": "^1.2.2",
109
- "expo-modules-core": "~2.1.4"
110
- }
111
- }
2
+ "name": "@siteed/expo-audio-stream",
3
+ "version": "2.2.0",
4
+ "description": "DEPRECATED: Use @siteed/expo-audio-studio instead. This package now serves as a compatibility wrapper.",
5
+ "license": "MIT",
6
+ "main": "build/index.js",
7
+ "types": "build/index.d.ts",
8
+ "author": "Arthur Breton <abreton@siteed.net> (https://github.com/deeeed)",
9
+ "homepage": "https://github.com/deeeed/expo-audio-stream/blob/main/packages/expo-audio-stream/README.md",
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "git+https://github.com/deeeed/expo-audio-stream.git",
13
+ "directory": "packages/expo-audio-stream"
14
+ },
15
+ "bugs": {
16
+ "url": "https://github.com/deeeed/expo-audio-stream/issues"
17
+ },
18
+ "keywords": [
19
+ "react-native",
20
+ "expo",
21
+ "audio",
22
+ "deprecated"
23
+ ],
24
+ "files": [
25
+ "src",
26
+ "build",
27
+ "LICENSE",
28
+ "README.md",
29
+ "package.json"
30
+ ],
31
+ "scripts": {
32
+ "build": "tsc",
33
+ "prepare": "yarn build"
34
+ },
35
+ "peerDependencies": {
36
+ "expo": "*",
37
+ "react": "*",
38
+ "react-native": "*"
39
+ },
40
+ "publishConfig": {
41
+ "access": "public",
42
+ "registry": "https://registry.npmjs.org"
43
+ },
44
+ "dependencies": {
45
+ "@siteed/expo-audio-studio": "2.1.1"
46
+ },
47
+ "devDependencies": {
48
+ "typescript": "~5.3.3"
49
+ }
50
+ }
package/src/index.ts CHANGED
@@ -1,36 +1,22 @@
1
- // src/index.ts
1
+ /**
2
+ * @siteed/expo-audio-stream
3
+ *
4
+ * DEPRECATED: This package has been renamed to @siteed/expo-audio-studio
5
+ * This file serves as a compatibility wrapper that re-exports everything from the new package.
6
+ *
7
+ * Please update your imports to use @siteed/expo-audio-studio directly.
8
+ */
2
9
 
3
- import {
4
- extractRawWavAnalysis,
5
- extractAudioAnalysis,
6
- } from './AudioAnalysis/extractAudioAnalysis'
7
- import { extractAudioData } from './AudioAnalysis/extractAudioData'
8
- import { extractMelSpectrogram } from './AudioAnalysis/extractMelSpectrogram'
9
- import { extractPreview } from './AudioAnalysis/extractPreview'
10
- import {
11
- AudioRecorderProvider,
12
- useSharedAudioRecorder,
13
- } from './AudioRecorder.provider'
14
- import ExpoAudioStreamModule from './ExpoAudioStreamModule'
15
- import { trimAudio } from './trimAudio'
16
- import { useAudioRecorder } from './useAudioRecorder'
10
+ import * as ExpoAudioStudio from '@siteed/expo-audio-studio';
17
11
 
18
- export * from './utils/convertPCMToFloat32'
19
- export * from './utils/getWavFileInfo'
20
- export * from './utils/writeWavHeader'
12
+ // Display deprecation warning
13
+ console.warn(
14
+ '@siteed/expo-audio-stream is deprecated and will be removed in a future version. ' +
15
+ 'Please migrate to @siteed/expo-audio-studio, which provides the same functionality with additional features.'
16
+ );
21
17
 
22
- export {
23
- AudioRecorderProvider,
24
- ExpoAudioStreamModule,
25
- extractRawWavAnalysis,
26
- extractAudioAnalysis,
27
- extractPreview,
28
- trimAudio,
29
- extractAudioData,
30
- extractMelSpectrogram,
31
- useAudioRecorder,
32
- useSharedAudioRecorder,
33
- }
18
+ // Re-export everything from the new package
19
+ export * from '@siteed/expo-audio-studio';
34
20
 
35
- export type * from './AudioAnalysis/AudioAnalysis.types'
36
- export type * from './ExpoAudioStream.types'
21
+ // For backward compatibility with default imports
22
+ export default ExpoAudioStudio;