Skip to content

Commit

Permalink
Merge pull request #458 from jhj0517/fix/feed-proper-audio
Browse files Browse the repository at this point in the history
Set `origin_audio` after bgm removal
  • Loading branch information
jhj0517 authored Jan 15, 2025
2 parents a197984 + 4b82d2f commit e51cbb1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion modules/whisper/base_transcription_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ def run(self,
params = TranscriptionPipelineParams.from_list(list(pipeline_params))
params = self.validate_gradio_values(params)
bgm_params, vad_params, whisper_params, diarization_params = params.bgm_separation, params.vad, params.whisper, params.diarization
origin_audio = deepcopy(audio)

if bgm_params.is_separate_bgm:
music, audio, _ = self.music_separator.separate(
Expand All @@ -130,6 +129,8 @@ def run(self,
if bgm_params.enable_offload:
self.music_separator.offload()

origin_audio = deepcopy(audio)

if vad_params.vad_filter:
vad_options = VadOptions(
threshold=vad_params.threshold,
Expand Down

0 comments on commit e51cbb1

Please sign in to comment.