ClinicianFOCUS / FreeScribe

A medical scribe capable of creating SOAP notes running Whisper and Kobold based on conversation with a patient
GNU General Public License v3.0
0 stars 0 forks source link

Add AudioMeter widget and refactor audio silence detection #23

Closed ItsSimko closed 1 week ago

ItsSimko commented 1 week ago

Issues: #21 #13 #22

Summary by Sourcery

Add an AudioMeter widget to the settings UI for adjusting audio silence cutoff thresholds and refactor audio processing to use this configurable threshold. Update the build and CI configurations to accommodate these changes.

New Features:

Enhancements:

Build:

CI:

sourcery-ai[bot] commented 1 week ago

Reviewer's Guide by Sourcery

This pull request introduces an AudioMeter widget to the settings UI for adjusting audio silence cutoff thresholds and refactors the audio processing logic to use this configurable threshold. The changes also include updates to the build and CI configurations to accommodate these new features.

User journey diagram for the AudioMeter widget

journey
    title User journey for adjusting audio silence cutoff
    section Access Settings
      User -> SettingsWindowUI: Open settings UI
    section Adjust Silence Cutoff
      User -> AudioMeter: Adjust silence cutoff threshold
      AudioMeter -> SettingsWindowUI: Update threshold value
    section Save Settings
      User -> SettingsWindowUI: Save settings
      SettingsWindowUI -> Settings: Persist new threshold value

File-Level Changes

Change Details Files
Introduced an AudioMeter widget for adjusting audio silence cutoff thresholds
  • Created a new AudioMeter class that displays real-time audio levels and allows threshold adjustment
  • Added the AudioMeter widget to the settings UI
  • Implemented audio input capture and level visualization in the AudioMeter
  • Added cleanup methods to properly handle widget destruction
src/FreeScribe.client/UI/Widgets/AudioMeter.py
src/FreeScribe.client/UI/SettingsWindowUI.py
Refactored audio processing to use the configurable silence cutoff threshold
  • Modified the is_silent function to use the configurable threshold
  • Updated the record_audio function to use the new silence detection logic
  • Adjusted the real-time audio processing to handle the new threshold
src/FreeScribe.client/client.py
Updated build and CI configurations
  • Modified the NSIS installer script to include additional files
  • Removed the '--onefile' option from the PyInstaller command in the release workflow
scripts/install.nsi
.github/workflows/release.yml
Adjusted default silence cutoff threshold in presets
  • Changed the default 'Silence cut-off' value from 0.01 to 0.015 in preset configuration files
src/FreeScribe.client/presets/ChatGPT.json
src/FreeScribe.client/presets/ClinicianFOCUS Toolbox.json
src/FreeScribe.client/presets/JanAI.json

Possibly linked issues


Tips and commands #### Interacting with Sourcery - **Trigger a new review:** Comment `@sourcery-ai review` on the pull request. - **Continue discussions:** Reply directly to Sourcery's review comments. - **Generate a GitHub issue from a review comment:** Ask Sourcery to create an issue from a review comment by replying to it. - **Generate a pull request title:** Write `@sourcery-ai` anywhere in the pull request title to generate a title at any time. - **Generate a pull request summary:** Write `@sourcery-ai summary` anywhere in the pull request body to generate a PR summary at any time. You can also use this command to specify where the summary should be inserted. #### Customizing Your Experience Access your [dashboard](https://app.sourcery.ai) to: - Enable or disable review features such as the Sourcery-generated pull request summary, the reviewer's guide, and others. - Change the review language. - Add, remove or edit custom review instructions. - Adjust other review settings. #### Getting Help - [Contact our support team](mailto:support@sourcery.ai) for questions or feedback. - Visit our [documentation](https://docs.sourcery.ai) for detailed guides and information. - Keep in touch with the Sourcery team by following us on [X/Twitter](https://x.com/SourceryAI), [LinkedIn](https://www.linkedin.com/company/sourcery-ai/) or [GitHub](https://github.com/sourcery-ai).
ItsSimko commented 1 week ago

@sourcery-ai review