Hey @hbredin,
Will check on this. Your still working with this app right?
Marisa
@Marisa_Smith Yes, this app. And am using the .wav audio files available here for testing: pyannote-audio/tests/data at develop ¡ pyannote/pyannote-audio ¡ GitHub
Those are 30seconds long so the visual output should also be 30s longâŚ
Hey @hbredin,
I have tested this out locally, and I am able to upload a whole audio file (33 sec in length) using Streamlit 0.76 and it plays fine when I pass it to st.audio. See my attached screen shot:
@karriebear noticed that your passing the file object into Inference but we are unclear on what that does. What sort of processing are you doing on the audio?
vad = Inference(
"hbredin/VoiceActivityDetection-PyanNet-DIHARD",
batch_size=8,
device="cpu",
)
Marisa
Thanks @Marisa_Smith @karriebear for looking into this!
(For some reason â I cannot post links in here. Youâd have to add the github.com prefix yourselfâŚ)
Code of Inference class is here: pyannote/pyannote-audio/blob/977c3de8f7d062c7781b1b7ed45f38ba254b5118/pyannote/audio/core/inference.py#L44.
It starts by loading the whole file here: pyannote/pyannote-audio/blob/977c3de8f7d062c7781b1b7ed45f38ba254b5118/pyannote/audio/core/inference.py#L471
The above line actually calls torchaudio.load(file) here: pyannote/pyannote-audio/blob/977c3de8f7d062c7781b1b7ed45f38ba254b5118/pyannote/audio/core/io.py#L254
Could it possible that file_uploader provides a file handle to the rest of the code while it is still being uploaded? The behavior I expected that it would only return once the file is completely uploaded.
I have a similar issue.
I have two pages in my app and each of them accepts an image. Once I am done working on one page and move to the next, I still see the file that was uploaded on the previous page as the uploaded file on the current page.
I am not using any caching and using streamlit 0.76
did you find a solution to this?