Spaces:
Running
Running
File size: 1,448 Bytes
53ea588 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: BSD 2-Clause License
"""Animation frames."""
from dataclasses import dataclass
from nvidia_ace.animation_pb2 import AnimationData, SkelAnimationHeader
from nvidia_ace.audio_pb2 import AudioHeader
from pipecat.frames.frames import ControlFrame, DataFrame
from nvidia_pipecat.frames.action import ActionFrame
@dataclass
class AnimationDataStreamStartedFrame(ControlFrame, ActionFrame):
"""An animation data stream has started. Contains both animation and audio headers.
Args:
animation_source_id: Where is the animation generated from. Useful if using an animation graph.
audio_header: Audio header for the stream.
animation_header: Animation header for the stream.
"""
animation_source_id: str
audio_header: AudioHeader
animation_header: SkelAnimationHeader
@dataclass
class AnimationDataStreamRawFrame(DataFrame, ActionFrame):
"""Animation data that may contain both audio and/or animation data.
Args:
animation_data: Animation data containing audio and/or animation content. If both are
present, the animations in the frame are synced with the audio.
"""
animation_data: AnimationData
@dataclass
class AnimationDataStreamStoppedFrame(ControlFrame, ActionFrame):
"""Signals the end of the animation data stream."""
|