@siteed/expo-audio-stream 2.1.0 → 2.2.1-beta.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 (189) hide show
  1. package/README.md +23 -260
  2. package/build/index.d.ts +11 -15
  3. package/build/index.js +54 -14
  4. package/build/src/index.d.ts +11 -0
  5. package/build/src/index.js +54 -0
  6. package/package.json +49 -110
  7. package/src/index.ts +18 -32
  8. package/CHANGELOG.md +0 -206
  9. package/android/build.gradle +0 -105
  10. package/android/src/main/AndroidManifest.xml +0 -27
  11. package/android/src/main/java/net/siteed/audiostream/AudioAnalysisData.kt +0 -166
  12. package/android/src/main/java/net/siteed/audiostream/AudioDataEncoder.kt +0 -9
  13. package/android/src/main/java/net/siteed/audiostream/AudioFileHandler.kt +0 -131
  14. package/android/src/main/java/net/siteed/audiostream/AudioFormatUtils.kt +0 -103
  15. package/android/src/main/java/net/siteed/audiostream/AudioNotificationsManager.kt +0 -435
  16. package/android/src/main/java/net/siteed/audiostream/AudioProcessor.kt +0 -2235
  17. package/android/src/main/java/net/siteed/audiostream/AudioRecorderManager.kt +0 -1437
  18. package/android/src/main/java/net/siteed/audiostream/AudioRecordingService.kt +0 -152
  19. package/android/src/main/java/net/siteed/audiostream/AudioTrimmer.kt +0 -1099
  20. package/android/src/main/java/net/siteed/audiostream/Constants.kt +0 -21
  21. package/android/src/main/java/net/siteed/audiostream/EventSender.kt +0 -7
  22. package/android/src/main/java/net/siteed/audiostream/ExpoAudioStreamModule.kt +0 -739
  23. package/android/src/main/java/net/siteed/audiostream/FFT.kt +0 -99
  24. package/android/src/main/java/net/siteed/audiostream/Features.kt +0 -98
  25. package/android/src/main/java/net/siteed/audiostream/NotificationConfig.kt +0 -70
  26. package/android/src/main/java/net/siteed/audiostream/PermissionUtils.kt +0 -59
  27. package/android/src/main/java/net/siteed/audiostream/RecordingActionReceiver.kt +0 -59
  28. package/android/src/main/java/net/siteed/audiostream/RecordingConfig.kt +0 -205
  29. package/android/src/main/java/net/siteed/audiostream/WaveformConfig.kt +0 -19
  30. package/android/src/main/java/net/siteed/audiostream/WaveformRenderer.kt +0 -159
  31. package/android/src/main/res/drawable/ic_default_action_icon.xml +0 -16
  32. package/android/src/main/res/drawable/ic_microphone.xml +0 -13
  33. package/android/src/main/res/drawable/ic_pause.xml +0 -10
  34. package/android/src/main/res/drawable/ic_play.xml +0 -10
  35. package/android/src/main/res/drawable/ic_stop.xml +0 -10
  36. package/android/src/main/res/layout/notification_recording.xml +0 -37
  37. package/android/src/main/test/java/net/siteed/audiostream/AudioProcessorTest.kt +0 -56
  38. package/app.plugin.js +0 -1
  39. package/build/AudioAnalysis/AudioAnalysis.types.d.ts +0 -179
  40. package/build/AudioAnalysis/AudioAnalysis.types.d.ts.map +0 -1
  41. package/build/AudioAnalysis/AudioAnalysis.types.js +0 -3
  42. package/build/AudioAnalysis/AudioAnalysis.types.js.map +0 -1
  43. package/build/AudioAnalysis/extractAudioAnalysis.d.ts +0 -68
  44. package/build/AudioAnalysis/extractAudioAnalysis.d.ts.map +0 -1
  45. package/build/AudioAnalysis/extractAudioAnalysis.js +0 -203
  46. package/build/AudioAnalysis/extractAudioAnalysis.js.map +0 -1
  47. package/build/AudioAnalysis/extractAudioData.d.ts +0 -3
  48. package/build/AudioAnalysis/extractAudioData.d.ts.map +0 -1
  49. package/build/AudioAnalysis/extractAudioData.js +0 -5
  50. package/build/AudioAnalysis/extractAudioData.js.map +0 -1
  51. package/build/AudioAnalysis/extractMelSpectrogram.d.ts +0 -14
  52. package/build/AudioAnalysis/extractMelSpectrogram.d.ts.map +0 -1
  53. package/build/AudioAnalysis/extractMelSpectrogram.js +0 -85
  54. package/build/AudioAnalysis/extractMelSpectrogram.js.map +0 -1
  55. package/build/AudioAnalysis/extractPreview.d.ts +0 -11
  56. package/build/AudioAnalysis/extractPreview.d.ts.map +0 -1
  57. package/build/AudioAnalysis/extractPreview.js +0 -25
  58. package/build/AudioAnalysis/extractPreview.js.map +0 -1
  59. package/build/AudioAnalysis/extractWaveform.d.ts +0 -8
  60. package/build/AudioAnalysis/extractWaveform.d.ts.map +0 -1
  61. package/build/AudioAnalysis/extractWaveform.js +0 -11
  62. package/build/AudioAnalysis/extractWaveform.js.map +0 -1
  63. package/build/AudioRecorder.provider.d.ts +0 -11
  64. package/build/AudioRecorder.provider.d.ts.map +0 -1
  65. package/build/AudioRecorder.provider.js +0 -37
  66. package/build/AudioRecorder.provider.js.map +0 -1
  67. package/build/ExpoAudioStream.native.d.ts +0 -3
  68. package/build/ExpoAudioStream.native.d.ts.map +0 -1
  69. package/build/ExpoAudioStream.native.js +0 -6
  70. package/build/ExpoAudioStream.native.js.map +0 -1
  71. package/build/ExpoAudioStream.types.d.ts +0 -532
  72. package/build/ExpoAudioStream.types.d.ts.map +0 -1
  73. package/build/ExpoAudioStream.types.js +0 -2
  74. package/build/ExpoAudioStream.types.js.map +0 -1
  75. package/build/ExpoAudioStream.web.d.ts +0 -59
  76. package/build/ExpoAudioStream.web.d.ts.map +0 -1
  77. package/build/ExpoAudioStream.web.js +0 -285
  78. package/build/ExpoAudioStream.web.js.map +0 -1
  79. package/build/ExpoAudioStreamModule.d.ts +0 -3
  80. package/build/ExpoAudioStreamModule.d.ts.map +0 -1
  81. package/build/ExpoAudioStreamModule.js +0 -693
  82. package/build/ExpoAudioStreamModule.js.map +0 -1
  83. package/build/WebRecorder.web.d.ts +0 -119
  84. package/build/WebRecorder.web.d.ts.map +0 -1
  85. package/build/WebRecorder.web.js +0 -436
  86. package/build/WebRecorder.web.js.map +0 -1
  87. package/build/constants.d.ts +0 -11
  88. package/build/constants.d.ts.map +0 -1
  89. package/build/constants.js +0 -14
  90. package/build/constants.js.map +0 -1
  91. package/build/events.d.ts +0 -26
  92. package/build/events.d.ts.map +0 -1
  93. package/build/events.js +0 -21
  94. package/build/events.js.map +0 -1
  95. package/build/index.d.ts.map +0 -1
  96. package/build/index.js.map +0 -1
  97. package/build/trimAudio.d.ts +0 -25
  98. package/build/trimAudio.d.ts.map +0 -1
  99. package/build/trimAudio.js +0 -67
  100. package/build/trimAudio.js.map +0 -1
  101. package/build/useAudioRecorder.d.ts +0 -21
  102. package/build/useAudioRecorder.d.ts.map +0 -1
  103. package/build/useAudioRecorder.js +0 -427
  104. package/build/useAudioRecorder.js.map +0 -1
  105. package/build/utils/BlobFix.d.ts +0 -9
  106. package/build/utils/BlobFix.d.ts.map +0 -1
  107. package/build/utils/BlobFix.js +0 -498
  108. package/build/utils/BlobFix.js.map +0 -1
  109. package/build/utils/audioProcessing.d.ts +0 -24
  110. package/build/utils/audioProcessing.d.ts.map +0 -1
  111. package/build/utils/audioProcessing.js +0 -133
  112. package/build/utils/audioProcessing.js.map +0 -1
  113. package/build/utils/concatenateBuffers.d.ts +0 -8
  114. package/build/utils/concatenateBuffers.d.ts.map +0 -1
  115. package/build/utils/concatenateBuffers.js +0 -21
  116. package/build/utils/concatenateBuffers.js.map +0 -1
  117. package/build/utils/convertPCMToFloat32.d.ts +0 -13
  118. package/build/utils/convertPCMToFloat32.d.ts.map +0 -1
  119. package/build/utils/convertPCMToFloat32.js +0 -120
  120. package/build/utils/convertPCMToFloat32.js.map +0 -1
  121. package/build/utils/encodingToBitDepth.d.ts +0 -5
  122. package/build/utils/encodingToBitDepth.d.ts.map +0 -1
  123. package/build/utils/encodingToBitDepth.js +0 -13
  124. package/build/utils/encodingToBitDepth.js.map +0 -1
  125. package/build/utils/getWavFileInfo.d.ts +0 -26
  126. package/build/utils/getWavFileInfo.d.ts.map +0 -1
  127. package/build/utils/getWavFileInfo.js +0 -92
  128. package/build/utils/getWavFileInfo.js.map +0 -1
  129. package/build/utils/writeWavHeader.d.ts +0 -49
  130. package/build/utils/writeWavHeader.d.ts.map +0 -1
  131. package/build/utils/writeWavHeader.js +0 -91
  132. package/build/utils/writeWavHeader.js.map +0 -1
  133. package/build/workers/InlineFeaturesExtractor.web.d.ts +0 -2
  134. package/build/workers/InlineFeaturesExtractor.web.d.ts.map +0 -1
  135. package/build/workers/InlineFeaturesExtractor.web.js +0 -828
  136. package/build/workers/InlineFeaturesExtractor.web.js.map +0 -1
  137. package/build/workers/inlineAudioWebWorker.web.d.ts +0 -2
  138. package/build/workers/inlineAudioWebWorker.web.d.ts.map +0 -1
  139. package/build/workers/inlineAudioWebWorker.web.js +0 -157
  140. package/build/workers/inlineAudioWebWorker.web.js.map +0 -1
  141. package/expo-module.config.json +0 -9
  142. package/ios/AudioAnalysisData.swift +0 -74
  143. package/ios/AudioNotificationManager.swift +0 -135
  144. package/ios/AudioProcessingHelpers.swift +0 -743
  145. package/ios/AudioProcessor.swift +0 -1313
  146. package/ios/AudioStreamError.swift +0 -7
  147. package/ios/AudioStreamManager.swift +0 -1708
  148. package/ios/AudioStreamManagerDelegate.swift +0 -16
  149. package/ios/DataPoint.swift +0 -54
  150. package/ios/DecodingConfig.swift +0 -47
  151. package/ios/ExpoAudioStream.podspec +0 -27
  152. package/ios/ExpoAudioStreamModule.swift +0 -805
  153. package/ios/FFT.swift +0 -62
  154. package/ios/Features.swift +0 -95
  155. package/ios/Logger.swift +0 -7
  156. package/ios/NotificationExtension.swift +0 -15
  157. package/ios/RecordingResult.swift +0 -22
  158. package/ios/RecordingSettings.swift +0 -265
  159. package/ios/WaveformExtractor.swift +0 -105
  160. package/plugin/build/index.d.ts +0 -21
  161. package/plugin/build/index.js +0 -191
  162. package/plugin/src/index.ts +0 -278
  163. package/plugin/tsconfig.json +0 -10
  164. package/plugin/tsconfig.tsbuildinfo +0 -1
  165. package/src/AudioAnalysis/AudioAnalysis.types.ts +0 -202
  166. package/src/AudioAnalysis/extractAudioAnalysis.ts +0 -333
  167. package/src/AudioAnalysis/extractAudioData.ts +0 -6
  168. package/src/AudioAnalysis/extractMelSpectrogram.ts +0 -144
  169. package/src/AudioAnalysis/extractPreview.ts +0 -34
  170. package/src/AudioAnalysis/extractWaveform.ts +0 -22
  171. package/src/AudioRecorder.provider.tsx +0 -54
  172. package/src/ExpoAudioStream.native.ts +0 -6
  173. package/src/ExpoAudioStream.types.ts +0 -641
  174. package/src/ExpoAudioStream.web.ts +0 -359
  175. package/src/ExpoAudioStreamModule.ts +0 -967
  176. package/src/WebRecorder.web.ts +0 -580
  177. package/src/constants.ts +0 -18
  178. package/src/events.ts +0 -60
  179. package/src/trimAudio.ts +0 -90
  180. package/src/useAudioRecorder.tsx +0 -620
  181. package/src/utils/BlobFix.ts +0 -559
  182. package/src/utils/audioProcessing.ts +0 -205
  183. package/src/utils/concatenateBuffers.ts +0 -24
  184. package/src/utils/convertPCMToFloat32.ts +0 -170
  185. package/src/utils/encodingToBitDepth.ts +0 -18
  186. package/src/utils/getWavFileInfo.ts +0 -132
  187. package/src/utils/writeWavHeader.ts +0 -114
  188. package/src/workers/InlineFeaturesExtractor.web.tsx +0 -827
  189. package/src/workers/inlineAudioWebWorker.web.tsx +0 -156
