Skip to content

Commit 57a8704

Browse files
committed
Update readme, reduce number of tsp files
1 parent 55d89a8 commit 57a8704

File tree

5 files changed

+165
-97
lines changed

5 files changed

+165
-97
lines changed

specification/ai/data-plane/VoiceLive/client.tsp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import "@azure-tools/typespec-client-generator-core";
2-
import "./websocket.tsp";
32

43
using Azure.ClientGenerator.Core;
54

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,33 @@
1-
import "./operations.tsp";
1+
import "@typespec/http";
2+
import "@typespec/versioning";
3+
import "@azure-tools/typespec-azure-core";
4+
5+
import "./models.tsp";
6+
7+
using TypeSpec.Http;
8+
using TypeSpec.Versioning;
9+
using Azure.Core;
10+
11+
@versioned(VoiceLive.Versions)
12+
@service(#{ title: "VoiceLive"})
13+
@useAuth(
14+
ApiKeyAuth<ApiKeyLocation.header, "api-key"> | AadOauth2Auth<[
15+
"https://ai.azure.com/.default"
16+
]>
17+
)
18+
@server(
19+
"{endpoint}/voice-agent/realtime",
20+
"VoiceLive Endpoint",
21+
{
22+
/** Azure AI VoiceLive endpoint. */
23+
endpoint: url,
24+
}
25+
)
26+
27+
namespace VoiceLive;
28+
29+
/** API versioning. */
30+
enum Versions {
31+
/** Version 2025-10-01. */
32+
v2025_10_01: "2025-10-01",
33+
}

specification/ai/data-plane/VoiceLive/operations.tsp

Lines changed: 0 additions & 10 deletions
This file was deleted.
Lines changed: 132 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,118 @@
1-
# Azure Voice Live WebSocket API TypeSpec
1+
# Azure Voice Live WebSocket API
22

3-
This directory contains the [TypeSpec](https://typespec.io/) definitions for the Azure Voice Live WebSocket API.
3+
> see https://aka.ms/autorest
44
5-
## Overview
5+
This directory contains the TypeSpec definitions for the Azure Voice Live WebSocket API.
66

7-
Azure Voice Live is a managed service that enables low-latency, high-quality speech-to-speech interactions for voice agents. The API consolidates speech recognition, generative AI, and text-to-speech functionalities into a single, unified WebSocket interface, providing an end-to-end solution for creating seamless voice-driven experiences.
7+
Azure Voice Live is a managed service that enables low-latency, high-quality speech-to-speech interactions for voice agents. The API consolidates speech recognition, generative AI, and text-to-speech functionalities into a single, unified WebSocket interface.
88

9-
## API Description
9+
## Getting Started
10+
11+
To build the SDKs for Azure Voice Live, simply install AutoRest via `npm` (`npm install -g autorest`) and then run:
12+
13+
> `autorest readme.md`
14+
15+
To see additional help and options, run:
16+
17+
> `autorest --help`
18+
19+
For other options on installation see [Installing AutoRest](https://aka.ms/autorest/install) on the AutoRest github page.
20+
21+
---
22+
23+
## Configuration
24+
25+
### Basic Information
26+
27+
```yaml
28+
title: Azure Voice Live WebSocket API
29+
description: Azure Voice Live is a managed service for real-time speech-to-speech interactions via WebSocket
30+
openapi-type: data-plane
31+
tag: package-2025-10-01
32+
```
33+
34+
```yaml $(tag) == 'package-2025-10-01'
35+
input-file:
36+
- stable/2025-10-01/voicelive.json
37+
```
38+
39+
### Directive Configuration
40+
41+
```yaml
42+
directive:
43+
# Configure discriminators for polymorphic event models
44+
- from: swagger-document
45+
where: $.definitions.ClientEvent
46+
transform: >
47+
$["x-ms-discriminator"] = {
48+
"propertyName": "type"
49+
};
50+
51+
- from: swagger-document
52+
where: $.definitions.ServerEvent
53+
transform: >
54+
$["x-ms-discriminator"] = {
55+
"propertyName": "type"
56+
};
57+
58+
# Mark streaming properties
59+
- where: $.definitions..properties.audio
60+
set:
61+
x-ms-stream: true
62+
format: byte
63+
64+
# Configure enum types
65+
- from: swagger-document
66+
where: $.definitions[?(@.enum)]
67+
transform: >
68+
$["x-ms-enum"] = {
69+
"modelAsString": true
70+
};
71+
```
1072
11-
The Voice Live API uses WebSocket connections for real-time, bidirectional communication between clients and the service. This TypeSpec defines:
73+
---
74+
75+
## CSharp
76+
77+
These settings apply only when `--csharp` is specified on the command line.
78+
Please also specify `--csharp-sdks-folder=<path to "SDKs" directory of your azure-sdk-for-net clone>`.
79+
80+
```yaml $(csharp)
81+
csharp:
82+
azure-arm: false
83+
license-header: MICROSOFT_MIT_NO_VERSION
84+
namespace: Azure.AI.VoiceLive
85+
output-folder: $(csharp-sdks-folder)/ai/Azure.AI.VoiceLive/src/Generated
86+
clear-output-folder: true
87+
use-model-reader-writer: true
88+
enable-internal-constructors: true
89+
model-namespace: false
90+
```
91+
92+
---
93+
94+
## Python
95+
96+
These settings apply only when `--python` is specified on the command line.
97+
Please also specify `--python-sdks-folder=<path to the root directory of your azure-sdk-for-python clone>`.
98+
99+
```yaml $(python)
100+
python:
101+
azure-arm: false
102+
license-header: MICROSOFT_MIT_NO_VERSION
103+
namespace: azure.ai.voicelive
104+
package-name: azure-ai-voicelive
105+
package-version: 1.0.0b1
106+
output-folder: $(python-sdks-folder)/ai/azure-ai-voicelive/azure/ai/voicelive
107+
clear-output-folder: true
108+
no-namespace-folders: true
109+
add-credentials: true
110+
credential-scopes: https://cognitiveservices.azure.com/.default
111+
```
112+
113+
---
114+
115+
## API Overview
12116

13117
### Core Components
14118

@@ -19,8 +123,6 @@ The Voice Live API uses WebSocket connections for real-time, bidirectional commu
19123

20124
### Key Features
21125

22-
The TypeSpec defines models and operations for:
23-
24126
- **Real-time Speech Processing**
25127
- Input audio streaming with PCM format support (16kHz/24kHz)
26128
- Output audio generation with configurable voices
@@ -65,69 +167,42 @@ Key TypeSpec models include:
65167
- `Item`: Conversation items including messages and function calls
66168
- `Tool`: Function definitions for AI assistant capabilities
67169

68-
## Directory Structure
69-
70-
```
71-
VoiceLive/
72-
├── main.tsp # Main entry point
73-
├── client.tsp # Client configuration
74-
├── models.tsp # Core data models
75-
├── operations.tsp # API operations and versioning
76-
├── custom.tsp # Custom type definitions
77-
├── tspconfig.yaml # TypeSpec configuration
78-
├── common/ # Common shared models
79-
│ ├── main.tsp
80-
│ └── models.tsp
81-
├── custom/ # Custom event and item definitions
82-
│ ├── content_parts.tsp
83-
│ ├── events.tsp
84-
│ ├── items.tsp
85-
│ └── tools.tsp
86-
└── servers/ # Server configuration
87-
└── websocket.tsp # WebSocket endpoint definition
88-
```
89-
90-
## API Versions
91-
92-
The current API version is:
93-
- `2025-10-01` - Latest stable version with full Voice Live capabilities
94-
95-
## Getting Started
96-
97-
### Prerequisites
98-
99-
- An Azure subscription
100-
- An Azure AI Foundry resource with Voice Live enabled
101-
- WebSocket client support
102-
103-
### Authentication
170+
## Authentication
104171

105172
The Voice Live API supports:
106173
- **Microsoft Entra ID (recommended)**: Token-based authentication with OAuth 2.0
107174
- **API Key**: Resource key-based authentication
108175

109-
### WebSocket Endpoint
176+
## WebSocket Endpoint
110177

111178
```
112-
wss://<your-resource>.cognitiveservices.azure.com/voicelive/realtime
179+
wss://<your-resource>.cognitiveservices.azure.com/voice-agent/realtime
113180
```
114181
115-
## SDK Generation
182+
## API Versions
183+
184+
- `2025-10-01` - Latest stable version with full Voice Live capabilities
116185
117-
This TypeSpec is configured to generate SDKs for multiple languages:
186+
## Directory Structure
118187
119-
- **Python**: `azure-ai-voicelive`
120-
- **.NET**: `Azure.AI.VoiceLive`
121-
- **JavaScript/TypeScript**: `@azure-rest/ai-voicelive`
122-
- **Java**: `com.azure.ai.voicelive`
123-
- **Go**: `github.com/Azure/azure-sdk-for-go/sdk/ai/voicelive`
188+
```
189+
VoiceLive/
190+
├── main.tsp # Main entry point
191+
├── client.tsp # Client configuration
192+
├── models.tsp # Core data models
193+
├── operations.tsp # API operations and versioning
194+
├── custom.tsp # Custom type definitions
195+
├── websocket.tsp # WebSocket endpoint definition
196+
├── events.tsp # Event definitions
197+
├── items.tsp # Item models
198+
├── tools.tsp # Tool definitions
199+
├── content_parts.tsp # Content part models
200+
└── tspconfig.yaml # TypeSpec configuration
201+
```
124202
125203
## Related Documentation
126204
127205
- [Azure AI Voice Live Documentation](https://docs.microsoft.com/azure/ai-services/)
128206
- [TypeSpec Documentation](https://typespec.io/)
129207
- [Azure AI Foundry](https://azure.microsoft.com/products/ai-studio/)
130-
131-
## Contributing
132-
133-
This project welcomes contributions and suggestions. Please see the [Azure SDK Contributing Guide](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md) for more information.
208+
- [AutoRest Documentation](https://aka.ms/autorest)

specification/ai/data-plane/VoiceLive/websocket.tsp

Lines changed: 0 additions & 28 deletions
This file was deleted.

0 commit comments

Comments
 (0)