chore(tools): rename wav_arr_to_mp3_view to pcm_arr_to_mp3_view

This commit is contained in:
源文雨
2024-07-10 16:50:14 +09:00
parent 580463ce22
commit af8a4e378c
6 changed files with 9 additions and 7 deletions
+2 -2
View File
@@ -13,14 +13,14 @@ import numpy as np
import ChatTTS
from tools.audio import wav_arr_to_mp3_view
from tools.audio import pcm_arr_to_mp3_view
from tools.logger import get_logger
logger = get_logger("Command")
def save_mp3_file(wav, index):
data = wav_arr_to_mp3_view(wav)
data = pcm_arr_to_mp3_view(wav)
mp3_filename = f"output_audio_{index}.mp3"
with open(mp3_filename, "wb") as f:
f.write(data)