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?
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.