Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Audio Input Widget #7363

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Add Audio Input Widget #7363

wants to merge 1 commit into from

Conversation

MarcSkovMadsen
Copy link
Collaborator

@MarcSkovMadsen MarcSkovMadsen commented Oct 6, 2024

Closing #4048.

For now this is exploration in order to be able to design the widget.

Related issues

Design

Inspiration

Questions

Design Decisions to be taken

  • Do we want to focus on Audio input or combine Audio and Video? The Media Stream Api Supports both?
    • Audio.
    • Video
  • What should the name be
    • Microphone
    • AudioInput
    • AudioRecorder
  • Do we want to enable incremental streaming? Or just sending value when recording is finished?
    • Final Value
    • Streaming value
  • Do we want to support more value formats than default webm? mp3, ogg, wav etc. Converting on client side might require cross origin isolation. Converting on server side might require ffmpeg installation.
    • mp3, ogg, wav
    • Conversion on client side
  • Do we want bare minimum UI (Start, Stop, Pause)? Or extra features:
    • submit button
    • playback button?
    • wave graph?
    • editing possibilities?
  • Do we want compact UI like Streamlit or large UI like Gradio?
    • Compact UI
    • Large UI
  • Do we want to build on raw Media Stream Recording API or library?
  • Do we want to make it easy for users to
    • Play the value in the Audio pane?
    • work with the value as a Numpy Array?
    • work with the value as a data url?
    • Save the value to a file?
  • How do we most efficiently transfer the media from client to server
    • Bytes (I don't yet know how to do this)
    • data url (This is easily doable)

Items marked with [x] are the choices we should select to implement.

Copy link

codecov bot commented Oct 6, 2024

Codecov Report

Attention: Patch coverage is 0% with 39 lines in your changes missing coverage. Please review.

Project coverage is 82.14%. Comparing base (5ef8909) to head (a0d9dce).

Files with missing lines Patch % Lines
panel/widgets/microphone.py 0.00% 39 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7363      +/-   ##
==========================================
- Coverage   82.21%   82.14%   -0.08%     
==========================================
  Files         337      338       +1     
  Lines       50513    50552      +39     
==========================================
- Hits        41529    41524       -5     
- Misses       8984     9028      +44     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@MarcSkovMadsen
Copy link
Collaborator Author

MarcSkovMadsen commented Oct 6, 2024

If you are interested in audio input feel free to comment on questions above @philippjfr and @ahuang11 .

@philippjfr
Copy link
Member

Not questions (yet), but is there a corresponding JS file?

@MarcSkovMadsen
Copy link
Collaborator Author

No. Currently just exploring the design.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants