MCPcopy Create free account
hub / github.com/Audio-AGI/AudioSep / predict

Method predict

predict.py:20–31  ·  view source on GitHub ↗

Run a single prediction on the model

(
        self,
        audio_file: Path = Input(description="Input audio file."),
        text: str = Input(description="Input text.", default="water drops"),
    )

Source from the content-addressed store, hash-verified

18 )
19
20 def predict(
21 self,
22 audio_file: Path = Input(description="Input audio file."),
23 text: str = Input(description="Input text.", default="water drops"),
24 ) -> Path:
25 """Run a single prediction on the model"""
26
27 output_file = "/tmp/separated_audio.wav"
28
29 # AudioSep processes the audio at 32 kHz sampling rate
30 inference(self.model, str(audio_file), text, output_file, "cuda")
31 return Path(output_file)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected