Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
Commit ·
c9a398a
1
Parent(s): 2da810e
Update app.py
Browse files
app.py
CHANGED
|
@@ -118,7 +118,6 @@ def processFile(filePath):
|
|
| 118 |
|
| 119 |
@st.cache_data
|
| 120 |
def extract_speaker_clip(file_path, speaker, _annotation, clip_duration=5.0):
|
| 121 |
-
"""Extract a short audio clip for a speaker from their first segment."""
|
| 122 |
waveform, sample_rate = torchaudio.load(file_path)
|
| 123 |
for segment, _, label in _annotation.itertracks(yield_label=True):
|
| 124 |
if label == speaker and segment.duration >= 1.0:
|
|
|
|
| 118 |
|
| 119 |
@st.cache_data
|
| 120 |
def extract_speaker_clip(file_path, speaker, _annotation, clip_duration=5.0):
|
|
|
|
| 121 |
waveform, sample_rate = torchaudio.load(file_path)
|
| 122 |
for segment, _, label in _annotation.itertracks(yield_label=True):
|
| 123 |
if label == speaker and segment.duration >= 1.0:
|