Skip to content

Add Microphone Mute Toggle with Timed Options - Issue #1643 - #2472

Closed
eulicesl wants to merge 1 commit into
BasedHardware:mainfrom
eulicesl:feature/microphone-mute-clean
Closed

eulicesl wants to merge 1 commit into
BasedHardware:mainfrom
eulicesl:feature/microphone-mute-clean

Conversation

@eulicesl

@eulicesl eulicesl commented May 29, 2025 •

Copy link
Copy Markdown
Collaborator

Microphone Mute Toggle Feature - Issue #1643

/claim #1643

Description

This PR implements a comprehensive microphone mute toggle feature for the OMI app as requested in issue #1643. Users can now easily pause transcription for privacy or other reasons, then resume at any time.

Requirements Implemented

Core Requirements

  1. Toggle Button at Top: Mute/unmute button prominently placed in the app bar for quick access
  2. On-Demand Control: Single tap to mute/unmute immediately with visual feedback
  3. Visual Feedback: Clear red styling and icon changes when muted
  4. App Remains Functional: Browse memories, conversations, and all features while muted
  5. Persistent State: Mute state saved across app sessions

Enhancement Features (Bonus)

  1. Timed Mute Options: Long-press for timer options (30 min, 1 hr, 2 hr)
  2. Auto-unmute: Automatic unmute when timer expires
  3. Professional UX: Smooth animations, haptic feedback, and intuitive interactions

Demo Video

Mute.Feature.mov

Implementation Details

New Files Added:

  • app/lib/providers/mute_provider.dart - State management with timer functionality
  • app/lib/widgets/mute_toggle_widget.dart - Beautiful UI component with animations
  • app/test/mute_provider_test.dart - Comprehensive unit tests
  • docs/MICROPHONE_MUTE_FEATURE.md - Complete documentation

Modified Files:

  • app/lib/pages/home/page.dart - Added mute toggle to app bar
  • app/lib/providers/capture_provider.dart - Integrated mute functionality for both device and phone audio
  • app/lib/backend/preferences.dart - Added persistent mute state storage
  • app/lib/main.dart - Added MuteProvider to app provider tree

Key Features:

  • Professional UX - Smooth animations, haptic feedback, and intuitive touch targets
  • Universal Support - Works with both Bluetooth OMI device and phone microphone
  • Smart Timer - Auto-unmute with visual countdown and notifications
  • Persistent State - Remembers mute state across app sessions
  • Analytics Integration - Tracks mute events for usage insights
  • Comprehensive Testing - Full test coverage for reliability
  • Clean Integration - Seamlessly integrated with latest OMI codebase

User Experience Addresses All Issue Requirements

The implementation perfectly addresses all user needs from issue #1643:

  1. "I don't want to touch my device; I just want to mute it"

    • Tap the prominent mute button in the app UI
  2. "I still want to use the app"

    • App remains fully functional while muted
  3. "I want to look through my memories and conversations while the app is muted"

    • All navigation and features work normally
  4. "I may be on a call that I don't want to be recorded"

    • Perfect use case - quick mute for private calls
  5. "Quick tap to mute and a quick tap to unmute"

    • Single tap toggle with immediate visual feedback
  6. "Mute snooze feature would be amazing"

    • Timer options (30min, 1hr, 2hr) with auto-unmute

Testing

  • Unit Tests: Comprehensive test coverage in mute_provider_test.dart
  • Manual Testing: Tested on iOS simulator with both mic types
  • Edge Cases: App lifecycle, timer expiration, state persistence
  • UX Testing: Smooth animations, proper touch targets, accessibility

📱 How It Works

  1. Quick Mute: Single tap the microphone icon in the top-right app bar
  2. Timed Mute: Long press for duration options (30min, 1hr, 2hr, indefinite)
  3. Visual Feedback: Icon changes to red with slash when muted
  4. Audio Blocking: When muted, no audio bytes are sent to transcription service
  5. Auto-unmute: Timer automatically unmutes and shows notification
  6. Persistence: Mute state survives app restarts

