Skip to content

Commit 05a765c

Browse files
authored
Change LogProb data type (#52523)
* Change LogProb data type * Missed file * API Updates * File cleanup; remove public BinaryData from more places * Latest updates * n progress * Add tests * Latest updates * Lots of test updates and API simplification * Snippet and API updates * Remove run settings * Don't add a readme w/ the tests * More tests and refactoring * Generator updates * Improve Error Handling
1 parent fd4b2d1 commit 05a765c

File tree

104 files changed

+3968
-1989
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+3968
-1989
lines changed

sdk/ai/Azure.AI.VoiceLive/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ var model = "gpt-4o-mini-realtime-preview"; // Specify the model to use
146146
VoiceLiveSession session = await client.StartSessionAsync(model).ConfigureAwait(false);
147147

148148
// Configure session for voice conversation
149-
SessionOptions sessionOptions = new SessionOptions()
149+
VoiceLiveSessionOptions sessionOptions = new()
150150
{
151151
Model = model,
152152
Instructions = "You are a helpful AI assistant. Respond naturally and conversationally.",
@@ -188,7 +188,7 @@ await foreach (SessionUpdate serverEvent in session.GetUpdatesAsync().ConfigureA
188188
### Configuring custom voice and advanced features
189189

190190
```C# Snippet:AdvancedVoiceConfiguration
191-
SessionOptions sessionOptions = new SessionOptions()
191+
VoiceLiveSessionOptions sessionOptions = new()
192192
{
193193
Model = model,
194194
Instructions = "You are a customer service representative. Be helpful and professional.",
@@ -235,7 +235,7 @@ var getCurrentWeatherFunction = new VoiceLiveFunctionDefinition("get_current_wea
235235
""")
236236
};
237237

238-
SessionOptions sessionOptions = new SessionOptions()
238+
VoiceLiveSessionOptions sessionOptions = new()
239239
{
240240
Model = model,
241241
Instructions = "You are a weather assistant. Use the get_current_weather function to help users with weather information.",

sdk/ai/Azure.AI.VoiceLive/api/Azure.AI.VoiceLive.net8.0.cs

Lines changed: 180 additions & 235 deletions
Large diffs are not rendered by default.

sdk/ai/Azure.AI.VoiceLive/api/Azure.AI.VoiceLive.netstandard2.0.cs

Lines changed: 180 additions & 235 deletions
Large diffs are not rendered by default.

sdk/ai/Azure.AI.VoiceLive/samples/BasicVoiceAssistant/BasicVoiceAssistant.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,9 @@ private async Task SetupSessionAsync(CancellationToken cancellationToken)
131131
};
132132

133133
// Create conversation session options
134-
var sessionOptions = new SessionOptions
134+
var sessionOptions = new VoiceLiveSessionOptions
135135
{
136-
EchoCancellation = new AudioEchoCancellation(),
136+
InputAudioEchoCancellation = new AudioEchoCancellation(),
137137
Model = _model,
138138
Instructions = _instructions,
139139
Voice = azureVoice,

sdk/ai/Azure.AI.VoiceLive/samples/CustomerServiceBot/CustomerServiceBot.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ private async Task SetupSessionAsync(CancellationToken cancellationToken)
134134
};
135135

136136
// Create conversation session options with function tools
137-
var sessionOptions = new SessionOptions
137+
var sessionOptions = new VoiceLiveSessionOptions
138138
{
139139
Model = _model,
140140
Instructions = _instructions,

sdk/ai/Azure.AI.VoiceLive/samples/snippets/BasicUsageSnippets.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public async Task BasicVoiceAssistantExample()
3030
VoiceLiveSession session = await client.StartSessionAsync(model).ConfigureAwait(false);
3131

3232
// Configure session for voice conversation
33-
SessionOptions sessionOptions = new SessionOptions()
33+
VoiceLiveSessionOptions sessionOptions = new()
3434
{
3535
Model = model,
3636
Instructions = "You are a helpful AI assistant. Respond naturally and conversationally.",
@@ -84,7 +84,7 @@ public async Task AdvancedVoiceConfiguration()
8484
VoiceLiveSession session = await client.StartSessionAsync(model).ConfigureAwait(false);
8585

8686
#region Snippet:AdvancedVoiceConfiguration
87-
SessionOptions sessionOptions = new SessionOptions()
87+
VoiceLiveSessionOptions sessionOptions = new()
8888
{
8989
Model = model,
9090
Instructions = "You are a customer service representative. Be helpful and professional.",
@@ -143,7 +143,7 @@ public async Task FunctionCallingExample()
143143
""")
144144
};
145145

146-
SessionOptions sessionOptions = new SessionOptions()
146+
VoiceLiveSessionOptions sessionOptions = new()
147147
{
148148
Model = model,
149149
Instructions = "You are a weather assistant. Use the get_current_weather function to help users with weather information.",

sdk/ai/Azure.AI.VoiceLive/src/Azure.AI.VoiceLive.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<Description>
44
This is the Azure.AI.VoiceLive client library for working with the Azure VoiceLive service.

0 commit comments

Comments
 (0)