Skip to content
RAHB-REALTORS-AssociationPublic

About

A lightweight web tool for converting audio files to mono, 8kHz, 16-bit WAV format. πŸ”„πŸŽ΅

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

1 watching

Forks

Latest commit

Β 

History

74 Commits

Folders and files

Repository files navigation

Build and Publish License: MIT

WAV Maker Logo

πŸ”‰ WAV Maker

A lightweight web tool for converting audio files to mono, 8kHz, 16-bit WAV format. πŸ”„πŸŽ΅

WAV Maker Screenshot

πŸš€ Overview

This application provides a simple web interface for converting various audio formats (primarily MP3 and WAV) to a standardized mono, 8kHz, 16-bit WAV format. It's designed to be:

  • βœ… Simple: Easy drag-and-drop interface πŸ–±οΈπŸ“‚
  • ⚑ Fast: Asynchronous conversion with progress tracking ⏱️
  • πŸ” Secure: No permanent file storage, automatic cleanup 🧹
  • 🧱 Scalable: Containerized for easy deployment 🐳
  • πŸ’ͺ Reliable: Persistent task tracking for robustness πŸ†

✨ Features

  • πŸ“‚ Drag-and-drop file uploads
  • πŸ“Š Real-time conversion progress indicators
  • 🎢 Support for MP3 and WAV input formats
  • πŸ”’ Secure file handling with automatic cleanup
  • πŸ“± Responsive design that works on mobile and desktop
  • 🐳 Docker containerization for simple deployment
  • πŸ—‘οΈ No permanent file storage (files automatically deleted after download)
  • πŸ” "Convert Another" functionality for batch processing
  • πŸŒ™ Dark Mode / Light Mode
  • πŸ—£οΈ Voice script preparation for ElevenLabs and other AI voice generators

Voice script prep

Paste a script into Voice script prep below the audio converter and click Prepare script. Phone numbers become individual spoken digits, with commas between groups and support for extensions. Websites and email addresses become spoken text, such as example dot ca and hello at example dot ca. URL schemes (http:// and https://) are omitted; paths and query punctuation are spoken.

For example, Call (905) 555-0123 or visit www.example.ca. becomes:

Call nine zero five, five five five, zero one two three or visit double you double you double you dot example dot ca.

The converter handles North American phone numbers and international numbers with an explicit + country code. It leaves other numbers (including dates and prices) unchanged unless Also spell every other number digit by digit is selected. That option is useful for codes such as 0042 β†’ zero zero four two.

Review and edit the prepared script, then use Copy prepared script to paste it into your voice generator. If clipboard access is unavailable, the text is selected for manual copying. Brand names may need manual phonetic spelling; preview the generated voice to confirm pronunciation. Text preparation runs entirely in the browser, without storage, API keys, or requests to ElevenLabs.

πŸ“Έ Screenshots

Dark Mode

Light Mode

Converted File

πŸ›  Requirements

  • 🐳 Docker and Docker Compose

That's it! Everything else runs inside the container. πŸš€

⚑ Quick Start

Using GitHub Container Registry (Recommended)

# Pull the latest image
docker pull ghcr.io/yourusername/wav-maker:latest

# Create a directory for persistent data
mkdir -p task_data

# Run the container
docker run -d -p 5000:5000 -v $(pwd)/task_data:/app/conversion_tasks.json --name wav-maker ghcr.io/yourusername/wav-maker:latest

Building Locally

  1. πŸ“₯ Clone this repository:

    git clone https://github.com/yourusername/wav-maker.git
    cd wav-maker
  2. ▢️ Start the application with Docker Compose:

    docker-compose up -d
  3. 🌐 Open your browser and go to:

    http://localhost:5000
    
  4. 🎧 Drag and drop an audio file, and the converter will do the rest!

πŸ“ Project Structure

wav_maker/
β”œβ”€β”€ app.py                 # 🧠 Main Flask application
β”œβ”€β”€ requirements.txt       # πŸ“¦ Python dependencies
β”œβ”€β”€ Dockerfile             # 🐳 Docker image configuration
β”œβ”€β”€ docker-compose.yml     # 🧩 Docker Compose config
β”œβ”€β”€ static/                # 🎨 CSS and JavaScript
β”‚   β”œβ”€β”€ style.css
β”‚   └── script.js
β”œβ”€β”€ templates/             # πŸ–ΌοΈ HTML templates
β”‚   └── index.html
└── tests/                 # πŸ§ͺ Unit tests
    └── test_app.py

βš™οΈ Configuration

Customize through environment variables in docker-compose.yml:

Variable Description Default
MAX_CONTENT_LENGTH πŸ“ Max upload file size (bytes) 104857600 (100MB)
FILE_RETENTION_MINUTES πŸ•’ File retention before cleanup 30

πŸ” Technical Details

🎡 Audio Conversion

Powered by pydub + FFmpeg:

  1. Convert to mono πŸ—£οΈ
  2. Resample to 8kHz πŸŽ›οΈ
  3. Encode to 16-bit PCM 🧱
  4. Export as WAV πŸ“€

πŸ” Task Management

  • πŸ“ Each conversion has a unique task ID
  • πŸ’Ύ Task status is persistently stored
  • πŸ”„ Status is tracked through the entire process
  • 🧹 Auto-cleanup of old tasks and files

πŸ›‘οΈ Security Considerations

  • 🧍 Runs as non-root in Docker
  • ⚠️ File size limits prevent DoS
  • 🧼 Temp storage prevents bloat
  • 🧯 Sanitized filenames = no path traversal

πŸ‘¨β€πŸ’» Development

To modify and test:

  1. Edit source files ✏️

  2. Rebuild & restart Docker:

    docker-compose up --build -d

πŸ§ͺ Running Tests

Run the test suite with:

# Install test dependencies
pip install pytest pytest-cov

# Run tests
pytest tests/ --cov=app

# Run browser text-conversion tests (Node.js 24+, no npm dependencies)
node --test tests/js/*.test.js

πŸ§ͺ Local Dev Without Docker

  1. Install dependencies:

    pip install -r requirements.txt
  2. Install FFmpeg:

    • 🐧 Ubuntu/Debian: sudo apt-get install ffmpeg
    • 🍎 macOS: brew install ffmpeg
    • πŸͺŸ Windows: Download
  3. Run app:

    python app.py

πŸš€ CI/CD

This project uses GitHub Actions for continuous integration and delivery:

  • πŸ§ͺ Automatic testing on push and pull requests
  • 🐳 Docker image building and publishing to GitHub Container Registry
  • πŸ“¦ Automatic release creation on version tags

🩺 Troubleshooting

πŸ”§ Common Issues

  1. ❌ "File not found or conversion not complete"

    • File was likely already deleted. Try again.
  2. ❌ "Error during conversion"

    • Check file format and FFmpeg install.
  3. ❌ Container won't start

    • Check for port conflicts: sudo lsof -i :5000
    • View logs: docker-compose logs

πŸ“œ Logs

Follow logs in real-time:

docker-compose logs -f

πŸ™Œ Acknowledgments

πŸ“„ License

MIT License – see the LICENSE file πŸ“˜

About

A lightweight web tool for converting audio files to mono, 8kHz, 16-bit WAV format. πŸ”„πŸŽ΅

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages