We now distinguish between input and output audio and image frames. We introduce `InputAudioRawFrame`, `OutputAudioRawFrame`, `InputImageRawFrame` and `OutputImageRawFrame` (and other subclasses of those). The input frames usually come from an input transport and are meant to be processed inside the pipeline to generate new frames. However, the input frames will not be sent through an output transport. The output frames can also be processed by any frame processor in the pipeline and they are allowed to be sent by the output transport.
45 lines
755 B
Protocol Buffer
45 lines
755 B
Protocol Buffer
//
|
|
// Copyright (c) 2024, Daily
|
|
//
|
|
// SPDX-License-Identifier: BSD 2-Clause License
|
|
//
|
|
|
|
// Generate frames_pb2.py with:
|
|
//
|
|
// python -m grpc_tools.protoc --proto_path=./ --python_out=./protobufs frames.proto
|
|
|
|
syntax = "proto3";
|
|
|
|
package pipecat;
|
|
|
|
message TextFrame {
|
|
uint64 id = 1;
|
|
string name = 2;
|
|
string text = 3;
|
|
}
|
|
|
|
message AudioRawFrame {
|
|
uint64 id = 1;
|
|
string name = 2;
|
|
bytes audio = 3;
|
|
uint32 sample_rate = 4;
|
|
uint32 num_channels = 5;
|
|
optional uint64 pts = 6;
|
|
}
|
|
|
|
message TranscriptionFrame {
|
|
uint64 id = 1;
|
|
string name = 2;
|
|
string text = 3;
|
|
string user_id = 4;
|
|
string timestamp = 5;
|
|
}
|
|
|
|
message Frame {
|
|
oneof frame {
|
|
TextFrame text = 1;
|
|
AudioRawFrame audio = 2;
|
|
TranscriptionFrame transcription = 3;
|
|
}
|
|
}
|