feat: start.sh

This commit is contained in:
2025-10-11 12:11:22 +08:00
parent 753a11ac67
commit f4457e882f
2 changed files with 24 additions and 15 deletions

View File

@@ -1,15 +0,0 @@
#!/bin/bash
# 创建输出文件夹
input_dir="$1"
output_dir="$input_dir/output_wav"
mkdir -p "$output_dir"
# 遍历MP3文件并转换
find "$input_dir" -maxdepth 1 -type f -name "*.mp3" | while read -r file; do
filename=$(basename "$file" .mp3)
ffmpeg -i "$input_dir/$filename.mp3" -ar 44100 -ac 2 -b:a 1411k "$output_dir/$filename.wav"
# ffmpeg -i "$file" -ar 44100 -ac 2 -b:a 1411k "$output_dir/$filename.wav"
done
echo "转换完成!文件保存在 output_wav 文件夹"

24
start.sh Executable file
View File

@@ -0,0 +1,24 @@
#!/bin/bash
# 创建输出文件夹
#wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
#chmod +x Miniconda3-latest-Linux-x86_64.sh -y
#./Miniconda3-latest-Linux-x86_64.sh -y
#source ~/.bashrc -y
#conda config --set show_channel_urls yes
#conda env create -f environment.yml
#conda create -n petshy python=3.9 -y
conda init
source ~/.bashrc
conda activate petshy
echo "当前激活的环境:$(conda info --envs | grep '*' | awk '{print $1}')"
python --version
conda env update --file environment.yml - y