Coder Social home page Coder Social logo

niedev / rtranslator Goto Github PK

View Code? Open in Web Editor NEW
5.8K 42.0 438.0 24.87 MB

Open source real-time translation app for Android that runs locally

License: Apache License 2.0

Java 11.13% CMake 0.22% Perl 0.09% Jupyter Notebook 0.51% Shell 0.01% Python 0.92% SWIG 0.75% C++ 86.37%
translator bluetooth-le realtime-translator android-app onnx onnxruntime sentencepiece transformers translation nllb

rtranslator's People

Contributors

abc0922001 avatar agiens02 avatar eltociear avatar gitgitro avatar jingzic avatar lucamartino97 avatar niedev avatar originalsimon avatar starlightjy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rtranslator's Issues

Where are the Whisper models defined?

Hi, this app is pretty cool nice job, I was amazed by it's speed even though I read it's using the small Whisper model. For this reason I wanted to explore switching to using onnxruntime for running Whisper in my app Transcribro to see if I can switch to a bigger model while keeping the same speed (currently using tiny q8_0 with whisper.cpp). However, I couldn't find where the code that uses the Whisper model or how to use the Whisper model in onnxruntime. Could you direct me to an example or where this app uses the Whisper model? Thanks!

Language coverage and alternatives

Hi,
NLLB is good start, however, there are many other opensource models that were released in last few years. Wikimedia Foundation has been providing a machine translation service based on a collection of such models(all free and opensource) and has coverage for 250+ languages. See https://translate.wmcloud.org/ and https://diff.wikimedia.org/2023/06/13/mint-supporting-underserved-languages-with-open-machine-translation/

I wonder if it is possible to bring these powerful models optimized for CPU to this app. Disclaimer: I am lead developer of that MT system at Wikimedia Foundation.

china use RTranslator error

Not real-time

It is not a real-time translation, just a sentence translation, when Vad is detected.

[Feature request] Work in PC/web

I want to use Rtranslator in one-direction, that is, speak from my device so it shows the translation on projected screen of a computer. This is for teaching or conferences purposes. It seems this is not currently possible. Some other software allow this, for example Microsoft translator (or it did so in the past at least). Would be amazing to have this in the future.

Add to F-Droid

F-Droid is an installable catalogue of FOSS (Free and Open Source Software) applications for the Android platform. Any chance of adding this project to F-Droid?

https://f-droid.org/

No Google tts engine (I installed it)

After downloaded all components ,this app said there's no google tts engine.i installed it in google play.but this app still asked me to install it.
I found google iis engine has a new name
“Speech Recognition and Synthesis from Google”.
My phone is Samsung Galaxy f52 5g

[Feature request] Material You 3 App icon design

Thank you for wanting to share an idea! But before starting, ensure to check if this feature request respects the following requirements:

  • [ x] It is written in English (I can translate what you say, but issues written in English are easier to read for the other users).
  • [ x] There is not already a similar feature request among the open or closed issues.

Describe the solution you'd like
For example
Screenshot_20240701-132036

Feature request

Can you implement this library in your app? Google official api are costly so if you implement this library it would be free and unlimited text translation.

An error happen when I finished the downloading

How to solve an error? The error demonstrate that there was an error with the tts initialization,do you want to continue without tts? I have tow choies ,Exit and Continue.
In other words, is this error that i should be concered about?
微信图片_20240624154721

download models

Using app to download models is too slow. Use the computer to download 10 models in 2.0 and copy them to the corresponding location. Why do you still need to restart downloading models when you open the app?

[Feature request]translate for the GalleryImageSelector

hello!niedev.
I found that the GalleryImageSelector seems to only support English. I have tried to add multilingual support to it (currently supporting both English and Simplified Chinese). You can find my fork here. I'm not sure if this will cause any other issues, but I have no problem running it on my own phone. Would you consider adding multilingual support to the selector as well?
In addition, the RTranslator notification still uses hardcode, and I have attempted to translate it here.
I am still learning Java. If the above suggestions will cause any problems, please let me know.

Exit Button

