@siteed/expo-audio-stream 1.1.5 → 1.1.6

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 (298) hide show
  1. package/.eslintrc.js +2 -0
  2. package/.size-limit.json +6 -0
  3. package/.yarn/install-state.gz +0 -0
  4. package/android/.gradle/8.1.1/checksums/checksums.lock +0 -0
  5. package/android/.gradle/8.1.1/dependencies-accessors/dependencies-accessors.lock +0 -0
  6. package/android/.gradle/8.1.1/dependencies-accessors/gc.properties +0 -0
  7. package/android/.gradle/8.1.1/fileChanges/last-build.bin +0 -0
  8. package/android/.gradle/8.1.1/fileHashes/fileHashes.lock +0 -0
  9. package/android/.gradle/8.1.1/gc.properties +0 -0
  10. package/android/.gradle/8.9/checksums/checksums.lock +0 -0
  11. package/android/.gradle/8.9/dependencies-accessors/gc.properties +0 -0
  12. package/android/.gradle/8.9/fileChanges/last-build.bin +0 -0
  13. package/android/.gradle/8.9/fileHashes/fileHashes.lock +0 -0
  14. package/android/.gradle/8.9/gc.properties +0 -0
  15. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  16. package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
  17. package/android/.gradle/vcs-1/gc.properties +0 -0
  18. package/android/build/.transforms/10769ccaccd8850af4ffc5504c4368cb/results.bin +1 -0
  19. package/android/build/.transforms/10769ccaccd8850af4ffc5504c4368cb/transformed/debug/debug_dex/net/siteed/audiostream/AudioAnalysisData$AmplitudeRange.dex +0 -0
  20. package/android/build/.transforms/10769ccaccd8850af4ffc5504c4368cb/transformed/debug/debug_dex/net/siteed/audiostream/AudioAnalysisData$SpeakerChange.dex +0 -0
  21. package/android/build/.transforms/10769ccaccd8850af4ffc5504c4368cb/transformed/debug/debug_dex/net/siteed/audiostream/AudioAnalysisData.dex +0 -0
  22. package/android/build/.transforms/10769ccaccd8850af4ffc5504c4368cb/transformed/debug/debug_dex/net/siteed/audiostream/AudioDataEncoder.dex +0 -0
  23. package/android/build/.transforms/10769ccaccd8850af4ffc5504c4368cb/transformed/debug/debug_dex/net/siteed/audiostream/AudioFileHandler.dex +0 -0
  24. package/android/build/.transforms/10769ccaccd8850af4ffc5504c4368cb/transformed/debug/debug_dex/net/siteed/audiostream/AudioFormatUtils.dex +0 -0
  25. package/android/build/.transforms/10769ccaccd8850af4ffc5504c4368cb/transformed/debug/debug_dex/net/siteed/audiostream/AudioProcessor$AudioData.dex +0 -0
  26. package/android/build/.transforms/10769ccaccd8850af4ffc5504c4368cb/transformed/debug/debug_dex/net/siteed/audiostream/AudioProcessor$Companion.dex +0 -0
  27. package/android/build/.transforms/10769ccaccd8850af4ffc5504c4368cb/transformed/debug/debug_dex/net/siteed/audiostream/AudioProcessor$extractMFCC$powerSpectrum$2.dex +0 -0
  28. package/android/build/.transforms/10769ccaccd8850af4ffc5504c4368cb/transformed/debug/debug_dex/net/siteed/audiostream/AudioProcessor.dex +0 -0
  29. package/android/build/.transforms/10769ccaccd8850af4ffc5504c4368cb/transformed/debug/debug_dex/net/siteed/audiostream/AudioRecorderManager.dex +0 -0
  30. package/android/build/.transforms/10769ccaccd8850af4ffc5504c4368cb/transformed/debug/debug_dex/net/siteed/audiostream/BuildConfig.dex +0 -0
  31. package/android/build/.transforms/10769ccaccd8850af4ffc5504c4368cb/transformed/debug/debug_dex/net/siteed/audiostream/Constants.dex +0 -0
  32. package/android/build/.transforms/10769ccaccd8850af4ffc5504c4368cb/transformed/debug/debug_dex/net/siteed/audiostream/DataPoint.dex +0 -0
  33. package/android/build/.transforms/10769ccaccd8850af4ffc5504c4368cb/transformed/debug/debug_dex/net/siteed/audiostream/EventSender.dex +0 -0
  34. package/android/build/.transforms/10769ccaccd8850af4ffc5504c4368cb/transformed/debug/debug_dex/net/siteed/audiostream/ExpoAudioStreamModule$definition$lambda$14$$inlined$AsyncFunction$1.dex +0 -0
  35. package/android/build/.transforms/10769ccaccd8850af4ffc5504c4368cb/transformed/debug/debug_dex/net/siteed/audiostream/ExpoAudioStreamModule$definition$lambda$14$$inlined$AsyncFunction$10.dex +0 -0
  36. package/android/build/.transforms/10769ccaccd8850af4ffc5504c4368cb/transformed/debug/debug_dex/net/siteed/audiostream/ExpoAudioStreamModule$definition$lambda$14$$inlined$AsyncFunction$11.dex +0 -0
  37. package/android/build/.transforms/10769ccaccd8850af4ffc5504c4368cb/transformed/debug/debug_dex/net/siteed/audiostream/ExpoAudioStreamModule$definition$lambda$14$$inlined$AsyncFunction$12.dex +0 -0
  38. package/android/build/.transforms/10769ccaccd8850af4ffc5504c4368cb/transformed/debug/debug_dex/net/siteed/audiostream/ExpoAudioStreamModule$definition$lambda$14$$inlined$AsyncFunction$13.dex +0 -0
  39. package/android/build/.transforms/10769ccaccd8850af4ffc5504c4368cb/transformed/debug/debug_dex/net/siteed/audiostream/ExpoAudioStreamModule$definition$lambda$14$$inlined$AsyncFunction$14.dex +0 -0
  40. package/android/build/.transforms/10769ccaccd8850af4ffc5504c4368cb/transformed/debug/debug_dex/net/siteed/audiostream/ExpoAudioStreamModule$definition$lambda$14$$inlined$AsyncFunction$15.dex +0 -0
  41. package/android/build/.transforms/10769ccaccd8850af4ffc5504c4368cb/transformed/debug/debug_dex/net/siteed/audiostream/ExpoAudioStreamModule$definition$lambda$14$$inlined$AsyncFunction$16.dex +0 -0
  42. package/android/build/.transforms/10769ccaccd8850af4ffc5504c4368cb/transformed/debug/debug_dex/net/siteed/audiostream/ExpoAudioStreamModule$definition$lambda$14$$inlined$AsyncFunction$17.dex +0 -0
  43. package/android/build/.transforms/10769ccaccd8850af4ffc5504c4368cb/transformed/debug/debug_dex/net/siteed/audiostream/ExpoAudioStreamModule$definition$lambda$14$$inlined$AsyncFunction$18.dex +0 -0
  44. package/android/build/.transforms/10769ccaccd8850af4ffc5504c4368cb/transformed/debug/debug_dex/net/siteed/audiostream/ExpoAudioStreamModule$definition$lambda$14$$inlined$AsyncFunction$2.dex +0 -0
  45. package/android/build/.transforms/10769ccaccd8850af4ffc5504c4368cb/transformed/debug/debug_dex/net/siteed/audiostream/ExpoAudioStreamModule$definition$lambda$14$$inlined$AsyncFunction$3.dex +0 -0
  46. package/android/build/.transforms/10769ccaccd8850af4ffc5504c4368cb/transformed/debug/debug_dex/net/siteed/audiostream/ExpoAudioStreamModule$definition$lambda$14$$inlined$AsyncFunction$4.dex +0 -0
  47. package/android/build/.transforms/10769ccaccd8850af4ffc5504c4368cb/transformed/debug/debug_dex/net/siteed/audiostream/ExpoAudioStreamModule$definition$lambda$14$$inlined$AsyncFunction$5.dex +0 -0
  48. package/android/build/.transforms/10769ccaccd8850af4ffc5504c4368cb/transformed/debug/debug_dex/net/siteed/audiostream/ExpoAudioStreamModule$definition$lambda$14$$inlined$AsyncFunction$6.dex +0 -0
  49. package/android/build/.transforms/10769ccaccd8850af4ffc5504c4368cb/transformed/debug/debug_dex/net/siteed/audiostream/ExpoAudioStreamModule$definition$lambda$14$$inlined$AsyncFunction$7.dex +0 -0
  50. package/android/build/.transforms/10769ccaccd8850af4ffc5504c4368cb/transformed/debug/debug_dex/net/siteed/audiostream/ExpoAudioStreamModule$definition$lambda$14$$inlined$AsyncFunction$8.dex +0 -0
  51. package/android/build/.transforms/10769ccaccd8850af4ffc5504c4368cb/transformed/debug/debug_dex/net/siteed/audiostream/ExpoAudioStreamModule$definition$lambda$14$$inlined$AsyncFunction$9.dex +0 -0
  52. package/android/build/.transforms/10769ccaccd8850af4ffc5504c4368cb/transformed/debug/debug_dex/net/siteed/audiostream/ExpoAudioStreamModule$definition$lambda$14$$inlined$AsyncFunctionWithPromise$1.dex +0 -0
  53. package/android/build/.transforms/10769ccaccd8850af4ffc5504c4368cb/transformed/debug/debug_dex/net/siteed/audiostream/ExpoAudioStreamModule$definition$lambda$14$$inlined$AsyncFunctionWithPromise$2.dex +0 -0
  54. package/android/build/.transforms/10769ccaccd8850af4ffc5504c4368cb/transformed/debug/debug_dex/net/siteed/audiostream/ExpoAudioStreamModule$definition$lambda$14$$inlined$AsyncFunctionWithPromise$3.dex +0 -0
  55. package/android/build/.transforms/10769ccaccd8850af4ffc5504c4368cb/transformed/debug/debug_dex/net/siteed/audiostream/ExpoAudioStreamModule$definition$lambda$14$$inlined$AsyncFunctionWithPromise$4.dex +0 -0
  56. package/android/build/.transforms/10769ccaccd8850af4ffc5504c4368cb/transformed/debug/debug_dex/net/siteed/audiostream/ExpoAudioStreamModule$definition$lambda$14$$inlined$FunctionWithoutArgs$1.dex +0 -0
  57. package/android/build/.transforms/10769ccaccd8850af4ffc5504c4368cb/transformed/debug/debug_dex/net/siteed/audiostream/ExpoAudioStreamModule$definition$lambda$14$$inlined$FunctionWithoutArgs$2.dex +0 -0
  58. package/android/build/.transforms/10769ccaccd8850af4ffc5504c4368cb/transformed/debug/debug_dex/net/siteed/audiostream/ExpoAudioStreamModule.dex +0 -0
  59. package/android/build/.transforms/10769ccaccd8850af4ffc5504c4368cb/transformed/debug/debug_dex/net/siteed/audiostream/FFT.dex +0 -0
  60. package/android/build/.transforms/10769ccaccd8850af4ffc5504c4368cb/transformed/debug/debug_dex/net/siteed/audiostream/Features.dex +0 -0
  61. package/android/build/.transforms/10769ccaccd8850af4ffc5504c4368cb/transformed/debug/debug_dex/net/siteed/audiostream/PermissionUtils.dex +0 -0
  62. package/android/build/.transforms/10769ccaccd8850af4ffc5504c4368cb/transformed/debug/debug_dex/net/siteed/audiostream/RecordingConfig.dex +0 -0
  63. package/android/build/.transforms/10769ccaccd8850af4ffc5504c4368cb/transformed/debug/desugar_graph.bin +0 -0
  64. package/android/build/.transforms/7bc0cb35da9eb644120553a3af66f984/results.bin +1 -0
  65. package/android/build/.transforms/7bc0cb35da9eb644120553a3af66f984/transformed/classes/classes_dex/classes.dex +0 -0
  66. package/android/build/.transforms/949f6bd23bdf38f67d1eb7de8f618950/results.bin +1 -0
  67. package/android/build/.transforms/949f6bd23bdf38f67d1eb7de8f618950/transformed/classes/classes_dex/classes.dex +0 -0
  68. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/aapt/AndroidManifest.xml +10 -0
  69. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/aapt/output-metadata.json +18 -0
  70. package/android/build/intermediates/aar_metadata/debug/aar-metadata.properties +6 -0
  71. package/android/build/intermediates/annotation_processor_list/debug/annotationProcessors.json +1 -0
  72. package/android/build/intermediates/compile_library_classes_jar/debug/classes.jar +0 -0
  73. package/android/build/intermediates/compile_r_class_jar/debug/R.jar +0 -0
  74. package/android/build/intermediates/compile_symbol_list/debug/R.txt +0 -0
  75. package/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +1 -0
  76. package/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml +2 -0
  77. package/android/build/intermediates/java_res/debug/out/META-INF/siteed-expo-audio-stream_debug.kotlin_module +0 -0
  78. package/android/build/intermediates/javac/debug/classes/net/siteed/audiostream/BuildConfig.class +0 -0
  79. package/android/build/intermediates/local_only_symbol_list/debug/R-def.txt +2 -0
  80. package/android/build/intermediates/manifest_merge_blame_file/debug/manifest-merger-blame-debug-report.txt +14 -0
  81. package/android/build/intermediates/merged_manifest/debug/AndroidManifest.xml +10 -0
  82. package/android/build/intermediates/navigation_json/debug/navigation.json +1 -0
  83. package/android/build/intermediates/runtime_library_classes_dir/debug/META-INF/siteed-expo-audio-stream_debug.kotlin_module +0 -0
  84. package/android/build/intermediates/runtime_library_classes_dir/debug/net/siteed/audiostream/AudioAnalysisData$AmplitudeRange.class +0 -0
  85. package/android/build/intermediates/runtime_library_classes_dir/debug/net/siteed/audiostream/AudioAnalysisData$SpeakerChange.class +0 -0
  86. package/android/build/intermediates/runtime_library_classes_dir/debug/net/siteed/audiostream/AudioAnalysisData.class +0 -0
  87. package/android/build/intermediates/runtime_library_classes_dir/debug/net/siteed/audiostream/AudioDataEncoder.class +0 -0
  88. package/android/build/intermediates/runtime_library_classes_dir/debug/net/siteed/audiostream/AudioFileHandler.class +0 -0
  89. package/android/build/intermediates/runtime_library_classes_dir/debug/net/siteed/audiostream/AudioFormatUtils.class +0 -0
  90. package/android/build/intermediates/runtime_library_classes_dir/debug/net/siteed/audiostream/AudioProcessor$AudioData.class +0 -0
  91. package/android/build/intermediates/runtime_library_classes_dir/debug/net/siteed/audiostream/AudioProcessor$Companion.class +0 -0
  92. package/android/build/intermediates/runtime_library_classes_dir/debug/net/siteed/audiostream/AudioProcessor$extractMFCC$powerSpectrum$2.class +0 -0
  93. package/android/build/intermediates/runtime_library_classes_dir/debug/net/siteed/audiostream/AudioProcessor.class +0 -0
  94. package/android/build/intermediates/runtime_library_classes_dir/debug/net/siteed/audiostream/AudioRecorderManager.class +0 -0
  95. package/android/build/intermediates/runtime_library_classes_dir/debug/net/siteed/audiostream/BuildConfig.class +0 -0
  96. package/android/build/intermediates/runtime_library_classes_dir/debug/net/siteed/audiostream/Constants.class +0 -0
  97. package/android/build/intermediates/runtime_library_classes_dir/debug/net/siteed/audiostream/DataPoint.class +0 -0
  98. package/android/build/intermediates/runtime_library_classes_dir/debug/net/siteed/audiostream/EventSender.class +0 -0
  99. package/android/build/intermediates/runtime_library_classes_dir/debug/net/siteed/audiostream/ExpoAudioStreamModule$definition$lambda$14$$inlined$AsyncFunction$1.class +0 -0
  100. package/android/build/intermediates/runtime_library_classes_dir/debug/net/siteed/audiostream/ExpoAudioStreamModule$definition$lambda$14$$inlined$AsyncFunction$10.class +0 -0
  101. package/android/build/intermediates/runtime_library_classes_dir/debug/net/siteed/audiostream/ExpoAudioStreamModule$definition$lambda$14$$inlined$AsyncFunction$11.class +0 -0
  102. package/android/build/intermediates/runtime_library_classes_dir/debug/net/siteed/audiostream/ExpoAudioStreamModule$definition$lambda$14$$inlined$AsyncFunction$12.class +0 -0
  103. package/android/build/intermediates/runtime_library_classes_dir/debug/net/siteed/audiostream/ExpoAudioStreamModule$definition$lambda$14$$inlined$AsyncFunction$13.class +0 -0
  104. package/android/build/intermediates/runtime_library_classes_dir/debug/net/siteed/audiostream/ExpoAudioStreamModule$definition$lambda$14$$inlined$AsyncFunction$14.class +0 -0
  105. package/android/build/intermediates/runtime_library_classes_dir/debug/net/siteed/audiostream/ExpoAudioStreamModule$definition$lambda$14$$inlined$AsyncFunction$15.class +0 -0
  106. package/android/build/intermediates/runtime_library_classes_dir/debug/net/siteed/audiostream/ExpoAudioStreamModule$definition$lambda$14$$inlined$AsyncFunction$16.class +0 -0
  107. package/android/build/intermediates/runtime_library_classes_dir/debug/net/siteed/audiostream/ExpoAudioStreamModule$definition$lambda$14$$inlined$AsyncFunction$17.class +0 -0
  108. package/android/build/intermediates/runtime_library_classes_dir/debug/net/siteed/audiostream/ExpoAudioStreamModule$definition$lambda$14$$inlined$AsyncFunction$18.class +0 -0
  109. package/android/build/intermediates/runtime_library_classes_dir/debug/net/siteed/audiostream/ExpoAudioStreamModule$definition$lambda$14$$inlined$AsyncFunction$2.class +0 -0
  110. package/android/build/intermediates/runtime_library_classes_dir/debug/net/siteed/audiostream/ExpoAudioStreamModule$definition$lambda$14$$inlined$AsyncFunction$3.class +0 -0
  111. package/android/build/intermediates/runtime_library_classes_dir/debug/net/siteed/audiostream/ExpoAudioStreamModule$definition$lambda$14$$inlined$AsyncFunction$4.class +0 -0
  112. package/android/build/intermediates/runtime_library_classes_dir/debug/net/siteed/audiostream/ExpoAudioStreamModule$definition$lambda$14$$inlined$AsyncFunction$5.class +0 -0
  113. package/android/build/intermediates/runtime_library_classes_dir/debug/net/siteed/audiostream/ExpoAudioStreamModule$definition$lambda$14$$inlined$AsyncFunction$6.class +0 -0
  114. package/android/build/intermediates/runtime_library_classes_dir/debug/net/siteed/audiostream/ExpoAudioStreamModule$definition$lambda$14$$inlined$AsyncFunction$7.class +0 -0
  115. package/android/build/intermediates/runtime_library_classes_dir/debug/net/siteed/audiostream/ExpoAudioStreamModule$definition$lambda$14$$inlined$AsyncFunction$8.class +0 -0
  116. package/android/build/intermediates/runtime_library_classes_dir/debug/net/siteed/audiostream/ExpoAudioStreamModule$definition$lambda$14$$inlined$AsyncFunction$9.class +0 -0
  117. package/android/build/intermediates/runtime_library_classes_dir/debug/net/siteed/audiostream/ExpoAudioStreamModule$definition$lambda$14$$inlined$AsyncFunctionWithPromise$1.class +0 -0
  118. package/android/build/intermediates/runtime_library_classes_dir/debug/net/siteed/audiostream/ExpoAudioStreamModule$definition$lambda$14$$inlined$AsyncFunctionWithPromise$2.class +0 -0
  119. package/android/build/intermediates/runtime_library_classes_dir/debug/net/siteed/audiostream/ExpoAudioStreamModule$definition$lambda$14$$inlined$AsyncFunctionWithPromise$3.class +0 -0
  120. package/android/build/intermediates/runtime_library_classes_dir/debug/net/siteed/audiostream/ExpoAudioStreamModule$definition$lambda$14$$inlined$AsyncFunctionWithPromise$4.class +0 -0
  121. package/android/build/intermediates/runtime_library_classes_dir/debug/net/siteed/audiostream/ExpoAudioStreamModule$definition$lambda$14$$inlined$FunctionWithoutArgs$1.class +0 -0
  122. package/android/build/intermediates/runtime_library_classes_dir/debug/net/siteed/audiostream/ExpoAudioStreamModule$definition$lambda$14$$inlined$FunctionWithoutArgs$2.class +0 -0
  123. package/android/build/intermediates/runtime_library_classes_dir/debug/net/siteed/audiostream/ExpoAudioStreamModule.class +0 -0
  124. package/android/build/intermediates/runtime_library_classes_dir/debug/net/siteed/audiostream/FFT.class +0 -0
  125. package/android/build/intermediates/runtime_library_classes_dir/debug/net/siteed/audiostream/Features.class +0 -0
  126. package/android/build/intermediates/runtime_library_classes_dir/debug/net/siteed/audiostream/PermissionUtils.class +0 -0
  127. package/android/build/intermediates/runtime_library_classes_dir/debug/net/siteed/audiostream/RecordingConfig.class +0 -0
  128. package/android/build/intermediates/runtime_library_classes_jar/debug/classes.jar +0 -0
  129. package/android/build/intermediates/symbol_list_with_package_name/debug/package-aware-r.txt +1 -0
  130. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab +0 -0
  131. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream +0 -0
  132. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream.len +0 -0
  133. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.len +0 -0
  134. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at +0 -0
  135. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i +0 -0
  136. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i.len +0 -0
  137. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab +0 -0
  138. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream +0 -0
  139. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream.len +0 -0
  140. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.len +0 -0
  141. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.values.at +0 -0
  142. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i +0 -0
  143. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i.len +0 -0
  144. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab +0 -0
  145. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream +0 -0
  146. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len +0 -0
  147. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.len +0 -0
  148. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at +0 -0
  149. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i +0 -0
  150. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i.len +0 -0
  151. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab +0 -0
  152. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream +0 -0
  153. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream.len +0 -0
  154. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.len +0 -0
  155. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.values.at +0 -0
  156. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i +0 -0
  157. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i.len +0 -0
  158. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab +0 -0
  159. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream +0 -0
  160. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len +0 -0
  161. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len +0 -0
  162. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at +0 -0
  163. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i +0 -0
  164. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i.len +0 -0
  165. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab +0 -0
  166. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream +0 -0
  167. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream.len +0 -0
  168. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.len +0 -0
  169. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values +0 -0
  170. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at +0 -0
  171. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.s +1 -0
  172. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i +0 -0
  173. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i.len +0 -0
  174. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab +0 -0
  175. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream +0 -0
  176. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len +0 -0
  177. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.len +0 -0
  178. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at +0 -0
  179. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i +0 -0
  180. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i.len +0 -0
  181. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab +0 -0
  182. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream +0 -0
  183. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream.len +0 -0
  184. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.len +0 -0
  185. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.at +0 -0
  186. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i +0 -0
  187. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i.len +0 -0
  188. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab +0 -0
  189. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream +0 -0
  190. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream.len +0 -0
  191. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.len +0 -0
  192. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.values.at +0 -0
  193. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i +0 -0
  194. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i.len +0 -0
  195. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/counters.tab +2 -0
  196. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab +0 -0
  197. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream +0 -0
  198. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream.len +0 -0
  199. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.len +0 -0
  200. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.values.at +0 -0
  201. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i +0 -0
  202. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i.len +0 -0
  203. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab +0 -0
  204. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream +0 -0
  205. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream.len +0 -0
  206. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.len +0 -0
  207. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.values.at +0 -0
  208. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i +0 -0
  209. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i.len +0 -0
  210. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab +0 -0
  211. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream +0 -0
  212. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream.len +0 -0
  213. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.len +0 -0
  214. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values +0 -0
  215. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at +0 -0
  216. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.s +1 -0
  217. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i +0 -0
  218. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i.len +0 -0
  219. package/android/build/kotlin/compileDebugKotlin/cacheable/last-build.bin +0 -0
  220. package/android/build/kotlin/compileDebugKotlin/classpath-snapshot/shrunk-classpath-snapshot.bin +0 -0
  221. package/android/build/kotlin/compileDebugKotlin/local-state/build-history.bin +0 -0
  222. package/android/build/outputs/logs/manifest-merger-debug-report.txt +24 -0
  223. package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
  224. package/android/build/tmp/kotlin-classes/debug/META-INF/siteed-expo-audio-stream_debug.kotlin_module +0 -0
  225. package/android/build/tmp/kotlin-classes/debug/net/siteed/audiostream/AudioAnalysisData$AmplitudeRange.class +0 -0
  226. package/android/build/tmp/kotlin-classes/debug/net/siteed/audiostream/AudioAnalysisData$SpeakerChange.class +0 -0
  227. package/android/build/tmp/kotlin-classes/debug/net/siteed/audiostream/AudioAnalysisData.class +0 -0
  228. package/android/build/tmp/kotlin-classes/debug/net/siteed/audiostream/AudioDataEncoder.class +0 -0
  229. package/android/build/tmp/kotlin-classes/debug/net/siteed/audiostream/AudioFileHandler.class +0 -0
  230. package/android/build/tmp/kotlin-classes/debug/net/siteed/audiostream/AudioFormatUtils.class +0 -0
  231. package/android/build/tmp/kotlin-classes/debug/net/siteed/audiostream/AudioProcessor$AudioData.class +0 -0
  232. package/android/build/tmp/kotlin-classes/debug/net/siteed/audiostream/AudioProcessor$Companion.class +0 -0
  233. package/android/build/tmp/kotlin-classes/debug/net/siteed/audiostream/AudioProcessor$extractMFCC$powerSpectrum$2.class +0 -0
  234. package/android/build/tmp/kotlin-classes/debug/net/siteed/audiostream/AudioProcessor.class +0 -0
  235. package/android/build/tmp/kotlin-classes/debug/net/siteed/audiostream/AudioRecorderManager.class +0 -0
  236. package/android/build/tmp/kotlin-classes/debug/net/siteed/audiostream/Constants.class +0 -0
  237. package/android/build/tmp/kotlin-classes/debug/net/siteed/audiostream/DataPoint.class +0 -0
  238. package/android/build/tmp/kotlin-classes/debug/net/siteed/audiostream/EventSender.class +0 -0
  239. package/android/build/tmp/kotlin-classes/debug/net/siteed/audiostream/ExpoAudioStreamModule$definition$lambda$14$$inlined$AsyncFunction$1.class +0 -0
  240. package/android/build/tmp/kotlin-classes/debug/net/siteed/audiostream/ExpoAudioStreamModule$definition$lambda$14$$inlined$AsyncFunction$10.class +0 -0
  241. package/android/build/tmp/kotlin-classes/debug/net/siteed/audiostream/ExpoAudioStreamModule$definition$lambda$14$$inlined$AsyncFunction$11.class +0 -0
  242. package/android/build/tmp/kotlin-classes/debug/net/siteed/audiostream/ExpoAudioStreamModule$definition$lambda$14$$inlined$AsyncFunction$12.class +0 -0
  243. package/android/build/tmp/kotlin-classes/debug/net/siteed/audiostream/ExpoAudioStreamModule$definition$lambda$14$$inlined$AsyncFunction$13.class +0 -0
  244. package/android/build/tmp/kotlin-classes/debug/net/siteed/audiostream/ExpoAudioStreamModule$definition$lambda$14$$inlined$AsyncFunction$14.class +0 -0
  245. package/android/build/tmp/kotlin-classes/debug/net/siteed/audiostream/ExpoAudioStreamModule$definition$lambda$14$$inlined$AsyncFunction$15.class +0 -0
  246. package/android/build/tmp/kotlin-classes/debug/net/siteed/audiostream/ExpoAudioStreamModule$definition$lambda$14$$inlined$AsyncFunction$16.class +0 -0
  247. package/android/build/tmp/kotlin-classes/debug/net/siteed/audiostream/ExpoAudioStreamModule$definition$lambda$14$$inlined$AsyncFunction$17.class +0 -0
  248. package/android/build/tmp/kotlin-classes/debug/net/siteed/audiostream/ExpoAudioStreamModule$definition$lambda$14$$inlined$AsyncFunction$18.class +0 -0
  249. package/android/build/tmp/kotlin-classes/debug/net/siteed/audiostream/ExpoAudioStreamModule$definition$lambda$14$$inlined$AsyncFunction$2.class +0 -0
  250. package/android/build/tmp/kotlin-classes/debug/net/siteed/audiostream/ExpoAudioStreamModule$definition$lambda$14$$inlined$AsyncFunction$3.class +0 -0
  251. package/android/build/tmp/kotlin-classes/debug/net/siteed/audiostream/ExpoAudioStreamModule$definition$lambda$14$$inlined$AsyncFunction$4.class +0 -0
  252. package/android/build/tmp/kotlin-classes/debug/net/siteed/audiostream/ExpoAudioStreamModule$definition$lambda$14$$inlined$AsyncFunction$5.class +0 -0
  253. package/android/build/tmp/kotlin-classes/debug/net/siteed/audiostream/ExpoAudioStreamModule$definition$lambda$14$$inlined$AsyncFunction$6.class +0 -0
  254. package/android/build/tmp/kotlin-classes/debug/net/siteed/audiostream/ExpoAudioStreamModule$definition$lambda$14$$inlined$AsyncFunction$7.class +0 -0
  255. package/android/build/tmp/kotlin-classes/debug/net/siteed/audiostream/ExpoAudioStreamModule$definition$lambda$14$$inlined$AsyncFunction$8.class +0 -0
  256. package/android/build/tmp/kotlin-classes/debug/net/siteed/audiostream/ExpoAudioStreamModule$definition$lambda$14$$inlined$AsyncFunction$9.class +0 -0
  257. package/android/build/tmp/kotlin-classes/debug/net/siteed/audiostream/ExpoAudioStreamModule$definition$lambda$14$$inlined$AsyncFunctionWithPromise$1.class +0 -0
  258. package/android/build/tmp/kotlin-classes/debug/net/siteed/audiostream/ExpoAudioStreamModule$definition$lambda$14$$inlined$AsyncFunctionWithPromise$2.class +0 -0
  259. package/android/build/tmp/kotlin-classes/debug/net/siteed/audiostream/ExpoAudioStreamModule$definition$lambda$14$$inlined$AsyncFunctionWithPromise$3.class +0 -0
  260. package/android/build/tmp/kotlin-classes/debug/net/siteed/audiostream/ExpoAudioStreamModule$definition$lambda$14$$inlined$AsyncFunctionWithPromise$4.class +0 -0
  261. package/android/build/tmp/kotlin-classes/debug/net/siteed/audiostream/ExpoAudioStreamModule$definition$lambda$14$$inlined$FunctionWithoutArgs$1.class +0 -0
  262. package/android/build/tmp/kotlin-classes/debug/net/siteed/audiostream/ExpoAudioStreamModule$definition$lambda$14$$inlined$FunctionWithoutArgs$2.class +0 -0
  263. package/android/build/tmp/kotlin-classes/debug/net/siteed/audiostream/ExpoAudioStreamModule.class +0 -0
  264. package/android/build/tmp/kotlin-classes/debug/net/siteed/audiostream/FFT.class +0 -0
  265. package/android/build/tmp/kotlin-classes/debug/net/siteed/audiostream/Features.class +0 -0
  266. package/android/build/tmp/kotlin-classes/debug/net/siteed/audiostream/PermissionUtils.class +0 -0
  267. package/android/build/tmp/kotlin-classes/debug/net/siteed/audiostream/RecordingConfig.class +0 -0
  268. package/app.plugin.js +1 -0
  269. package/expo-module.config.json +9 -0
  270. package/package.json +1 -21
  271. package/plugin/build/index.d.ts +5 -0
  272. package/plugin/build/index.js +28 -0
  273. package/plugin/src/index.ts +53 -0
  274. package/plugin/tsconfig.json +9 -0
  275. package/publish.sh +8 -0
  276. package/src/AudioAnalysis/AudioAnalysis.types.ts +84 -0
  277. package/src/AudioAnalysis/extractAudioAnalysis.ts +147 -0
  278. package/src/AudioAnalysis/extractWaveform.ts +25 -0
  279. package/src/AudioRecorder.provider.tsx +53 -0
  280. package/src/ExpoAudioStream.native.ts +6 -0
  281. package/src/ExpoAudioStream.types.ts +93 -0
  282. package/src/ExpoAudioStream.web.ts +255 -0
  283. package/src/ExpoAudioStreamModule.ts +31 -0
  284. package/src/WebRecorder.web.ts +433 -0
  285. package/src/constants.ts +18 -0
  286. package/src/events.ts +39 -0
  287. package/src/index.ts +24 -0
  288. package/src/logger.ts +22 -0
  289. package/src/useAudioRecorder.tsx +420 -0
  290. package/src/utils/BlobFix.ts +550 -0
  291. package/src/utils/concatenateBuffers.ts +24 -0
  292. package/src/utils/convertPCMToFloat32.ts +75 -0
  293. package/src/utils/encodingToBitDepth.ts +18 -0
  294. package/src/utils/getWavFileInfo.ts +132 -0
  295. package/src/utils/writeWavHeader.ts +61 -0
  296. package/src/workers/InlineFeaturesExtractor.web.tsx +312 -0
  297. package/src/workers/inlineAudioWebWorker.web.tsx +250 -0
  298. package/tsconfig.json +14 -0
