convert und bis 250tes Wort

This commit is contained in:
Sven Riwoldt
2025-02-03 20:19:41 +01:00
parent 4811f5dea3
commit bf38148e9f
203 changed files with 40 additions and 14 deletions

19
mp3cut/fertig/convert.py Normal file
View File

@@ -0,0 +1,19 @@
from pydub import AudioSegment
import sys,os
def convert(wav):
# Lade die WAV-Datei
audio = AudioSegment.from_wav(wav)
print(wav)
output = os.path.splitext(wav)[0]
outputname = output+".mp3"
# print(outputname)
# Speichere sie als MP3 (z.B. mit einer Bitrate von 192 kbps)
audio.export(outputname, format="mp3", bitrate="192k")
print("Konvertierung abgeschlossen!")
convert(sys.argv[1])