Skip to content

πŸŽ™οΈ A customizable SwiftUI component for visualizing microphone input as live animated waves β€” lightweight, flexible, and reusable.

Notifications You must be signed in to change notification settings

med-temimi/WaveInputView

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸŽ™οΈ WaveInputView

A lightweight and customizable SwiftUI component for visualizing live microphone input as animated waves β€” perfect for voice interactions or playful UI feedback.

✨ Features

  • Live audio input visualization
  • Smooth animations & responsive design
  • MVVM architecture for easy integration
  • Reusable in any SwiftUI project

πŸš€ Usage

@StateObject private var viewModel = WaveInputViewModel()
@State private var selectedStyle: WaveStyle = .bar

WaveInputView(viewModel: viewModel, waveStyle: selectedStyle)

⏯️ Use startMonitoring() and stopMonitoring() to control audio capture:

 @StateObject private var viewModel = WaveInputViewModel()

 WaveInputView(viewModel: viewModel, waveStyle: selectedStyle)
                            .frame(height: 150)
                            .frame(maxWidth: .infinity)

 Button("Start Monitoring") { viewModel.startMonitoring() }

 Button("Stop Monitoring") { viewModel.stopMonitoring() }

πŸ“‹ Info.plist

⚠️ Add this to your Info.plist:

<key>NSMicrophoneUsageDescription</key>
<string>We use your mic to visualize sound input as animated waves.</string>

πŸ“¦ Requirements

iOS 15+ SwiftUI Swift 5.7+

🎬 Preview

WaveInputView Demo

MIT Β© TEMIMI-MOHAMED

About

πŸŽ™οΈ A customizable SwiftUI component for visualizing microphone input as live animated waves β€” lightweight, flexible, and reusable.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages