MCPcopy
hub / github.com/Audio-AGI/AudioSep / prompt_text

Method prompt_text

models/CLAP/training/data.py:137–141  ·  view source on GitHub ↗
(self, target)

Source from the content-addressed store, hash-verified

135 return x[crop_pos : crop_pos + crop_size]
136
137 def prompt_text(self, target):
138 events = _AUDIOSET_MAP[np.where(target > 0)]
139 event_text = "The sounds of " + ", ".join(events[:-1]) + " and " + events[-1]
140 text = tokenize(event_text)[0]
141 return text
142
143 def __getitem__(self, index):
144 """Load waveform, text, and target of an audio clip

Callers 1

__getitem__Method · 0.95

Calls 1

tokenizeFunction · 0.90

Tested by

no test coverage detected