package/README.md CHANGED
@@ -1,267 +1,30 @@
1
1
  # @siteed/expo-audio-stream
2
2
 
3
- [![kandi X-Ray](https://kandi.openweaver.com/badges/xray.svg)](https://kandi.openweaver.com/typescript/siteed/expo-audio-stream)
4
- [![Version](https://img.shields.io/npm/v/@siteed/expo-audio-stream.svg)](https://www.npmjs.com/package/@siteed/expo-audio-stream)
5
- [![Dependency Status](https://img.shields.io/npm/dt/@siteed/expo-audio-stream.svg)](https://www.npmjs.com/package/@siteed/expo-audio-stream)
6
- [![License](https://img.shields.io/npm/l/@siteed/expo-audio-stream.svg)](https://www.npmjs.com/package/@siteed/expo-audio-stream)
7
-
8
- <div align="center">
9
- <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>
11
- </p>
12
-
13
- <div style="display: flex; justify-content: center; gap: 20px; margin: 30px 0;">
14
- <div>
15
- <h3>iOS Demo</h3>
16
- <img src="../../docs/ios.gif" alt="iOS Demo" width="280" />
17
- </div>
18
- <div>
19
- <h3>Android Demo</h3>
20
- <img src="../../docs/android.gif" alt="Android Demo" width="280" />
21
- </div>
22
- </div>
23
-
24
- <a href="https://deeeed.github.io/expo-audio-stream/playground" style="text-decoration:none;">
25
- <div style="display:inline-block; padding:10px 20px; background-color:#007bff; color:white; border-radius:5px; font-size:16px;">
26
- Try it in the Playground
27
- </div>
28
- </a>
29
- </div>
30
-
31
- **Give it a GitHub star 🌟, if you found this repo useful.**
32
- [![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
-
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.
240
-
241
- ### UI Components Package
242
-
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:
244
-
245
- ```bash
246
- # Install the UI components package
247
- npm install @siteed/expo-audio-ui
248
-
249
- # or with yarn
250
- yarn add @siteed/expo-audio-ui
251
- ```
252
-
253
- This package includes:
254
- - Waveform visualizers
255
- - Audio recording controls
256
- - Playback components
257
- - Spectrogram displays
258
- - And more!
259
-
260
- All components are built with React Native, Reanimated, and Skia for optimal performance across platforms.
3
+ > ## Package Renamed
4
+ >
5
+ > This package has been renamed to **[@siteed/audio-studio](https://www.npmjs.com/package/@siteed/audio-studio)**.
6
+ >
7
+ > `@siteed/expo-audio-stream` is no longer maintained. Please migrate:
8
+ >
9
+ > ```bash
10
+ > yarn remove @siteed/expo-audio-stream
11
+ > yarn add @siteed/audio-studio
12
+ > ```
13
+ >
14
+ > Update your imports:
15
+ > ```typescript
16
+ > // Before
17
+ > import { ... } from '@siteed/expo-audio-stream';
18
+ >
19
+ > // After
20
+ > import { ... } from '@siteed/audio-studio';
21
+ > ```
22
+ >
23
+ > The API is identical. See [MIGRATION.md](../../MIGRATION.md) for full details.
261
24
 
262
25
  ## License
263
26
 
264
- This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
27
+ MIT see [LICENSE](LICENSE).
265
28
 
266
29
  ---
267
- <sub>Created by [Arthur Breton](https://siteed.net) • See more projects at [siteed.net](https://siteed.net)</sub>
30
+ <sub>Created by [Arthur Breton](https://siteed.net)</sub>
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,54 @@
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 () {
27
+ var ownKeys = function(o) {
28
+ ownKeys = Object.getOwnPropertyNames || function (o) {
29
+ var ar = [];
30
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
31
+ return ar;
32
+ };
33
+ return ownKeys(o);
34
+ };
35
+ return function (mod) {
36
+ if (mod && mod.__esModule) return mod;
37
+ var result = {};
38
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
39
+ __setModuleDefault(result, mod);
40
+ return result;
41
+ };
42
+ })();
43
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
44
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
45
+ };
46
+ Object.defineProperty(exports, "__esModule", { value: true });
47
+ const ExpoAudioStudio = __importStar(require("@siteed/expo-audio-studio"));
48
+ // Display deprecation warning
49
+ console.warn('@siteed/expo-audio-stream is deprecated and will be removed in a future version. ' +
50
+ 'Please migrate to @siteed/expo-audio-studio, which provides the same functionality with additional features.');
51
+ // Re-export everything from the new package
52
+ __exportStar(require("@siteed/expo-audio-studio"), exports);
53
+ // For backward compatibility with default imports
54
+ exports.default = ExpoAudioStudio;
@@ -0,0 +1,11 @@
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;
@@ -0,0 +1,54 @@
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 () {
27
+ var ownKeys = function(o) {
28
+ ownKeys = Object.getOwnPropertyNames || function (o) {
29
+ var ar = [];
30
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
31
+ return ar;
32
+ };
33
+ return ownKeys(o);
34
+ };
35
+ return function (mod) {
36
+ if (mod && mod.__esModule) return mod;
37
+ var result = {};
38
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
39
+ __setModuleDefault(result, mod);
40
+ return result;
41
+ };
42
+ })();
43
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
44
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
45
+ };
46
+ Object.defineProperty(exports, "__esModule", { value: true });
47
+ const ExpoAudioStudio = __importStar(require("@siteed/expo-audio-studio"));
48
+ // Display deprecation warning
49
+ console.warn('@siteed/expo-audio-stream is deprecated and will be removed in a future version. ' +
50
+ 'Please migrate to @siteed/expo-audio-studio, which provides the same functionality with additional features.');
51
+ // Re-export everything from the new package
52
+ __exportStar(require("@siteed/expo-audio-studio"), exports);
53
+ // For backward compatibility with default imports
54
+ 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.1-beta.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": "3.2.2-beta.0"
46
+ },
47
+ "devDependencies": {
48
+ "typescript": "~6.0.3"
49
+ }
50
+ }