重要前提
安装AI Skills的关键前提是:必须科学上网,且开启TUN模式,这一点至关重要,直接决定安装能否顺利完成,在此郑重提醒三遍:科学上网,科学上网,科学上网。查看完整安装教程 →
audio-converter by dkyazzentwatwa/chatgpt-skills
npx skills add https://github.com/dkyazzentwatwa/chatgpt-skills --skill audio-converter在流行的音频格式之间进行转换,并可控制质量设置。支持批量处理,并尽可能保留元数据。
from scripts.audio_converter import AudioConverter
# 简单转换
converter = AudioConverter("input.wav")
converter.convert("output.mp3")
# 带质量设置
converter = AudioConverter("input.flac")
converter.bitrate(320).sample_rate(44100).convert("output.mp3")
# 批量转换目录
AudioConverter.batch_convert("./input_folder", "./output_folder", format="mp3", bitrate=192)
# 从文件
converter = AudioConverter("audio.wav")
converter.bitrate(192) # kbps (用于有损格式)
converter.sample_rate(44100) # Hz
converter.channels(2) # 1=单声道, 2=立体声
converter.normalize(True) # 标准化音量
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
# 转换为格式 (从扩展名推断)
converter.convert("output.mp3")
# 明确指定格式
converter.convert("output", format="mp3")
# 转换目录中的所有文件
AudioConverter.batch_convert(
input_dir="./wavs",
output_dir="./mp3s",
format="mp3",
bitrate=320
)
# 简单转换
python audio_converter.py --input song.wav --output song.mp3
# 带质量设置
python audio_converter.py --input song.flac --output song.mp3 --bitrate 320 --sample-rate 44100
# 批量转换
python audio_converter.py --input-dir ./wavs --output-dir ./mp3s --format mp3 --bitrate 192
# 转换时进行标准化
python audio_converter.py --input song.wav --output song.mp3 --normalize
| 参数 | 描述 | 默认值 |
|---|---|---|
--input | 输入音频文件 | 必需 |
--output | 输出文件路径 | 必需 |
--input-dir | 批量处理的输入目录 | - |
--output-dir | 批量处理的输出目录 | - |
--format | 输出格式 | 从扩展名推断 |
--bitrate | 比特率 (kbps) | 192 |
--sample-rate | 采样率 (Hz) | 原始值 |
--channels | 声道数 | 原始值 |
--normalize | 标准化音量 | False |
| 格式 | 扩展名 | 类型 | 备注 |
|---|---|---|---|
| MP3 | .mp3 | 有损 | 兼容性最佳 |
| WAV | .wav | 无损 | 文件较大 |
| FLAC | .flac | 无损 | 压缩无损 |
| OGG | .ogg | 有损 | 开放格式 |
| M4A | .m4a | 有损 | AAC 编解码器 |
| AIFF | .aiff | 无损 | Apple 格式 |
converter = AudioConverter("recording.wav")
converter.bitrate(320).convert("recording.mp3")
source = AudioConverter("album.flac")
# 高质量 MP3
source.bitrate(320).convert("album_hq.mp3")
# 标准 MP3
source.bitrate(192).convert("album_std.mp3")
# 用于流媒体的 OGG
source.bitrate(128).convert("album.ogg")
# 将所有 WAV 录音转换为具有播客设置的 MP3
AudioConverter.batch_convert(
input_dir="./raw_episodes",
output_dir="./episodes",
format="mp3",
bitrate=128,
sample_rate=44100,
channels=1 # 播客使用单声道
)
pydub>=0.25.0
soundfile>=0.12.0
注意 : 需要系统上安装 FFmpeg 以支持 MP3/M4A 格式。
每周安装次数
61
代码仓库
GitHub 星标数
39
首次出现
2026年1月24日
安全审计
安装于
gemini-cli51
opencode51
cursor49
codex49
github-copilot47
cline43
Convert audio files between popular formats with control over quality settings. Supports batch processing and maintains metadata where possible.
from scripts.audio_converter import AudioConverter
# Simple conversion
converter = AudioConverter("input.wav")
converter.convert("output.mp3")
# With quality settings
converter = AudioConverter("input.flac")
converter.bitrate(320).sample_rate(44100).convert("output.mp3")
# Batch convert directory
AudioConverter.batch_convert("./input_folder", "./output_folder", format="mp3", bitrate=192)
# From file
converter = AudioConverter("audio.wav")
converter.bitrate(192) # kbps (for lossy formats)
converter.sample_rate(44100) # Hz
converter.channels(2) # 1=mono, 2=stereo
converter.normalize(True) # Normalize volume
# Convert to format (inferred from extension)
converter.convert("output.mp3")
# Explicit format
converter.convert("output", format="mp3")
# Convert all files in directory
AudioConverter.batch_convert(
input_dir="./wavs",
output_dir="./mp3s",
format="mp3",
bitrate=320
)
# Simple conversion
python audio_converter.py --input song.wav --output song.mp3
# With quality settings
python audio_converter.py --input song.flac --output song.mp3 --bitrate 320 --sample-rate 44100
# Batch convert
python audio_converter.py --input-dir ./wavs --output-dir ./mp3s --format mp3 --bitrate 192
# Normalize during conversion
python audio_converter.py --input song.wav --output song.mp3 --normalize
| Argument | Description | Default |
|---|---|---|
--input | Input audio file | Required |
--output | Output file path | Required |
--input-dir | Input directory for batch | - |
--output-dir | Output directory for batch | - |
--format | Output format | From extension |
| Format | Extension | Type | Notes |
|---|---|---|---|
| MP3 | .mp3 | Lossy | Most compatible |
| WAV | .wav | Lossless | Large files |
| FLAC | .flac | Lossless | Compressed lossless |
| OGG | .ogg | Lossy | Open format |
| M4A | .m4a | Lossy | AAC codec |
| AIFF | .aiff | Lossless | Apple format |
converter = AudioConverter("recording.wav")
converter.bitrate(320).convert("recording.mp3")
source = AudioConverter("album.flac")
# High quality MP3
source.bitrate(320).convert("album_hq.mp3")
# Standard MP3
source.bitrate(192).convert("album_std.mp3")
# OGG for streaming
source.bitrate(128).convert("album.ogg")
# Convert all WAV recordings to MP3 with podcast settings
AudioConverter.batch_convert(
input_dir="./raw_episodes",
output_dir="./episodes",
format="mp3",
bitrate=128,
sample_rate=44100,
channels=1 # Mono for podcasts
)
pydub>=0.25.0
soundfile>=0.12.0
Note : Requires FFmpeg installed on system for MP3/M4A support.
Weekly Installs
61
Repository
GitHub Stars
39
First Seen
Jan 24, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
gemini-cli51
opencode51
cursor49
codex49
github-copilot47
cline43
Skills CLI 使用指南:AI Agent 技能包管理器安装与管理教程
52,700 周安装
--bitrate | Bitrate in kbps | 192 |
--sample-rate | Sample rate in Hz | Original |
--channels | Number of channels | Original |
--normalize | Normalize volume | False |