Related Issues

Fixes #1643


This implementation exceeds the original requirements by adding the optional timer enhancement, comprehensive testing, beautiful animations, and production-ready code quality. Ready for review!

@vercel

vercel Bot commented May 29, 2025

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the kodjima33's projects Team on Vercel.

A member of the Team first needs to authorize it.

@algora-pbc algora-pbc Bot mentioned this pull request May 29, 2025
@eulicesl eulicesl changed the title 🎤 Add Microphone Mute Toggle with Timed Options - Issue #1643 Add Microphone Mute Toggle with Timed Options - Issue #1643 May 29, 2025
@eulicesl

Copy link
Copy Markdown
Collaborator Author

@kodjima33 @mdmohsin7 would like to get this reviewed please.

@eulicesl
eulicesl force-pushed the feature/microphone-mute-clean branch from ddc9a3a to 02bbc13 Compare May 30, 2025 22:56
@beastoin

beastoin commented Jun 1, 2025

Copy link
Copy Markdown
Collaborator

@smian1 what do you think ?

@neooriginal

Copy link
Copy Markdown
Collaborator

Awesome work!
I recommend cleaning up unused files that clutter the repo, like PR_MICROPHONE_MUTE_DESCRIPTION.md.

@eulicesl

eulicesl commented Jun 3, 2025

Copy link
Copy Markdown
Collaborator Author

Superseded by clean implementation in PR #2498. This new PR has the same microphone mute feature but is built on the latest OMI codebase with only the essential changes, addressing the maintainer feedback about cleaning up unused files.

@eulicesl

eulicesl commented Jun 3, 2025

Copy link
Copy Markdown
Collaborator Author

Thanks for the feedback. I cleaned it up and pushed. Let me know if you need me to fix anything else.

@eulicesl

eulicesl commented Jun 3, 2025

Copy link
Copy Markdown
Collaborator Author

@neooriginal Yes, that sounds great. I cleaned up the PR, except for the test file. I can remove that as well, just let me know.

@neooriginal

Copy link
Copy Markdown
Collaborator

@neooriginal Yes, that sounds great. I cleaned up the PR, except for the test file. I can remove that as well, just let me know.

Youd probably want to remove that aswell - less files = better

…r for state management with timer functionality - Add MuteToggleWidget with professional UX design - Integrate mute functionality into CaptureProvider for both device and phone audio - Support for timed mute with auto-unmute (30min, 1hr, 2hr) - Analytics tracking and persistent state management - Clean integration with latest OMI codebase - Addresses issue BasedHardware#1643
@eulicesl
eulicesl force-pushed the feature/microphone-mute-clean branch from 09ecdf4 to 2cd63ed Compare June 3, 2025 10:19
@eulicesl

eulicesl commented Jun 3, 2025

Copy link
Copy Markdown
Collaborator Author

@neooriginal Yes, that sounds great. I cleaned up the PR, except for the test file. I can remove that as well, just let me know.

Youd probably want to remove that aswell - less files = better

@neooriginal Thanks, and done.

@eulicesl

eulicesl commented Jun 5, 2025

Copy link
Copy Markdown
Collaborator Author

@beastoin any updates on this?

@shailedrathakur300

shailedrathakur300 commented Jun 5, 2025 •

Copy link
Copy Markdown
Contributor

If it is possible, can you add a mute and unmute option in the Android status bar so I can access it quickly without opening an app?
I think it's not possible to add that in the iPhone (iOS) Control Center.
image

@beastoin

beastoin commented Jun 30, 2025 •

Copy link
Copy Markdown
Collaborator

#1643 (comment)

/ close

---
hi folks, we’re not planning to do this right now.

but we’ll let you know once this ticket is on the schedule - of course, we’ll go one by one based on the submitted PRs.

@beastoin beastoin closed this Jun 30, 2025
@eulicesl
eulicesl deleted the feature/microphone-mute-clean branch August 17, 2025 15:03
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.

Mic Mute Toggle

4 participants