-
Notifications
You must be signed in to change notification settings - Fork 3.2k
/
ITextToAudioService.cs
30 lines (27 loc) · 1.22 KB
/
ITextToAudioService.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Copyright (c) Microsoft. All rights reserved.
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.SemanticKernel.Services;
namespace Microsoft.SemanticKernel.TextToAudio;
/// <summary>
/// Interface for text-to-audio services.
/// </summary>
[Experimental("SKEXP0001")]
public interface ITextToAudioService : IAIService
{
/// <summary>
/// Get audio contents from text.
/// </summary>
/// <param name="text">The text to generate audio for.</param>
/// <param name="executionSettings">The AI execution settings (optional).</param>
/// <param name="kernel">The <see cref="Kernel"/> containing services, plugins, and other state for use throughout the operation.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
/// <returns>Audio contents from text.</returns>
Task<IReadOnlyList<AudioContent>> GetAudioContentsAsync(
string text,
PromptExecutionSettings? executionSettings = null,
Kernel? kernel = null,
CancellationToken cancellationToken = default);
}