Git Product home page Git Product logo

snakeears's Introduction

Audio Encoder/Decoder

This Python script allows you to encode files into audio and decode audio back into files. It provides a user-friendly interface for selecting between encoding a file to audio or decoding audio to a file.

Features

  • Encode any file into audio format (WAV)
  • Decode audio from microphone input or WAV file back into the original file format
  • User-friendly menu for easy navigation
  • Progress tracking with loading bars
  • Color-coded output for enhanced readability
  • Error handling for file not found and other exceptions

Requirements

  • Python 3.x
  • pyaudio library
  • tqdm library

Installation

  1. Clone the repository:

    git clone https://github.com/your-username/audio-encoder-decoder.git
  2. Install the required libraries:

    pip install pyaudio tqdm

Usage

  1. Run the script:

    python audio_encoder_decoder.py
  2. Choose an option from the menu:

    • Option 1: Encode file to audio
      • Enter the path of the file to encode
      • Enter the output path for the encoded audio
    • Option 2: Decode audio to file
      • Enter the output path for the decoded file
      • Choose whether to use the microphone or a WAV file for audio input
        • If using a WAV file, enter the path of the WAV file to decode
    • Option 3: Exit the script
  3. Follow the prompts and wait for the encoding/decoding process to complete.

  4. The encoded audio or decoded file will be saved to the specified output path.

Examples

Encode a file to audio:

Enter your choice (1-3): 1
Enter the path of the file to encode: /path/to/file.txt
Enter the output path for the encoded audio: /path/to/encoded_audio.wav

Decode audio from a WAV file:

Enter your choice (1-3): 2
Enter the output path for the decoded file: /path/to/decoded_file.txt
Use microphone for audio input? (y/n): n
Enter the path of the WAV file to decode: /path/to/audio.wav

License

This project is licensed under the MIT License.

Acknowledgements

  • The pyaudio library for audio input/output functionality.
  • The tqdm library for progress tracking.

Contributing

Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.

snakeears's People

Contributors

duracell-a-3 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.