File tree Expand file tree Collapse file tree 7 files changed +91
-5
lines changed
sdk/ai/Azure.AI.VoiceLive Expand file tree Collapse file tree 7 files changed +91
-5
lines changed Original file line number Diff line number Diff line change
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
+ }
Original file line number Diff line number Diff line change
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
+ }
Original file line number Diff line number Diff line change
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
+ }
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ public class ConversationSessionOptions : SessionOptions
24
24
/// The voice configuration to use for generating spoken responses. If not specified,
25
25
/// the service will use a default voice.
26
26
/// </value>
27
- public BinaryData Voice { get ; set ; }
27
+ public VoiceBase Voice { get ; set ; }
28
28
29
29
/// <summary>
30
30
/// Gets or sets the model to use for the conversation.
@@ -85,7 +85,7 @@ internal override RequestSession ToRequestSession()
85
85
86
86
if ( Voice != null )
87
87
{
88
- session . Voice = Voice ;
88
+ session . Voice = Voice . ToBinaryData ( ) ;
89
89
}
90
90
91
91
if ( ! string . IsNullOrEmpty ( Model ) )
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ public class ResponseOptions
40
40
/// <value>
41
41
/// The voice configuration to use for generating spoken responses.
42
42
/// </value>
43
- public BinaryData Voice { get ; set ; }
43
+ public VoiceBase Voice { get ; set ; }
44
44
45
45
/// <summary>
46
46
/// Gets or sets the output audio format for the response.
Original file line number Diff line number Diff line change
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
+ }
Original file line number Diff line number Diff line change 1
1
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
4
5
additionalDirectories :
5
6
- specification/ai/data-plane/VoiceLive
You can’t perform that action at this time.
0 commit comments