Giter Club home page Giter Club logo

Comments (6)

Ifan24 avatar Ifan24 commented on August 23, 2024

Hi, I'm trying to reproduce this issue. Could you share the parameters you used when you ran the script?

from gpt_subtitles.

fahd200581 avatar fahd200581 commented on August 23, 2024

I'm using the colab notebook, when I change the target language to en it still translate to zh

from gpt_subtitles.

fahd200581 avatar fahd200581 commented on August 23, 2024

#@title Running the Script

#@markdown If video_path is a YouTube link, the video will be downloaded at the video.
video_path = 'https://www.youtube.com/watch?v=F91vq9Clekk&pp=ygUVZmFsc2Vwb3NpdGl2ZSBwb2RjYXN0' #@param {type: 'string'}

#@markdown Choose a Whisper model.
model_type = 'large' #@param ["base", "small", "medium", "large"]

#@markdown The language to translate to (use language code).
target_language = 'en' #@param {type: 'string'}

#@markdown Method to use for translation.
translation_method = 'whisper' #@param ["google", "gpt", "whisper", "m2m100"]

if 'www.youtube.com' in video_path:
!python /content/youtube_dual_subtitles/main.py --youtube_url {video_path} --model {model_type} --target_language {target_language} --translation_method {translation_method}
else:
!python /content/youtube_dual_subtitles/main.py --local_video {video_path} --model {model_type} --target_language {target_language} --translation_method {translation_method}

from gpt_subtitles.

Ifan24 avatar Ifan24 commented on August 23, 2024

Hi, I just pushed a change that should fix the issue with translating to English using Whisper. It should now set the task as "translate" when the target language is English, as specified in the Whisper documentation. Please try running the script again with your desired target language and let me know if you encounter any further issues. Thanks for reporting this bug!

from gpt_subtitles.

fahd200581 avatar fahd200581 commented on August 23, 2024

thank you so much it works lika a charm!
I think even better than before, now it translate directly, before it used to provide the transcription then it translates it. now it's much faster.

I also had an Idea, I'm not sure if possible to use groqcloud and LLAMA 3 in this project for translation, as GroqCloud provides free API, that would be dope

thanks again for your fast response, such a great project

from gpt_subtitles.

Ifan24 avatar Ifan24 commented on August 23, 2024

Thanks for liking the project!

I've experimented with LLAMA 3 and other open-source LLMs for translation, but they often struggle with non-English output, likely due to their smaller model size. Fine-tuning could help, but it's resource-intensive and only works for that specific language. For now, those larger LLMs remain the most reliable choice, but I'm always open to exploring new possibilities as language models advance.

I appreciate your input for improving the project!

from gpt_subtitles.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.