Sometimes I want it to not run in the background when in close it, which is always.

This is a beautiful application, I wish I did not need to kill it to exit fully.

[Question] Examples of work flow in Python?

  • The question is written in English (I can translate what you say, but questions written in English are easier to read for the other users).

Sorry for my poor java, could we provide some 'python-friendly' example code of work flow in python and their usage of models?
I have a great interest in running a lite model on mobile device, but unfamilar with onnx and onnxruntime, now I have no idea what to do next after loading an onnx model. Could not write corespoding python code for Translator.java:

import onnx
import onnxruntime as ort

model_path = 'rtraslator/NLLB_encoder.onnx'
model = onnx.load(model_path)
sess = ort.InferenceSession(model.SerializeToString())
sess.run(??)

It would be a great help for so many pythoners to understand what is under the hood. Thanks~

Sideloading of all components (onnx files)?

Hi,

Would you please provide instructions, or a method, for sideloading of the components (onnx files) in an off-line mode, so that the app does not have to automatically download them upon first start.

This would most likely benefit everyone, for various reasons such as: lowering mobile data usage, ease of installation on multiple devices, privacy, etc.

Thanks!

tts initialization failed

this is on CalyxOS with eSpeak as the configured TTS engine. let me know if i can provide any other information

just thought

Hello,
As an end user, (My suggestions may be ridiculous because I have no software knowledge.)
"The model used is Whisper-Small-244M with KV cache."
Can Whisper-Large-V3 be used?
Can the user make a choice? (such as tiny, base, small, medium, large)
CPU and GPU are advancing rapidly in GSM phones.
For example, my phone is Qualcomm Snapdragon 8 Gen 2 and Adreno(TM) 740
Can corrections be made during the conversation to prevent people from understanding and translating the wrong word? (Walkie Talkie Mode).
(Walkie Talkie Mode) Can it be adapted for a single language?

Is it possible to input voice for Conversation Mode? (Without keyboard feature)

Support hebrew language

whisper.cpp supports Hebrew. Could you clarify the limitations that prevent rtranslator from supporting it? I noticed that ctranslate inference with NLLB also supports Hebrew.

This is a very innovative project!
Thanks!

Few suggestions

  1. Can you add Serbian to language selection list (its very similar language to Croatian)
  2. Can you add support for other TTS Engines: k2-fsa.github.io/sherpa/onnx/tts/apk-engine.html

The version is 2.0.1

There was an error loading the files of the models for translation and speech recognition,try restarting the app,if the problem persists then reset it.

[Feature request] Dark theme support

Thank you for wanting to share an idea! But before starting, ensure to check if this feature request respects the following requirements:

  • [x ] It is written in English (I can translate what you say, but issues written in English are easier to read for the other users).
  • [x ] There is not already a similar feature request among the open or closed issues.

Describe the solution you'd like
A clear and concise description of what you want to happen.
Please add support for dark theme, which will improve the appearance on devices with black theme and reduce battery consumption on OLED screens.

Integration of AI-Driven Features in RTranslator

The integration of AI-driven features into RTranslator has significantly improved its translation accuracy and efficiency. The recent enhancements leverage advanced machine learning models to deliver more precise translations across various languages. These upgrades are in line with our goal to continuously innovate and enhance user experience. For additional resources and tools that might complement RTranslator, check out this link.

Is it possible to add languages?

As stated in the title, is it possible to add languages? For example hungarian (magyar)?

If it is at all possible, how time consuming is it?

streaming transcription or push-to-talk

Thank you for wanting to share an idea! But before starting, ensure to check if this feature request respects the following requirements:

  • It is written in English (I can translate what you say, but issues written in English are easier to read for the other users).
  • There is not already a similar feature request among the open or closed issues.

Is your feature request related to a problem? Please describe.
transcription in walkie talkie mode does not work reliably in noisy environments. even with adjustments to microphone sensitivity, it never stops listening for input, which means translation never begins.

Describe the solution you'd like
either offer a user control for when to start translating the buffer, or switch to a steaming mechanism so that input doesn't need to end before translation starts.

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.