GithubHelp home page GithubHelp logo

michael811125 / chatwaifu_mobile Goto Github PK

View Code? Open in Web Editor NEW

This project forked from voine/chatwaifu_mobile

0.0 0.0 1.0 425.09 MB

移动版二次元 AI 老婆聊天器

License: MIT License

C++ 87.21% C 8.67% Objective-C 0.01% Java 0.15% Kotlin 2.34% Objective-C++ 0.65% CMake 0.89% Metal 0.08% AIDL 0.01%

chatwaifu_mobile's Introduction

ChatWaifu_Mobile

年轻人的第一个移动版老婆聊天器(雾

简介

Android 手机版的 ChatGPT 二次元聊天器。
目前内置如下模型,会自动播放 ChatGPT 的回复,由于内置为日语模型,其他语言的播放效果可能相当一言难尽, 可以替换增加本地模型。

模型1: 语音和模型均来自 Blue Archive 优香。
模型2: 语音和模型均来自命运石之门牧濑红莉栖 - Amadeus 限定,β 世界线警告 :).
模型3:语音和模型均来自 ANIPLEX 的作品 ATRI -My Dear Moments- 的主角亚托莉

  • 语言大模型来自 GhatGPT
  • 语音推理为客户端本地 VITS - ncnn
  • 图形渲染基于 Native Live2D
  • 语音输入识别为客户端本地 Sherpa - ncnn
  • UI 框架为 Jetpack Compose
  • 项目结构为 Retrofit + MVVM + LiveData/Flow + Room
  • 多个 ncnn 库似乎是进程独享资源,使用 AIDL 做进程间通信
  • 嘴形同步接入了 Native 版 meta - lipSync
  • 接了 baidu 翻译功能,如需则自行设置 appid 和 key,不需要可在 setting 页面关闭翻译功能

关于 ChatGPT

OpenAI Key 地址,将其输入登录页面的 Chat Key 部分就行,本地会缓存。

关于移动端 VITS

详见这里

关于 Live2D

使用基于 Native C++ 的原生版本,详见这里

关于语音识别输入

使用 Sherpa-ncnn ,详见这里

关于嘴形同步

接入了 Native 版 meta-lipSync,详见这里
注:不过由于 LipSync 在实际使用中发现会有时长同步/映射等等问题,太过麻烦,目前只是播一个循环动画

关于模型替换

VITS 模型

首先,模型需要参照这里,转成 ncnn 的版本,成功后会生成一个 config.json 以及很多的 bin 文件。将它们统一放在手机文件管理内 chatwaifu/vits/ 目录下,放完后整个目录是这样的:

文件管理:
├─chatwaifu
     ├─ vits
         ├─ yourModel
              ├─ config.json
              ├─ xxxx.bin
              ├─ xxxx.bin
              ├─ .....

Live2D 模型

支持官方标准的 Live2D 格式,需要将它们放在手机文件管理内 chatwaifu/live2d/ 目录下,放完后整个目录是这样的:

文件管理:
├─chatwaifu
     ├─ live2d
         ├─ yourModel
              ├─ yourModel.model3.json
              ├─ xxx.moc3
              ├─ xxx.exp3.json
              ├─ .....

注意

live2d 模型的名字与需要与 vits 模型的目录名一致,Live2D 的 model3.json 要和目录名一致

关于翻译

设置后会默认将 GPT 输出的语言翻译成日文交给 VITS,否则内置的模型说别的语言可能基本不出声...
接了 baidu 翻译,可以免费申请一个开发者账号 这里 ,将申请到的 appid 和 密钥填到登录页的第二第三栏,或者在左上角菜单里选取 setting ,进行更改就行了

关于角色设定

目前每个模型都有内置的设定,外部导入的模型可将设定填写到 Setting 页面的 External Setting 部分

示例图

免责声明

1、模型禁止商用!

2、不可将本软件用作任何非法用途,后果自负

鸣谢

感谢 @weirdseed 大佬实现的 Android 版 VITS !

说明视频

https://www.bilibili.com/video/BV1w24y1K799/

chatwaifu_mobile's People

Contributors

voine avatar

Forkers

asheshplays

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.