Spaces:
Runtime error
Runtime error
Kabatubare
commited on
Commit
•
e4b1e14
1
Parent(s):
de47a16
Update app.py
Browse files
app.py
CHANGED
@@ -4,10 +4,10 @@ import torch
|
|
4 |
import torchaudio
|
5 |
import traceback
|
6 |
|
7 |
-
def detect_watermark(
|
8 |
try:
|
9 |
# Load the audio file using torchaudio
|
10 |
-
waveform, sample_rate = torchaudio.load(
|
11 |
|
12 |
# Ensure waveform is 2D (channels, samples). If it's mono, add an axis.
|
13 |
if waveform.ndim == 2:
|
|
|
4 |
import torchaudio
|
5 |
import traceback
|
6 |
|
7 |
+
def detect_watermark(audio_file_path):
|
8 |
try:
|
9 |
# Load the audio file using torchaudio
|
10 |
+
waveform, sample_rate = torchaudio.load(audio_file_path)
|
11 |
|
12 |
# Ensure waveform is 2D (channels, samples). If it's mono, add an axis.
|
13 |
if waveform.ndim == 2:
|