• Townie
    AI
  • Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
paulkinlan

paulkinlan

Web-amp

Public
Like
Web-amp
Home
Code
2
README.md
H
index.ts
Branches
1
Pull requests
Remixes
History
Environment variables
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
Code
/
Search
index.ts
https://paulkinlan--3772dd3cb66b11f0bacb0224a6c84d84.web.val.run
README.md

Microphone Amplifier Web App

A comprehensive web application that acts as a microphone amplifier using the Web Audio API with full device selection capabilities.

Features

  • Real-time microphone amplification - Captures audio from your microphone and amplifies it through your speakers
  • Device selection - Choose specific input (microphone) and output (speakers/headphones) devices
  • Adjustable gain control - Volume slider to control amplification level (0.1x to 5.0x)
  • Visual audio level indicator - Real-time display of audio input levels with color coding
  • Audio output testing - Test button to verify your speakers are working
  • Device refresh - Reload available audio devices without refreshing the page
  • Feedback protection warnings - Built-in warnings to help prevent audio feedback loops
  • Clean, responsive UI - Dark theme with intuitive controls
  • Debug information - Real-time display of audio context state and sample rate

How to Use

  1. Load devices - The app automatically loads available microphones and speakers on startup
  2. Test audio output - Click "🔊 Test Audio Output" to verify your speakers work
  3. Select devices - Choose your preferred microphone and speakers from the dropdown menus
  4. Click "Start Amp" - The browser will request microphone permissions
  5. Grant microphone access - Allow the app to use your selected microphone
  6. Adjust amplification - Use the slider to control the volume boost
  7. Monitor levels - Watch the audio level indicator to avoid clipping
  8. Click "Stop Amp" - Stops the amplifier and releases the microphone

Device Selection

Input Devices (Microphones)

  • Lists all available microphone inputs
  • Shows device names when permissions are granted
  • Fallback to "Default Microphone" if no specific device is selected

Output Devices (Speakers/Headphones)

  • Lists all available audio output devices
  • Note: Output device selection support varies by browser
  • Chrome and Edge have better support than Firefox/Safari

Refresh Devices

  • Click "🔄 Refresh Devices" to reload the device list
  • Useful when plugging/unplugging audio devices
  • Automatically requests microphone permissions to get device labels

Important Notes

⚠️ Feedback Warning: This app can create audio feedback loops if your microphone picks up sound from your speakers. To prevent this:

  • Use headphones instead of speakers when possible
  • Start with low amplification levels
  • Keep your microphone away from speakers
  • Be prepared to quickly stop the amp if feedback occurs

Technical Details

  • Uses the Web Audio API for real-time audio processing
  • Uses MediaDevices.enumerateDevices() for device discovery
  • Disables echo cancellation, noise suppression, and auto-gain control for pure amplification
  • Includes real-time frequency analysis for the visual level indicator
  • Attempts to use setSinkId() for output device selection (Chrome/Edge support)
  • Responsive design works on desktop and mobile devices

Browser Compatibility

Works in modern browsers that support:

  • Web Audio API
  • getUserMedia API
  • MediaDevices.enumerateDevices API
  • ES6+ JavaScript features

Device Selection Support:

  • Chrome/Edge: Full input and output device selection
  • Firefox: Input device selection, limited output selection
  • Safari: Input device selection, no output selection
  • Mobile browsers: Limited device selection capabilities

Safety Features

  • Visual feedback to monitor audio levels
  • Easy stop button to quickly disable amplification
  • Warning messages about potential feedback issues
  • Automatic cleanup when the page is closed or refreshed
  • Error handling for device access issues
  • Graceful fallback when device selection is not supported
HTTP
  • index.ts
    paulkinlan--37…84.web.val.run
Code
README.md
H
index.ts
FeaturesVersion controlCode intelligenceCLI
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Open Source Pledge
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.