Skip to content

angus5552/how_to_send_mp3

Repository files navigation

How to send mp3

WAV 파일을 여러 개의 청크로 분할한 후 MP3로 압축하여 전송하고, 수신된 MP3 청크를 다시 WAV 파일로 재조립하는 예제 프로젝트입니다.

요구 사항

  • Python 3.6 이상
  • pydub (pip install pydub)
  • ffmpeg (시스템에 설치되어 있어야 함)

사용 방법

python audio_chunk_reassembly.py -i input/예제.wav -o output/결과.wav -n 4 -b 192k -r 24000

옵션:

  • -i, --input: 입력 WAV 파일 경로
  • -o, --output: 출력 WAV 파일 경로
  • -n, --chunks: 분할할 청크 개수 (기본: 4)
  • -b, --bitrate: MP3 비트레이트 (기본: 192k)
  • -r, --sample-rate: 샘플 레이트 (Hz, 기본: 24000)

Docker Compose 사용 방법

1. docker-compose 실행:
```bash
docker-compose up --build

Docker 사용 방법

  1. Docker 이미지 빌드
    docker build -t audio-chunk-reassembly .
  2. Docker 컨테이너 실행 (input/output 디렉토리 마운트)
    docker run --rm \
      -v $(pwd)/input:/app/input \
      -v $(pwd)/output:/app/output \
      audio-chunk-reassembly \
      -i input/예제.wav \
      -o output/결과.wav \
      -n 4 \
      -b 192k \
      -r 24000

디렉토리 구조

/
├── audio_chunk_reassembly.py
├── input/
│   └── .gitkeep
├── output/
│   └── .gitkeep
├── .gitignore
└── README.md

참고사항

  • 해당 파일은 Cursor와 gpt o4-mini를 이용하여 작성했습니다.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors