feat: add single-call action protocol and Android stage interfaces
This commit is contained in:
@@ -8,13 +8,14 @@ class Payload(private val ok: Boolean = true, private val turn: Long? = null, pr
|
||||
fun optInt(key: String, fallback: Int) = if (key == "context_face_cue_version") 1 else fallback
|
||||
fun opt(key: String): Any? = if (key == "turn_id") turn else fields[key]
|
||||
}
|
||||
enum class EventKind { AUTH, HELLO, ERROR, HISTORY, UNKNOWN, LISTEN, VAD, STT, LLM, TTS, ABORT, REPLY_EMOTION }
|
||||
enum class EventKind { AUTH, HELLO, ERROR, HISTORY, UNKNOWN, LISTEN, VAD, STT, LLM, TTS, ABORT, REPLY_EMOTION, EXPRESSION_PREPARE, ACTION, SPEECH }
|
||||
data class ServerEvent(val type: String, val kind: EventKind, val payload: Payload)
|
||||
class DownlinkFrame(val turnId: Long = 0, val sequence: Long = 0, val pcm16: ByteArray = ByteArray(2))
|
||||
object DialogueProtocol {
|
||||
val uplinks = mutableListOf<Triple<Long, Long, Int>>()
|
||||
fun actionStatus(value: com.gorios.lanvoice.avatar.ActionStatus) = "action_status"
|
||||
fun faceCue(turn: Long, observation: com.gorios.lanvoice.expression.FaceCueObservation, age: Long) = "face_cue"
|
||||
fun hello() = "hello"
|
||||
fun hello(actionPackSha: String? = null) = "hello"
|
||||
fun listen(start: Boolean) = "listen"
|
||||
fun abort(turn: Long) = "abort"
|
||||
fun playbackDrained(turn: Long) = "drained"
|
||||
|
||||
Reference in New Issue
Block a user