├── frontend_nextjs
├── components
│ ├── noop.ts
│ ├── generateEmptyFft.ts
│ ├── types
│ │ ├── ChatMessage.ts
│ │ ├── JsonMessage.ts
│ │ ├── AudioConfiguration.ts
│ │ ├── index.ts
│ │ ├── AudioOutput.ts
│ │ ├── PauseAssistantMessage.ts
│ │ ├── UserInterruption.ts
│ │ ├── ResumeAssistantMessage.ts
│ │ ├── PostAssistantMessage.ts
│ │ ├── AssistantInput.ts
│ │ ├── AudioInput.ts
│ │ ├── AssistantMessage.ts
│ │ ├── ChatMetadata.ts
│ │ ├── Context.ts
│ │ ├── UserMessage.ts
│ │ └── SessionSettings.ts
│ ├── connection-message.ts
│ ├── auth.ts
│ ├── Card.tsx
│ ├── audio-message.ts
│ ├── external-link.tsx
│ ├── toaster.tsx
│ ├── StartCall.tsx
│ ├── MicFFT.tsx
│ ├── events.ts
│ ├── Chat.tsx
│ ├── convertFrequencyScale.ts
│ ├── useEncoding.ts
│ ├── ui
│ │ ├── toggle.tsx
│ │ └── button.tsx
│ ├── useCallDuration.ts
│ ├── errors.ts
│ ├── logos
│ │ ├── BWLogo.tsx
│ │ ├── GitHub.tsx
│ │ └── FenXuan.tsx
│ ├── Expressions.tsx
│ ├── Nav.tsx
│ ├── CardPanel.tsx
│ ├── runtime.ts
│ ├── useMessages.ts
│ ├── Controls.tsx
│ ├── useVoiceClient.ts
│ ├── useMicrophone.ts
│ ├── Messages.tsx
│ └── ChatSocket.ts
├── preview.png
├── public
│ ├── favicon.ico
│ ├── icons
│ │ ├── hat1.jpg
│ │ ├── hat2.jpg
│ │ └── hat3.jpg
│ ├── favicon-16x16.png
│ ├── apple-touch-icon.png
│ ├── vercel.svg
│ └── next.svg
├── postcss.config.mjs
├── .env.example
├── next-env.d.ts
├── app
│ ├── page.tsx
│ ├── error.tsx
│ ├── layout.tsx
│ └── globals.css
├── utils
│ ├── index.ts
│ ├── expressionLabels.ts
│ └── expressionColors.ts
├── components.json
├── .gitignore
├── tsconfig.json
├── package.json
└── tailwind.config.ts
├── assets
├── pipeline.png
├── pipeline_zh.png
├── proactive_pipeline.png
└── proactive_showcase.png
├── backend
├── ref_audio
│ ├── ref_wav
│ │ ├── ref_audio_1.wav
│ │ ├── ref_audio_2.wav
│ │ ├── ref_audio_3.wav
│ │ └── ref_audio_default.wav
│ └── ref.json
├── prompts
│ ├── proactivity
│ │ ├── initialize.txt
│ │ ├── update.txt
│ │ ├── summary.txt
│ │ ├── panding.txt
│ │ ├── fact.txt
│ │ ├── inside_conflict.txt
│ │ ├── reject.txt
│ │ └── nci.txt
│ ├── README.md
│ └── character
│ │ ├── anlingrong.txt
│ │ ├── zhangwei.txt
│ │ └── zhenzhen.txt
├── requirements_proactivity.txt
├── requirements.txt
├── requirements-rag.txt
├── tests
│ ├── conftest.py
│ ├── test_siliconflow_tts.py
│ ├── test_siliconflow_asr.py
│ ├── test_lm.py
│ ├── test_llm_api.py
│ ├── test_emoji_module.py
│ ├── test_nontext_interaction_module.py
│ ├── test_virtualcharacter_module.py
│ ├── test_memory_module.py
│ ├── test_proactivity_module.py
│ ├── test_paraformer_asr.py
│ ├── test_rag_lmapi.py
│ ├── test_uid.py
│ ├── test_utils.py
│ ├── test_cosyvoice_tts.py
│ └── test_llm_uid.py
├── utils.py
├── uid.py
├── README.zh.md
└── README.md
├── NOTICE
├── .gitignore
├── .github
└── workflows
│ └── api_handler.yml
└── README.zh.md
/frontend_nextjs/components/noop.ts:
--------------------------------------------------------------------------------
1 | export const noop = () => {};
2 |
--------------------------------------------------------------------------------
/assets/pipeline.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendilab/CleanS2S/HEAD/assets/pipeline.png
--------------------------------------------------------------------------------
/assets/pipeline_zh.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendilab/CleanS2S/HEAD/assets/pipeline_zh.png
--------------------------------------------------------------------------------
/frontend_nextjs/preview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendilab/CleanS2S/HEAD/frontend_nextjs/preview.png
--------------------------------------------------------------------------------
/assets/proactive_pipeline.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendilab/CleanS2S/HEAD/assets/proactive_pipeline.png
--------------------------------------------------------------------------------
/assets/proactive_showcase.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendilab/CleanS2S/HEAD/assets/proactive_showcase.png
--------------------------------------------------------------------------------
/frontend_nextjs/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendilab/CleanS2S/HEAD/frontend_nextjs/public/favicon.ico
--------------------------------------------------------------------------------
/frontend_nextjs/public/icons/hat1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendilab/CleanS2S/HEAD/frontend_nextjs/public/icons/hat1.jpg
--------------------------------------------------------------------------------
/frontend_nextjs/public/icons/hat2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendilab/CleanS2S/HEAD/frontend_nextjs/public/icons/hat2.jpg
--------------------------------------------------------------------------------
/frontend_nextjs/public/icons/hat3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendilab/CleanS2S/HEAD/frontend_nextjs/public/icons/hat3.jpg
--------------------------------------------------------------------------------
/backend/ref_audio/ref_wav/ref_audio_1.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendilab/CleanS2S/HEAD/backend/ref_audio/ref_wav/ref_audio_1.wav
--------------------------------------------------------------------------------
/backend/ref_audio/ref_wav/ref_audio_2.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendilab/CleanS2S/HEAD/backend/ref_audio/ref_wav/ref_audio_2.wav
--------------------------------------------------------------------------------
/backend/ref_audio/ref_wav/ref_audio_3.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendilab/CleanS2S/HEAD/backend/ref_audio/ref_wav/ref_audio_3.wav
--------------------------------------------------------------------------------
/frontend_nextjs/public/favicon-16x16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendilab/CleanS2S/HEAD/frontend_nextjs/public/favicon-16x16.png
--------------------------------------------------------------------------------
/frontend_nextjs/public/apple-touch-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendilab/CleanS2S/HEAD/frontend_nextjs/public/apple-touch-icon.png
--------------------------------------------------------------------------------
/backend/ref_audio/ref_wav/ref_audio_default.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendilab/CleanS2S/HEAD/backend/ref_audio/ref_wav/ref_audio_default.wav
--------------------------------------------------------------------------------
/frontend_nextjs/components/generateEmptyFft.ts:
--------------------------------------------------------------------------------
1 | export function generateEmptyFft(): number[] {
2 | return Array.from({ length: 24 }).map(() => 0);
3 | }
4 |
--------------------------------------------------------------------------------
/backend/prompts/proactivity/initialize.txt:
--------------------------------------------------------------------------------
1 | # 任务目标:
2 | - 根据收到的对话和要素名称,从对话中提取与要素名称相关的信息
3 | - 按照常识扩展信息的细节,但不可以添加、减少或改变信息的内容
4 | - 概括信息内容,不超过50字
5 | - 只输出信息,不输出要素名称
6 |
7 | # 可以输出单个或多个字符串
--------------------------------------------------------------------------------
/backend/prompts/proactivity/update.txt:
--------------------------------------------------------------------------------
1 | # 任务目标:
2 | - 根据你收到的对话和要素,提取与要素名称相关的信息
3 | - 按照常识扩展信息的细节,但不可以添加、减少或改变信息的内容
4 | - 总结信息内容,将总结后的信息内容与收到的要素内容对比
5 | - 输出要素内容不包含的部分
6 |
7 | # 可以输出一个或多个字符串
--------------------------------------------------------------------------------
/backend/requirements_proactivity.txt:
--------------------------------------------------------------------------------
1 | scikit-learn==1.5.2
2 | promcse==0.0.2
3 | transformers==4.44.2
4 | datasets==2.19.0
5 | FlagEmbedding==1.3.3
6 | funasr==1.1.6
7 | einops==0.8.0
--------------------------------------------------------------------------------
/backend/prompts/proactivity/summary.txt:
--------------------------------------------------------------------------------
1 | # 任务目标:
2 | - 总结被弹出滑动窗口的历史对话,保留你觉得必要的信息
3 | - 输入的信息包括之前的总结和新的被弹出的对话
4 | - 你总结的信息会在生成未来新的回答时作为参考
5 | - 输出的总结不超过50字,只输出总结,不要在输出中包含其他内容
6 |
7 | # 可以输出单个或多个字符串
--------------------------------------------------------------------------------
/frontend_nextjs/postcss.config.mjs:
--------------------------------------------------------------------------------
1 | /** @type {import('postcss-load-config').Config} */
2 | const config = {
3 | plugins: {
4 | tailwindcss: {},
5 | },
6 | };
7 |
8 | export default config;
9 |
--------------------------------------------------------------------------------
/backend/requirements.txt:
--------------------------------------------------------------------------------
1 | nltk==3.9.1
2 | torch>=2.0.1
3 | torchaudio>=2.0.1
4 | protobuf==4.25.4
5 | librosa
6 | rich
7 | websockets
8 | openai>=1.0
9 | transformers>=4.49.0
10 | funasr
11 | loguru
12 |
--------------------------------------------------------------------------------
/NOTICE:
--------------------------------------------------------------------------------
1 | CleanS2S incorporates the Jina Embeddings model (jinaai/jina-embeddings-v3)
2 | Copyright (c) 2023 Jina AI GmbH. Licensed under CC BY-NC 4.0.
3 | Commercial use restrictions apply to this third-party component.
--------------------------------------------------------------------------------
/backend/requirements-rag.txt:
--------------------------------------------------------------------------------
1 | langchain>=0.2.15
2 | langchain_community
3 | langchain_openai
4 | sentence-transformers
5 | chromadb==0.5.3
6 | pydub
7 | git+https://github.com/HKUDS/LightRAG.git@6f40fad#egg=lightrag-hku
--------------------------------------------------------------------------------
/frontend_nextjs/.env.example:
--------------------------------------------------------------------------------
1 | NEXT_PUBLIC_FX_SEND_HOST=
2 | NEXT_PUBLIC_FX_RECV_HOST=
3 | NEXT_PUBLIC_VCTTS_SEND_HOST=
4 | NEXT_PUBLIC_VCTTS_RECV_HOST=
5 | NEXT_PUBLIC_AGENT_NAME=感染力大师
6 | NEXT_PUBLIC_FX_ENABLE=false
7 |
--------------------------------------------------------------------------------
/frontend_nextjs/components/types/ChatMessage.ts:
--------------------------------------------------------------------------------
1 | export interface ChatMessage {
2 | /** Role of who is providing the message. */
3 | role: string;
4 | /** Transcript of the message. */
5 | content?: string;
6 | }
7 |
--------------------------------------------------------------------------------
/frontend_nextjs/components/types/JsonMessage.ts:
--------------------------------------------------------------------------------
1 | import { AssistantMessage } from './AssistantMessage';
2 | import { ChatMetadata } from './ChatMetadata';
3 |
4 |
5 | export type JsonMessage =
6 | | AssistantMessage
7 | | ChatMetadata
8 |
--------------------------------------------------------------------------------
/frontend_nextjs/next-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
Please try again later
8 |{description}
17 |
225 | 对话由 AI 生成,请谨慎对待。
226 |
| 17 | 18 | **投资话题1** 19 | 20 | | 21 |22 | 23 | **投资话题2** 24 | 25 | | 26 |27 | 28 | **心情话题** 29 | 30 | | 31 |32 | 33 | **高考志愿话题** 34 | 35 | | 36 |
| 39 | 40 | [投资话题1](https://github.com/user-attachments/assets/65333528-b07c-42ab-9cb5-660b68b404c4) 41 | 42 | | 43 |44 | 45 | [投资话题2](https://github.com/user-attachments/assets/f6ee3bad-ddd0-404f-9995-088ac1902b11) 46 | 47 | | 48 |49 | 50 | [心情话题](https://github.com/user-attachments/assets/40d20126-9c6b-45db-8ee9-ce768fee5b3f) 51 | 52 | | 53 |54 | 55 | [高考志愿话题](https://github.com/user-attachments/assets/e86c1cad-ca49-4145-8c22-8d9de59f44b4) 56 | 57 | | 58 |
| 70 | 71 | **胃病话题** 72 | 73 | | 74 |
| 77 | 78 | [胃药话题](https://github.com/user-attachments/assets/84d27040-52b5-478e-8796-48ea7f468dc9) 79 | 80 | | 81 |
| 示例 | 129 |
130 | LanguageModelHandler 131 | 132 | |
133 |
134 | RAGLanguageModelHelper 135 | 136 | |
137 |
|---|---|---|
| 1 | 140 |芭比波朗虫草粉底液产品口播文案\n\n大家好,我是你们的美妆达人小美,今天我要向大家介绍一款我最近发现的宝藏产品——芭比波朗虫草粉底液。首先,让我们来看看这款粉底液的 141 | 产品特性。它采用三重持色科技,能够均匀分散,贴肤不结块,让你的妆容持久不暗沉。同时,它还拥有面霜级的质地,特别适合干性肌肤使用,能够提供长时间的滋润和保湿效果,使肌肤在上妆的同时得到滋养。其次,>让我们来看看这款粉底液是如何满足用户需求的。它含有37种护肤精粹,包括冬虫夏草与人参提取物,这些成分能够激发肌肤能量,提供抗老效果,同时积雪草与圣保罗草有助于紧致肌肤。此外,它还含有透明质酸与稻米>提取物,确保了粉底液的高保湿效果,使用后肌肤不会感到干燥紧绷。 142 | | 天啊,我太恨芭比布朗了,为什么这么晚才让我知道还有这么好用的产品!芭比布朗,你不营销你的虫草粉底液你糊涂啊!\n\n你知道吗。我之前用的那些粉底液,不是卡粉就>是脱妆,冬天用还特别干,简直让人抓狂。直到我遇到了芭比波朗的虫草粉底液,我的天,简直是干皮救星!它的质地就像面霜一样,滋润得不得了,上妆后皮肤感觉水润润的,完全没有紧绷感。而且,它的粉质超级细腻>,用三重持色科技,上妆后均匀分散,贴肤不结块,简直就是自然无瑕的代名词。更别提 | 143 |
| 2 | 146 |MAC无暇粉底液二代\n\n## 产品特性\n\nMAC无暇粉底液二代是一款专为油皮星姐妹打造的粉底液。它具有以下特点:\n\n- 持久控油:能够24小时持妆,即使到了晚上也能保持妆容>不花。- 全新科技:采用PRO流体黑科技,使得粉底液能够均匀覆盖肤色,同时保持轻薄服帖。- 不脱妆:妆效持久,不卡粉、不斑驳,不拔干,适合长时间保持完美妆容。- 控油成分:含有糖海带精粹,有助于控油,使油 147 | 性皮肤能够全天保持雾面效果。- 高遮瑕力:能够有效遮盖痘痘、痘坑和毛孔,提供高遮瑕效果,即使近距离观察也不怕。- 养肤成分:含有80%的养肤精粹,成分温和,有助于抵抗外界刺激,同时长效平衡水油。- 专为亚洲肌肤定制:提供三大明星色号,适合亚洲人的肤色,更容易找到匹配自己肤色的粉底液。## 用户需求对接\n\n油皮星姐妹常常苦恼于粉底液经常脱妆,容易氧化,假白等问题。而MAC无暇粉底液二代正是为了解决这些问>题而生。它能够持久控油,不脱妆,不卡粉,不斑驳,不拔干,适合爱夜生活的晚8人们。同时,它还能够遮盖痘痘、痘坑和毛孔,提供高遮瑕效果,让油皮姐妹们在任何场合都能保持完美妆容。 148 | | 嘿,油皮姐妹们,是不是常常为脱妆、氧化、假白这些问题烦恼。别担心,MAC无暇粉底液二代来拯救你们啦!这款粉底液简直就是油皮的救星,24小时持妆,晚8点出门也不怕>花妆,整夜都能保持无暇状态。全新PRO流体黑科技,让你的肤色匀净,轻薄服帖,妆效持久不卡粉、不斑驳,不拔干。更厉害的是,它含有糖海带精粹,一抹就能控油,大油皮全天都能保持雾面效果。痘痘、痘坑、毛孔统 149 | 统不在话下,高遮瑕力让你不怕怼脸看。而且,80%的养肤精粹 | 150 |