streamlit/speach-to-text silently failing
dimadatasiv opened this issue · comments
I am trying diarization of wav file (on my Macos machine)
My steps:
docker build . -t streamlit_app:latest
docker run --rm -it -p 8501:8501 --user=42420:42420 streamlit_app:latest
set token in UI
Provide wav file
select "differentiate speakers" option
Result:
silently fail after downloading models
Note i use streamlit/speech-to-text code as is
Hi @dimadatasiv
Thank you for trying our application.
Here is the code which loads the diarization model:
# Load Diarization model (Differentiate speakers)
with st.spinner("Loading Diarization Model"):
try:
dia_pipeline = pickle.load(open("models/dia_pipeline.sav", 'rb'))
except FileNotFoundError:
dia_pipeline = Pipeline.from_pretrained("pyannote/speaker-diarization@2.1",
use_auth_token=st.session_state["my_HF_token"])
# If the token hasn't been modified, dia_pipeline will automatically be set to None. The functionality will then be disabled.
If you can't load pyannote.audio's diarization model, there are 2 possible reasons:
-
Either you have a
"models/dia_pipeline.sav"
named file, which is therefore imported by the code above, and which is the result of an error, as pyannote's diarization can normally no longer be imported from a file, since version 2>= of the pyannote library. -
Your access token is not functional. Have you tried loading the diarization model in another environment, such as a notebook or local script?
This issue has been closed due to inactivity. If you believe it is still relevant, please leave a comment below.