MCPcopy Create free account
hub / github.com/AlayaLab/Hive / load_audio

Function load_audio

pipeline/code/06_superres_apollo.py:29–32  ·  view source on GitHub ↗
(file_path)

Source from the content-addressed store, hash-verified

27device = 'cuda' if torch.cuda.is_available() else 'cpu'
28
29def load_audio(file_path):
30 audio, samplerate = librosa.load(file_path, mono=True, sr=44100)
31 audio = audio[None, :]
32 return torch.from_numpy(audio), samplerate
33
34def get_config(config_path):
35 with open(config_path) as f:

Callers 1

prepare_audio_chunksFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected