Repository navigation
Fork initial release
Initial release of this fork; see the readme:
Fork (dpmm99/MNN-Android-Interpreted-Chat-Server) Readme: MNN Android Interpreted Chat Server
A fork of alibaba/MNN modifying their MNN Chat app for Android into a multi-user chat server with on-device LLM-powered interpretation.
Specifically, this modification adds a Wi-Fi hotspot mode, wherein the app hosts a text-based chatroom for multiple nearby users, with automatic language translation using the LLM of your choice.
LLM Support
Any LLM supported by MNN Chat can be used as the interpreter. Of those, both non-thinking models and those using <think>/</think> tags are fully supported.
Language Support
- The language selection screen and QR code labels cycle through ~46 hard-coded languages.
- Any language supported by the LLM is also supported by the app, in theory.
- All web UI text (outside of the language selection screen) has 3 hard-coded languages and will auto-translate on demand when a user selects a language for which it lacks a translation.
- Automatic UI translations are saved in the app cache for later reuse.
- The UI translation pipeline includes a few regular expressions to repair malformed JSON, since LLMs (especially small ones that are also quantized) often produce slightly incorrect output.
Connecting
Users scan the top QR code to connect to the server as a hotspot/router. If the host device has no internet connection, each user has to select "connect only this time" or "stay connected" on Android when prompted.
After connecting, users scan the bottom QR code to navigate to the chat web page using the web browser of their choice--they don't have to have this app, nor do they need to have internet access.
Chat Features
- Users must enter a name and may select a profile picture before joining.
- Newcomers receive the full chat history (since the server was last started), translated into their language from newest to oldest (but lower priority than newly sent messages).
- Messages are primarily plain text, but there is support for replying to a specific message.
- Via the context menu, any message can be retranslated using one additional previous message as context for improved accuracy. Each message is initially translated with no context other than the languages.
- For any message, you can view the original text, the previous translation, or the current translation.
- You can view the current chat participants from the web UI.
- You can export the chat, including the original language and the auto-translated version of each message.
- The host may chat within the app, where they can easily scroll to the QR codes or the latest LLM input/output, or in their default browser.
- The web app listens for broadcast events and updates the UI immediately when a translation is ready.
- The server continues running in the background as long as the OS does not terminate it due to low resources.