BlueRoseNote/02-Note/DAWA/AI偶像陪伴项目/AI偶像陪伴项目笔记.md

77 lines
3.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 各个服务负责人
- TTS文字=>音频)
- 张守高
- 动作 (文字=>动作)
- 张渤林
- 孙佳俊
- 口型(音频=>表情数据)
- 张渤林
- 常清
# 存在问题
1. 目前是否以文件的方式实现。
2. 文字、声音、表情与动作的关联性。(主要是声音、表情与动作)
3. 生成资产数据存在顺序依赖问题
1. 文字 => 声音 => 表情(口型)
2. 文字 => 动作
# 设计思路
1. 服务器发送的数据都使用一个基于玩家发送对话生成的UUID作为时间戳。
2. 数据采用Stream式发送。
参考RTMP
- RTMP协议 01 入门:https://www.jianshu.com/p/715f37b1202f
- RTMP协议 02 视频Chunk和音频Chunk到底长啥样?:https://www.jianshu.com/p/cc813ba41caa
- RTMP协议 03 RTMP设计思想:https://www.jianshu.com/p/9459606c2025
- RTMP协议 04 RTMP播放基本流程:https://www.jianshu.com/p/4577a61af0c7
- RTMP协议 05 时间戳:https://www.jianshu.com/p/119075482a54
## RTMP
### Message & Chunk
RTMP中一个重要的概念就是消息。
![600](https://upload-images.jianshu.io/upload_images/1720840-a4e1d3c0d08d671e.png?imageMogr2/auto-orient/strip|imageView2/2/w/870/format/webp)
![600](https://upload-images.jianshu.io/upload_images/1720840-f291fa10767d860b.png?imageMogr2/auto-orient/strip|imageView2/2/w/1200/format/webp)
![800](https://upload-images.jianshu.io/upload_images/1720840-76439153b7b7aec6.png?imageMogr2/auto-orient/strip|imageView2/2/w/1200/format/webp)
**网络中实际发送的内容**
![600](https://upload-images.jianshu.io/upload_images/1720840-9dcadc0699c290c0.png?imageMogr2/auto-orient/strip|imageView2/2/w/1200/format/webp)
Chunk Format
Message被切割成一个或多个Chunk然后在网络上进行发送。
当发送时一个chunk发送完毕后才可以发送下一个chunk。
![600](https://upload-images.jianshu.io/upload_images/1720840-a476d0c147ffa144.png?imageMogr2/auto-orient/strip|imageView2/2/w/897/format/webp)
Message被拆分成一个或多个Chunk然后在网络上发送
拆分的时候,**默认的Chunk Size是128字节**以Message大小为300字节举例进行拆分。
```undefined
300 = 128 + 128 + 44
```
![600](https://upload-images.jianshu.io/upload_images/1720840-5f7e632acaf568ab.png?imageMogr2/auto-orient/strip|imageView2/2/w/955/format/webp)
作者FlyingPenguin
链接https://www.jianshu.com/p/715f37b1202f
来源:简书
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。
# 声音
## Runtime Import Sound
使用`RuntimeAudioImporter`插件里面的解码使用了第三方库https://github.com/mackron/dr_libs。导入Sound使用了`UImportedSoundWave::PopulateAudioDataFromDecodedInfo()`
## UE的做法
```cpp
/*SoundStreaming->RawPCMDataSize = DataSize;
SoundStreaming->RawPCMData = AudioData;*/
```
# 表情
在状态机里生成完成之后通过BP_Player的接口ATF_TO_BS传递数据到动画蓝图`NV2_Full_Skeleton_AnimBlueprint`中。之通过动画蓝图的Pose读取曲线并且播放动画。