Skip to content

Commit 9c5c929

Browse files
committed
Use sox backend for ogg
1 parent 0440ca2 commit 9c5c929

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

‎acestep/pipeline_ace_step.py‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1393,9 +1393,12 @@ def save_wav_file(
13931393
output_path_wav = save_path
13941394

13951395
target_wav = target_wav.float()
1396-
logger.info(f"Saving audio to {output_path_wav}")
1396+
backend = "soundfile"
1397+
if format == "ogg":
1398+
backend = "sox"
1399+
logger.info(f"Saving audio to {output_path_wav} using backend {backend}")
13971400
torchaudio.save(
1398-
output_path_wav, target_wav, sample_rate=sample_rate, format=format
1401+
output_path_wav, target_wav, sample_rate=sample_rate, format=format, backend=backend
13991402
)
14001403
return output_path_wav
14011404

0 commit comments

Comments
 (0)