Skip to content

Rhurey/vl specs #36009

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 20 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions specification/ai/data-plane/VoiceLive/client.tsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import "@azure-tools/typespec-client-generator-core";
import "./servers/websocket.tsp";

using Azure.ClientGenerator.Core;

@@access(VoiceLive.force_models, Access.internal, "python");
@@access(VoiceLive.force_models, Access.internal, "csharp");

@@access(VoiceLive.ServerEventSessionCreated, Access.public, "python");
@@access(VoiceLive.ServerEventResponseAudioDelta, Access.public, "python");
@@access(VoiceLive.ClientEventSessionUpdate, Access.public, "python");
@@access(VoiceLive.ConversationResponseItem, Access.public, "python");
@@access(VoiceLive.Response, Access.public, "python");
@@access(VoiceLive.ServerEventConversationItemCreated, Access.public, "python");
@@access(VoiceLive.ServerEventConversationItemDeleted, Access.public, "python");
@@access(VoiceLive.ServerEventConversationItemInputAudioTranscriptionCompleted, Access.public, "python");
@@access(VoiceLive.ServerEventConversationItemInputAudioTranscriptionDelta, Access.public, "python");
@@access(VoiceLive.ServerEventConversationItemInputAudioTranscriptionFailed, Access.public, "python");
@@access(VoiceLive.ServerEventConversationItemRetrieved, Access.public, "python");
@@access(VoiceLive.ServerEventConversationItemTruncated, Access.public, "python");
@@access(VoiceLive.ServerEventError, Access.public, "python");
@@access(VoiceLive.ServerEventInputAudioBufferCleared, Access.public, "python");
@@access(VoiceLive.ServerEventInputAudioBufferCommitted, Access.public, "python");
@@access(VoiceLive.ServerEventInputAudioBufferSpeechStarted, Access.public, "python");
@@access(VoiceLive.ServerEventInputAudioBufferSpeechStopped, Access.public, "python");
@@access(VoiceLive.ServerEventResponseAudioDone, Access.public, "python");
@@access(VoiceLive.ServerEventResponseAudioTranscriptDelta, Access.public, "python");
@@access(VoiceLive.ServerEventResponseAudioTranscriptDone, Access.public, "python");
@@access(VoiceLive.ServerEventResponseContentPartAdded, Access.public, "python");
@@access(VoiceLive.ServerEventResponseContentPartDone, Access.public, "python");
@@access(VoiceLive.ServerEventResponseCreated, Access.public, "python");
@@access(VoiceLive.ServerEventResponseDone, Access.public, "python");
@@access(VoiceLive.ServerEventResponseOutputItemAdded, Access.public, "python");
@@access(VoiceLive.ServerEventResponseOutputItemDone, Access.public, "python");
@@access(VoiceLive.ServerEventResponseTextDelta, Access.public, "python");
@@access(VoiceLive.ServerEventResponseTextDone, Access.public, "python");
@@access(VoiceLive.ServerEventSessionUpdated, Access.public, "python");

1 change: 1 addition & 0 deletions specification/ai/data-plane/VoiceLive/common/main.tsp
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import "./models.tsp";
44 changes: 44 additions & 0 deletions specification/ai/data-plane/VoiceLive/common/models.tsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// Cleaned TypeSpec file aligned with Python model definitions
// Removed models not defined or needed based on your Python code baseline
import "@typespec/http";
import "@typespec/openapi";
using TypeSpec.OpenAPI;

namespace VoiceLive;

@doc("Error object returned in case of API failure.")
model ErrorDetails {
@doc("Error code, or null if unspecified.")
code?: string;

@doc("Human-readable error message.")
message: string;

@doc("Parameter name related to the error, if applicable.")
param?: string;

@doc("Type or category of the error.")
type?: string;

@doc("Event id of the error.")
event_id?: string;
}

@error
@doc("Standard error response envelope.")
model ErrorResponse {
@doc("Error object returned in case of API failure.")
error: ErrorDetails;
}

@doc("A single log probability entry for a token.")
model LogProbProperties {
@doc("The token that was used to generate the log probability.")
token: string;

@doc("The log probability of the token.")
logprob: float32;

@doc("The bytes that were used to generate the log probability.")
bytes: int32[];
}
Loading
Loading