Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -68,7 +68,9 @@ def processFile(filePath):
|
|
| 68 |
print("Detecting speakers")
|
| 69 |
annotations = pipeline({"waveform": waveformEnhanced, "sample_rate": sampleRate})
|
| 70 |
print("Speakers Detected")
|
| 71 |
-
|
|
|
|
|
|
|
| 72 |
|
| 73 |
def addCategory():
|
| 74 |
newCategory = st.session_state.categoryInput
|
|
|
|
| 68 |
print("Detecting speakers")
|
| 69 |
annotations = pipeline({"waveform": waveformEnhanced, "sample_rate": sampleRate})
|
| 70 |
print("Speakers Detected")
|
| 71 |
+
totalTimeInSeconds = int(waveformEnhanced.shape[-1]/sampleRate)
|
| 72 |
+
print("Time in seconds calculated")
|
| 73 |
+
return annotations, totalTimeInSeconds
|
| 74 |
|
| 75 |
def addCategory():
|
| 76 |
newCategory = st.session_state.categoryInput
|