pixiebrix-extension icon indicating copy to clipboard operation
pixiebrix-extension copied to clipboard

#4353: POC: real-time audio analysis

Open twschiller opened this issue 3 years ago • 1 comments

What does this PR do?

  • POC of #4353
  • Not intended to be reviewed/merged, just saving the POC and raising discussion points so we can plan out a real research spike and future work, if we choose to implement it
  • Uses https://symbl.ai/ (which sends audio via websocket) to generate a custom event stream of audio events (questions, detected topics, etc.) that can be used in standard PixieBrix triggers

Highlights

  • Audio events trigger CustomEvents, so can be used with standard PixieBrix triggers

Discussion

  • The UX of the toggle button doesn't make sense for production. We'd probably want to automatically toggle if any audio triggers are attached to the page
  • I think the extension has to listen to the top-level frame. I tried having it run in the sidebar instead of the content script, but was getting a Permission Denied error
  • Uses the https://symbl.ai/ we library so I didn't have to write websocket code. I suspect all of these vendors have custom-enough web socket APIs that it might be hard for us to generalize

Known Bugs

  • The tab still shows as recording after you disconnect

twschiller avatar Sep 25 '22 23:09 twschiller

Codecov Report

Merging #4354 (86e40e3) into main (070b610) will decrease coverage by 0.08%. The diff coverage is 3.92%.

@@            Coverage Diff             @@
##             main    #4354      +/-   ##
==========================================
- Coverage   48.58%   48.49%   -0.09%     
==========================================
  Files         899      900       +1     
  Lines       26328    26379      +51     
  Branches     5403     5409       +6     
==========================================
+ Hits        12791    12793       +2     
- Misses      12605    12652      +47     
- Partials      932      934       +2     
Impacted Files Coverage Δ
src/contentScript/messenger/registration.ts 0.00% <ø> (ø)
src/contentScript/streamingAudio.ts 0.00% <0.00%> (ø)
src/sidebar/Header.tsx 0.00% <0.00%> (ø)
src/contentScript/messenger/api.ts 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

codecov[bot] avatar Sep 25 '22 23:09 codecov[bot]