@@ -0,0 +1,25 @@
1
+ import ExpoAudioStreamModule from '../ExpoAudioStreamModule'
2
+ import { getLogger } from '../logger'
3
+
4
+ const logger = getLogger('extractWaveform')
5
+ export interface ExtractWaveformProps {
6
+ fileUri: string
7
+ numberOfSamples: number
8
+ offset?: number
9
+ length?: number
10
+ }
11
+ export const extractWaveform = async ({
12
+ fileUri,
13
+ numberOfSamples,
14
+ offset = 0,
15
+ length,
16
+ }: ExtractWaveformProps): Promise<unknown> => {
17
+ const res = await ExpoAudioStreamModule.extractAudioAnalysis({
18
+ fileUri,
19
+ numberOfSamples,
20
+ offset,
21
+ length,
22
+ })
23
+ logger.log(`extractWaveform`, res)
24
+ return res
25
+ }
@@ -0,0 +1,53 @@
1
+ // packages/expo-audio-stream/src/AudioRecorder.provider.tsx
2
+ import React, { createContext, useContext } from 'react'
3
+
4
+ import { UseAudioRecorderState } from './ExpoAudioStream.types'
5
+ import { UseAudioRecorderProps, useAudioRecorder } from './useAudioRecorder'
6
+
7
+ const initContext: UseAudioRecorderState = {
8
+ isRecording: false,
9
+ isPaused: false,
10
+ durationMs: 0,
11
+ size: 0,
12
+ startRecording: async () => {
13
+ throw new Error('AudioRecorderProvider not found')
14
+ },
15
+ stopRecording: async () => {
16
+ throw new Error('AudioRecorderProvider not found')
17
+ },
18
+ pauseRecording: () => {
19
+ throw new Error('AudioRecorderProvider not found')
20
+ },
21
+ resumeRecording: () => {
22
+ throw new Error('AudioRecorderProvider not found')
23
+ },
24
+ }
25
+
26
+ const AudioRecorderContext = createContext<UseAudioRecorderState>(initContext)
27
+
28
+ interface AudioRecorderProviderProps {
29
+ children: React.ReactNode
30
+ config?: UseAudioRecorderProps
31
+ }
32
+
33
+ export const AudioRecorderProvider: React.FC<AudioRecorderProviderProps> = ({
34
+ children,
35
+ config = {},
36
+ }) => {
37
+ const audioRecorder = useAudioRecorder(config)
38
+ return (
39
+ <AudioRecorderContext.Provider value={audioRecorder}>
40
+ {children}
41
+ </AudioRecorderContext.Provider>
42
+ )
43
+ }
44
+
45
+ export const useSharedAudioRecorder = () => {
46
+ const context = useContext(AudioRecorderContext)
47
+ if (!context) {
48
+ throw new Error(
49
+ 'useSharedAudioRecorder must be used within an AudioRecorderProvider'
50
+ )
51
+ }
52
+ return context
53
+ }
@@ -0,0 +1,6 @@
1
+ // src/ExpoAudioStreamModule.ts
2
+ import { requireNativeModule } from 'expo-modules-core'
3
+
4
+ // It loads the native module object from the JSI or falls back to
5
+ // the bridge module (from NativeModulesProxy) if the remote debugger is on.
6
+ export default requireNativeModule('ExpoAudioStream')
@@ -0,0 +1,93 @@
1
+ // packages/expo-audio-stream/src/ExpoAudioStream.types.ts
2
+ import {
3
+ AmplitudeAlgorithm,
4
+ AudioAnalysis,
5
+ AudioFeaturesOptions,
6
+ } from './AudioAnalysis/AudioAnalysis.types'
7
+ import { AudioAnalysisEvent } from './events'
8
+
9
+ export interface AudioStreamStatus {
10
+ isRecording: boolean
11
+ isPaused: boolean
12
+ durationMs: number
13
+ size: number
14
+ interval: number
15
+ mimeType: string
16
+ }
17
+
18
+ export interface AudioDataEvent {
19
+ data: string | Float32Array
20
+ position: number
21
+ fileUri: string
22
+ eventDataSize: number
23
+ totalSize: number
24
+ }
25
+
26
+ export type EncodingType = 'pcm_32bit' | 'pcm_16bit' | 'pcm_8bit'
27
+ export type SampleRate = 16000 | 44100 | 48000
28
+ export type BitDepth = 8 | 16 | 32
29
+
30
+ export interface Chunk {
31
+ text: string
32
+ timestamp: [number, number | null]
33
+ }
34
+
35
+ export interface TranscriberData {
36
+ id: string
37
+ isBusy: boolean
38
+ text: string
39
+ startTime: number
40
+ endTime: number
41
+ chunks: Chunk[]
42
+ }
43
+
44
+ export interface AudioRecording {
45
+ fileUri: string
46
+ filename: string
47
+ durationMs: number
48
+ size: number
49
+ mimeType: string
50
+ channels: number
51
+ bitDepth: BitDepth
52
+ sampleRate: SampleRate
53
+ transcripts?: TranscriberData[]
54
+ wavPCMData?: Float32Array // Full PCM data for the recording in WAV format (only on web, for native use the fileUri)
55
+ analysisData?: AudioAnalysis // Analysis data for the recording depending on enableProcessing flag
56
+ }
57
+
58
+ export interface StartRecordingResult {
59
+ fileUri: string
60
+ mimeType: string
61
+ channels?: number
62
+ bitDepth?: BitDepth
63
+ sampleRate?: SampleRate
64
+ }
65
+
66
+ export interface RecordingConfig {
67
+ sampleRate?: SampleRate // Sample rate for recording
68
+ channels?: 1 | 2 // 1 or 2 (MONO or STEREO)
69
+ encoding?: EncodingType // Encoding type for the recording
70
+ interval?: number // Interval in milliseconds at which to emit recording data
71
+
72
+ // Optional parameters for audio processing
73
+ enableProcessing?: boolean // Boolean to enable/disable audio processing (default is false)
74
+ pointsPerSecond?: number // Number of data points to extract per second of audio (default is 1000)
75
+ algorithm?: AmplitudeAlgorithm // Algorithm to use for amplitude computation (default is "rms")
76
+ features?: AudioFeaturesOptions // Feature options to extract (default is empty)
77
+
78
+ onAudioStream?: (_: AudioDataEvent) => Promise<void> // Callback function to handle audio stream
79
+ onAudioAnalysis?: (_: AudioAnalysisEvent) => Promise<void> // Callback function to handle audio features extraction results
80
+ }
81
+
82
+
83
+ export interface UseAudioRecorderState {
84
+ startRecording: (_: RecordingConfig) => Promise<StartRecordingResult>
85
+ stopRecording: () => Promise<AudioRecording | null>
86
+ pauseRecording: () => void
87
+ resumeRecording: () => void
88
+ isRecording: boolean
89
+ isPaused: boolean
90
+ durationMs: number // Duration of the recording
91
+ size: number // Size in bytes of the recorded audio
92
+ analysisData?: AudioAnalysis // Analysis data for the recording depending on enableProcessing flag
93
+ }
@@ -0,0 +1,255 @@
1
+ // src/ExpoAudioStreamModule.web.ts
2
+ import { EventEmitter } from 'expo-modules-core'
3
+
4
+ import { AudioAnalysis } from './AudioAnalysis/AudioAnalysis.types'
5
+ import {
6
+ AudioRecording,
7
+ AudioStreamStatus,
8
+ BitDepth,
9
+ RecordingConfig,
10
+ StartRecordingResult,
11
+ } from './ExpoAudioStream.types'
12
+ import { WebRecorder } from './WebRecorder.web'
13
+ import { AudioEventPayload } from './events'
14
+ import { getLogger } from './logger'
15
+ import { encodingToBitDepth } from './utils/encodingToBitDepth'
16
+ import { writeWavHeader } from './utils/writeWavHeader'
17
+
18
+ export interface EmitAudioEventProps {
19
+ data: Float32Array
20
+ position: number
21
+ }
22
+ export type EmitAudioEventFunction = (_: EmitAudioEventProps) => void
23
+ export type EmitAudioAnalysisFunction = (_: AudioAnalysis) => void
24
+
25
+ export interface ExpoAudioStreamWebProps {
26
+ audioWorkletUrl: string
27
+ featuresExtratorUrl: string
28
+ }
29
+
30
+ const logger = getLogger('ExpoAudioStreamWeb')
31
+
32
+ export class ExpoAudioStreamWeb extends EventEmitter {
33
+ customRecorder: WebRecorder | null
34
+ audioChunks: ArrayBuffer[]
35
+ isRecording: boolean
36
+ isPaused: boolean
37
+ recordingStartTime: number
38
+ pausedTime: number
39
+ currentDurationMs: number
40
+ currentSize: number
41
+ currentInterval: number
42
+ lastEmittedSize: number
43
+ lastEmittedTime: number
44
+ streamUuid: string | null
45
+ extension: 'webm' | 'wav' = 'wav' // Default extension is 'webm'
46
+ recordingConfig?: RecordingConfig
47
+ bitDepth: BitDepth // Bit depth of the audio
48
+ audioWorkletUrl: string
49
+ featuresExtratorUrl: string
50
+
51
+ constructor({
52
+ audioWorkletUrl,
53
+ featuresExtratorUrl,
54
+ }: ExpoAudioStreamWebProps) {
55
+ const mockNativeModule = {
56
+ addListener: () => {
57
+ // Not used on web
58
+ },
59
+ removeListeners: () => {
60
+ // Not used on web
61
+ },
62
+ }
63
+ super(mockNativeModule) // Pass the mock native module to the parent class
64
+
65
+ this.customRecorder = null
66
+ this.audioChunks = []
67
+ this.isRecording = false
68
+ this.isPaused = false
69
+ this.recordingStartTime = 0
70
+ this.pausedTime = 0
71
+ this.currentDurationMs = 0
72
+ this.currentSize = 0
73
+ this.bitDepth = 32 // Default
74
+ this.currentInterval = 1000 // Default interval in ms
75
+ this.lastEmittedSize = 0
76
+ this.lastEmittedTime = 0
77
+ this.streamUuid = null // Initialize UUID on first recording start
78
+ this.audioWorkletUrl = audioWorkletUrl
79
+ this.featuresExtratorUrl = featuresExtratorUrl
80
+ }
81
+
82
+ // Utility to handle user media stream
83
+ async getMediaStream() {
84
+ try {
85
+ return await navigator.mediaDevices.getUserMedia({ audio: true })
86
+ } catch (error) {
87
+ console.error('Failed to get media stream:', error)
88
+ throw error
89
+ }
90
+ }
91
+
92
+ // Start recording with options
93
+ async startRecording(recordingConfig: RecordingConfig = {}) {
94
+ if (this.isRecording) {
95
+ throw new Error('Recording is already in progress')
96
+ }
97
+
98
+ this.bitDepth = encodingToBitDepth({
99
+ encoding: recordingConfig.encoding ?? 'pcm_32bit',
100
+ })
101
+
102
+ const audioContext = new (window.AudioContext ||
103
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
104
+ // @ts-ignore - Allow webkitAudioContext for Safari
105
+ window.webkitAudioContext)()
106
+ const stream = await this.getMediaStream()
107
+
108
+ const source = audioContext.createMediaStreamSource(stream)
109
+
110
+ this.customRecorder = new WebRecorder({
111
+ audioContext,
112
+ source,
113
+ recordingConfig,
114
+ audioWorkletUrl: this.audioWorkletUrl,
115
+ emitAudioEventCallback: ({
116
+ data,
117
+ position,
118
+ }: EmitAudioEventProps) => {
119
+ this.audioChunks.push(data)
120
+ this.currentSize += data.byteLength
121
+ this.emitAudioEvent({ data, position })
122
+ this.lastEmittedTime = Date.now()
123
+ this.lastEmittedSize = this.currentSize
124
+ },
125
+ emitAudioAnalysisCallback: (audioAnalysisData: AudioAnalysis) => {
126
+ logger.log(`Emitted AudioAnalysis:`, audioAnalysisData)
127
+ this.emit('AudioAnalysis', audioAnalysisData)
128
+ },
129
+ })
130
+ await this.customRecorder.init()
131
+ this.customRecorder.start()
132
+
133
+ // // Set a timer to stop recording after 5 seconds
134
+ // setTimeout(() => {
135
+ // logger.log("AUTO Stopping recording");
136
+ // this.customRecorder?.stopAndPlay();
137
+ // this.isRecording = false;
138
+ // }, 3000);
139
+
140
+ this.isRecording = true
141
+ this.recordingConfig = recordingConfig
142
+ this.recordingStartTime = Date.now()
143
+ this.pausedTime = 0
144
+ this.lastEmittedSize = 0
145
+ this.lastEmittedTime = 0
146
+ this.streamUuid = Date.now().toString()
147
+ const fileUri = `${this.streamUuid}.${this.extension}`
148
+ const streamConfig: StartRecordingResult = {
149
+ fileUri,
150
+ mimeType: `audio/${this.extension}`,
151
+ bitDepth: this.bitDepth,
152
+ channels: recordingConfig.channels ?? 1,
153
+ sampleRate: recordingConfig.sampleRate ?? 44100,
154
+ }
155
+ return streamConfig
156
+ }
157
+
158
+ emitAudioEvent({ data, position }: EmitAudioEventProps) {
159
+ const fileUri = `${this.streamUuid}.${this.extension}`
160
+ const audioEventPayload: AudioEventPayload = {
161
+ fileUri,
162
+ mimeType: `audio/${this.extension}`,
163
+ lastEmittedSize: this.lastEmittedSize, // Since this might be continuously streaming, adjust accordingly
164
+ deltaSize: data.byteLength,
165
+ position,
166
+ totalSize: this.currentSize,
167
+ buffer: data,
168
+ streamUuid: this.streamUuid ?? '', // Generate or manage UUID for stream identification
169
+ }
170
+
171
+ this.emit('AudioData', audioEventPayload)
172
+ }
173
+
174
+ // Stop recording
175
+ async stopRecording(): Promise<AudioRecording> {
176
+ if (!this.customRecorder) {
177
+ throw new Error('Recorder is not initialized')
178
+ }
179
+
180
+ const fullPcmBufferArray = await this.customRecorder.stop()
181
+
182
+ // concat all audio chunks
183
+ logger.debug(`Stopped recording`, fullPcmBufferArray)
184
+ this.isRecording = false
185
+ this.currentDurationMs = Date.now() - this.recordingStartTime
186
+
187
+ const wavConfig = {
188
+ buffer: fullPcmBufferArray.buffer,
189
+ sampleRate: this.recordingConfig?.sampleRate ?? 44100,
190
+ numChannels: this.recordingConfig?.channels ?? 1,
191
+ bitDepth: this.bitDepth,
192
+ }
193
+ logger.debug(`Writing wav header`, wavConfig)
194
+ const wavBuffer = writeWavHeader(wavConfig).slice(0)
195
+
196
+ // Create blob fileUri from audio chunks
197
+ const blob = new Blob([wavBuffer], {
198
+ type: `audio/${this.extension}`,
199
+ })
200
+ const fileUri = URL.createObjectURL(blob)
201
+
202
+ const result: AudioRecording = {
203
+ fileUri,
204
+ filename: `${this.streamUuid}.${this.extension}`,
205
+ wavPCMData: fullPcmBufferArray,
206
+ bitDepth: this.bitDepth,
207
+ channels: this.recordingConfig?.channels ?? 1,
208
+ sampleRate: this.recordingConfig?.sampleRate ?? 44100,
209
+ durationMs: this.currentDurationMs,
210
+ size: this.currentSize,
211
+ mimeType: `audio/${this.extension}`,
212
+ }
213
+
214
+ return result
215
+ }
216
+
217
+ // Pause recording
218
+ async pauseRecording() {
219
+ if (!this.isRecording || this.isPaused) {
220
+ throw new Error('Recording is not active or already paused')
221
+ }
222
+
223
+ if (this.customRecorder) {
224
+ this.customRecorder.pause()
225
+ }
226
+ this.isPaused = true
227
+ this.pausedTime = Date.now()
228
+ }
229
+
230
+ // Resume recording
231
+ async resumeRecording() {
232
+ if (!this.isPaused) {
233
+ throw new Error('Recording is not paused')
234
+ }
235
+
236
+ if (this.customRecorder) {
237
+ this.customRecorder.resume()
238
+ }
239
+ this.isPaused = false
240
+ this.recordingStartTime += Date.now() - this.pausedTime
241
+ }
242
+
243
+ // Get current status
244
+ status() {
245
+ const status: AudioStreamStatus = {
246
+ isRecording: this.isRecording,
247
+ isPaused: this.isPaused,
248
+ durationMs: Date.now() - this.recordingStartTime,
249
+ size: this.currentSize,
250
+ interval: this.currentInterval,
251
+ mimeType: `audio/${this.extension}`,
252
+ }
253
+ return status
254
+ }
255
+ }
@@ -0,0 +1,31 @@
1
+ import { requireNativeModule } from 'expo-modules-core'
2
+ import { Platform } from 'react-native'
3
+
4
+ import {
5
+ ExpoAudioStreamWeb,
6
+ ExpoAudioStreamWebProps,
7
+ } from './ExpoAudioStream.web'
8
+
9
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
10
+ let ExpoAudioStreamModule: any
11
+
12
+ if (Platform.OS === 'web') {
13
+ let instance: ExpoAudioStreamWeb | null = null
14
+
15
+ ExpoAudioStreamModule = (webProps: ExpoAudioStreamWebProps) => {
16
+ if (!instance) {
17
+ instance = new ExpoAudioStreamWeb(webProps)
18
+ }
19
+ return instance
20
+ }
21
+ ExpoAudioStreamModule.requestPermissionsAsync = async () => {
22
+ return { status: 'granted' }
23
+ }
24
+ ExpoAudioStreamModule.getPermissionsAsync = async () => {
25
+ return { status: 'granted' }
26
+ }
27
+ } else {
28
+ ExpoAudioStreamModule = requireNativeModule('ExpoAudioStream')
29
+ }
30
+
31
+ export default ExpoAudioStreamModule