PlayerStreaming 驱动audio2face 学习笔记

gpt说链路应该是:

PlayerStreaming

Audio Player

Audio2Face Core(Network / Inference)

Face Instance(BlendShape / Mesh)

Character Mesh

/World/audio2face/PlayerStreaming 可以驱动 audio2face 2023.2播放音频,但是不能驱动表情

python 复制代码
import subprocess
import os

# 注意:请替换为你的Audio2Face实际安装路径
A2F_SCRIPTS_DIR = r"D:\pro_2026\audio2face-2023.2.0\exts\omni.audio2face.player\omni\audio2face\player\scripts\streaming_server/"
A2F_SCRIPTS_DIR = r"D:\project_2025\audio2face_server\A2F_new\audio2face-2023.2.0\exts\omni.audio2face.player\omni\audio2face\player\scripts\streaming_server/"


def stream_audio_to_a2f(wav_file_path):
    """
    向正在运行的Audio2Face Streaming Player发送音频文件
    """
    # 切换到流服务器脚本目录
    os.chdir(A2F_SCRIPTS_DIR)

    # 构建命令:使用test_client.py发送音频
    # 假设你的Streaming Player在USD场景中的路径是 /World/StreamingPlayer
    command = f"python test_client.py {wav_file_path} /World/audio2face/StreamingPlayer"
    command = f"python test_client.py {wav_file_path} /World/audio2face/PlayerStreaming"

    try:
        subprocess.run(command, shell=True, check=True)
        print(f"成功发送音频: {wav_file_path}")
    except subprocess.CalledProcessError as e:
        print(f"发送失败,命令执行错误: {e}")
    except FileNotFoundError:
        print("错误:未找到test_client.py脚本,请检查A2F_SCRIPTS_DIR路径。")
stream_audio_to_a2f(r"D:\project_2025\CosyVoice-25hz\CosyVoice-25hz\post_1.wav")
相关推荐
今儿敲了吗14 小时前
CO——CPU
笔记
今儿敲了吗14 小时前
Python ——第三方包
笔记·python
圆奋奋14 小时前
FreeRTOS学习(三)- 任务调度模块
学习·开源·freertos
吃着火锅x唱着歌14 小时前
Effective C++ 学习笔记 条款40 明智而审慎地使用多重继承
c++·笔记·学习
落知秋14 小时前
RUST中的trait是什么?
笔记·rust
xian_wwq15 小时前
【学习笔记】Prompt Engineering 没死,只是它不再够用了-2/16
笔记·学习·prompt
天吾cc15 小时前
RTT-ADC
单片机·嵌入式硬件·学习
kaixin_啊啊15 小时前
test_机器学习算法学习
学习·算法·机器学习
m4Rk_16 小时前
【论文阅读】Agent 记忆机制(34):MemoryBank——用遗忘曲线管理可强化的长期对话记忆
论文阅读·人工智能·学习·开源·github
210Brian16 小时前
STM32学习笔记(五)EXTI外部中断(上)
笔记·stm32·学习