Skip to content

Commit 90cc697

Browse files
committed
Update, still building
1 parent b4ec0ed commit 90cc697

File tree

7 files changed

+91
-5
lines changed

7 files changed

+91
-5
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License.
3+
4+
using System;
5+
using System.IO;
6+
7+
namespace Azure.AI.VoiceLive
8+
{
9+
public partial class AzureCustomVoice : VoiceBase
10+
{
11+
internal override BinaryData ToBinaryData()
12+
{
13+
var ms = new MemoryStream();
14+
15+
var rq = ToRequestContent();
16+
17+
rq.WriteTo(ms, default);
18+
ms.Position = 0;
19+
return BinaryData.FromStream(ms);
20+
}
21+
}
22+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License.
3+
4+
using System;
5+
using System.IO;
6+
7+
namespace Azure.AI.VoiceLive
8+
{
9+
public partial class AzurePersonalVoice : VoiceBase
10+
{
11+
internal override BinaryData ToBinaryData()
12+
{
13+
var ms = new MemoryStream();
14+
15+
var rq = ToRequestContent();
16+
17+
rq.WriteTo(ms, default);
18+
ms.Position = 0;
19+
return BinaryData.FromStream(ms);
20+
}
21+
}
22+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License.
3+
4+
using System;
5+
using System.IO;
6+
7+
namespace Azure.AI.VoiceLive
8+
{
9+
public partial class AzureStandardVoice : VoiceBase
10+
{
11+
internal override BinaryData ToBinaryData()
12+
{
13+
var ms = new MemoryStream();
14+
15+
var rq = ToRequestContent();
16+
17+
rq.WriteTo(ms, default);
18+
ms.Position = 0;
19+
return BinaryData.FromStream(ms);
20+
}
21+
}
22+
}

sdk/ai/Azure.AI.VoiceLive/src/ConversationSessionOptions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public class ConversationSessionOptions : SessionOptions
2424
/// The voice configuration to use for generating spoken responses. If not specified,
2525
/// the service will use a default voice.
2626
/// </value>
27-
public BinaryData Voice { get; set; }
27+
public VoiceBase Voice { get; set; }
2828

2929
/// <summary>
3030
/// Gets or sets the model to use for the conversation.
@@ -85,7 +85,7 @@ internal override RequestSession ToRequestSession()
8585

8686
if (Voice != null)
8787
{
88-
session.Voice = Voice;
88+
session.Voice = Voice.ToBinaryData();
8989
}
9090

9191
if (!string.IsNullOrEmpty(Model))

sdk/ai/Azure.AI.VoiceLive/src/ResponseOptions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public class ResponseOptions
4040
/// <value>
4141
/// The voice configuration to use for generating spoken responses.
4242
/// </value>
43-
public BinaryData Voice { get; set; }
43+
public VoiceBase Voice { get; set; }
4444

4545
/// <summary>
4646
/// Gets or sets the output audio format for the response.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License.
3+
4+
using System;
5+
using System.Collections.Generic;
6+
using System.Linq;
7+
using System.Text;
8+
using System.Threading.Tasks;
9+
10+
namespace Azure.AI.VoiceLive
11+
{
12+
/// <summary>
13+
/// Base class for the different voice types supported by the VoiceLive service
14+
/// </summary>
15+
public abstract class VoiceBase
16+
{
17+
internal abstract BinaryData ToBinaryData();
18+
}
19+
}
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
directory: specification/ai/data-plane/VoiceLive
2-
commit: <replace with your value>
3-
repo: <replace with your value>
2+
commit: b5efaf3bb01549dfbab77c0a45a6fa249f81c97d
3+
repo: rhurey/azure-rest-api-specs
4+
emitterPackageJsonPath: eng/azure-typespec-http-client-csharp-emitter-package.json
45
additionalDirectories:
56
- specification/ai/data-plane/VoiceLive

0 commit comments

Comments
 (0)