Update app.py
Browse files
app.py
CHANGED
@@ -161,8 +161,10 @@ def main():
|
|
161 |
elif file_extension == ".mp3":
|
162 |
wav3, sample_rate = librosa.load("test.mp3")
|
163 |
st.markdown(wav3)
|
164 |
-
|
165 |
-
#wav = torch.
|
|
|
|
|
166 |
wav = audio.unsqueeze(0).unsqueeze(0)
|
167 |
st.markdown("Before unsqueeze mp3")
|
168 |
st.markdown(wav)
|
|
|
161 |
elif file_extension == ".mp3":
|
162 |
wav3, sample_rate = librosa.load("test.mp3")
|
163 |
st.markdown(wav3)
|
164 |
+
#RuntimeError: Could not infer dtype of numpy.float32
|
165 |
+
#wav = torch.tensor(wav3).float() / 32768.0
|
166 |
+
#
|
167 |
+
wav = torch.from_numpy(wav3) #/32768.0
|
168 |
wav = audio.unsqueeze(0).unsqueeze(0)
|
169 |
st.markdown("Before unsqueeze mp3")
|
170 |
st.markdown(wav)
|