File size: 516 Bytes
ad7ff93
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
from df.enhance import enhance, init_df, load_audio, save_audio
from df.utils import download_file

def Clear_voice():
  # Load default model
  out_path="enhanced.wav"
  model, df_state, _ = init_df()
  # Download and open some audio file. You use your audio files here
  audio_path = "audio_chunk_1.wav"
  audio, _ = load_audio(audio_path, sr=df_state.sr())
  # Denoise the audio
  enhanced = enhance(model, df_state, audio)
  # Save for listening
  save_audio(out_path, enhanced, df_state.sr())
  return out_path