ovh / ai-training-examples

Apache License 2.0
139 stars 74 forks source link

streamlit/speach-to-text silently failing #78

Closed dimadatasiv closed 1 year ago

dimadatasiv commented 1 year ago

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

SampleOrderTakingCustomerSupportPhilippines.wav.zip

dimadatasiv commented 1 year ago

Note i use streamlit/speech-to-text code as is

MathieuBsqt commented 1 year ago

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:

MathieuBsqt commented 1 year ago

This issue has been closed due to inactivity. If you believe it is still relevant, please leave a comment below.