Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Local wisper #1091

Closed
wants to merge 20 commits into from
Closed

Conversation

aadityamundhalia
Copy link
Contributor

@aadityamundhalia aadityamundhalia commented Sep 1, 2023

Description

This pr resolves the issue with uploading video and audio files mp3 and mp3. The installed whisper added to requirements.txt allows to transcribe the audio or video to txt and that is converted to langchains.

Checklist before requesting a review

Please delete options that are not relevant.

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented hard-to-understand areas
  • I have ideally added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes -> was not able to to run the tests locally sorry I am not python programmer so got bit limited knowledge
  • Any dependent changes have been merged

Video (if appropriate):

Wisper.mp4

@vercel
Copy link

vercel bot commented Sep 1, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 7, 2023 0:30am

@vercel
Copy link

vercel bot commented Sep 1, 2023

@aadityamundhalia is attempting to deploy a commit to the Quivr-app Team on Vercel.

A member of the Team first needs to authorize it.

@aadityamundhalia
Copy link
Contributor Author

If you guys can help me by explaining how I can run tests on local I will be able to do it on my next PR

.backend_env.example Outdated Show resolved Hide resolved
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rename to whisper with an h

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

backend/tests/test_files/video.mp4 Outdated Show resolved Hide resolved
backend/utils/processors.py Outdated Show resolved Hide resolved
backend/parsers/wisper.py Outdated Show resolved Hide resolved
backend/parsers/common.py Outdated Show resolved Hide resolved
@QuivrHQ QuivrHQ deleted a comment from jameslacia Sep 4, 2023
@gozineb
Copy link
Contributor

gozineb commented Sep 7, 2023

Hi @aadityamundhalia, just tested it locally and had the following error while upload the mp4 in the test files:
Screenshot 2023-09-07 at 13 09 43

Can you please take a look at it ?

@aadityamundhalia
Copy link
Contributor Author

@gozineb can you please share your .env file.
also you need to rebuild the containers so try:

docker-compose down
docker-compose -f docker-compose.dev.gpu.yml up -d --build

I will re run on my local to confirm

@gozineb
Copy link
Contributor

gozineb commented Sep 7, 2023

I have updated my .env in the backend with LOCAL_WHISPER=True. I pruned and rebuilt the containers 🥲.
I have tested the make dev and the make prod which are used respectively in local and in prod. They should still be able to work after your changes.
Also, with docker-compose -f docker-compose.dev.gpu.yml up -d --build, i get the following error:
Screenshot 2023-09-07 at 13 31 11

I run quivr on an apple M1

@aadityamundhalia
Copy link
Contributor Author

@gozineb my apologies I did tested after my changes looks like it did no load the latest at that time. When retried was able to replicated the issue there was a small issue with the quotes that is now resolved. I will appreciate if you can have another go thanks

@StanGirard
Copy link
Collaborator

Thé issue might be that you don't have a gpu and therefore cannot test.

@aadityamundhalia
Copy link
Contributor Author

@StanGirard this will work on cpu as well just bit slow but will work tried on my 12900k was no issues. There was an issue with my if statement that is now resolved. Try again please it should work

@gozineb
Copy link
Contributor

gozineb commented Sep 7, 2023

@aadityamundhalia seems to be working now for make dev !! Still same issue with make prod though : Error processing file: cannot use a string pattern on a bytes-like object

And still getting the same error with the docker-compose -f docker-compose.dev.gpu.yml up -d --build

@aadityamundhalia
Copy link
Contributor Author

aadityamundhalia commented Sep 7, 2023

@gozineb you can't run the gpu yml on Mac as Mac don't have gpu. Try the regular one like dev.yml

@gozineb
Copy link
Contributor

gozineb commented Sep 11, 2023

Sorry @aadityamundhalia, still not working for me: Error processing file: cannot use a string pattern on a bytes-like object. Don't think it has anything to do with the gpu/MAC

@aadityamundhalia
Copy link
Contributor Author

@gozineb I will try to create a step by step by step document for how to get it working will also try to run it on my m1 mac to see if there are any issues.

@aadityamundhalia
Copy link
Contributor Author

@gozineb Sorry for late reply, I have not forgotten about this. Just bit occupied these days. So far I have learned that local wisper do not work on m1 mac.

@mamadoudicko
Copy link
Contributor

mamadoudicko commented Oct 27, 2023

Closing since it has been a while. Feel free to reopen it when you are available, @aadityamundhalia.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants