openai/openai-dotnet

Public

mirrored from https://github.com/openai/openai-dotnetAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
copilot/sub-pr-1011

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

specification/client/models/audio.models.tsp

59lines · modecode

1import "../../base/typespec/audio/main.tsp";
2import "@azure-tools/typespec-client-generator-core";
3
4using Azure.ClientGenerator.Core;
5
6namespace OpenAI;
7
8@access(Access.public)
9@usage(Usage.output)
10model DotNetCombinedJsonTranscriptionResponse {
11 ...CreateTranscriptionResponseVerboseJson;
12 logprobs?: LogProbProperties[];
13}
14
15// Remove this after https://github.com/microsoft/openai-openapi-pr/issues/4785 is fixed
16@usage(Usage.output | Usage.json)
17@discriminator("type")
18model DotNetCreateTranscriptionStreamingResponse {
19 type: DotNetCreateTranscriptionStreamingResponseType;
20}
21
22union DotNetCreateTranscriptionStreamingResponseType {
23 `transcript.text.segment`: "transcript.text.segment",
24 `transcript.text.delta`: "transcript.text.delta",
25 `transcript.text.done`: "transcript.text.done",
26 string
27}
28
29model DotNetTranscriptTextSegmentEvent extends DotNetCreateTranscriptionStreamingResponse {
30 ...TranscriptTextSegmentEvent;
31}
32
33model DotNetTranscriptTextDeltaEvent extends DotNetCreateTranscriptionStreamingResponse {
34 ...TranscriptTextDeltaEvent;
35}
36
37model DotNetTranscriptTextDoneEvent extends DotNetCreateTranscriptionStreamingResponse {
38 ...TranscriptTextDoneEvent;
39}
40
41@usage(Usage.output | Usage.json)
42@discriminator("type")
43model DotNetCreateSpeechStreamingResponse {
44 type: DotNetCreateSpeechStreamingResponseType;
45}
46
47union DotNetCreateSpeechStreamingResponseType {
48 `speech.audio.delta`: "speech.audio.delta",
49 `speech.audio.done`: "speech.audio.done",
50 string
51}
52
53model DotNetSpeechAudioDeltaEvent extends DotNetCreateSpeechStreamingResponse {
54 ...SpeechAudioDeltaEvent;
55}
56
57model DotNetSpeechAudioDoneEvent extends DotNetCreateSpeechStreamingResponse {
58 ...SpeechAudioDoneEvent;
59}
60