-
-
Notifications
You must be signed in to change notification settings - Fork 148
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added support for Audio Transcription and Translation verbose json output - Added support for timestamp granularities for segments and words - Marked CreateTranscriptionAsync obsolete - Added CreateTranscriptionTextAsync - Added CreateTranscriptionJsonAsync - Marked CreateTranspationAsync obsolete - Added CreateTranslationTextAsync - Added CreateTranslationJsonAsync - Updated SpeechResponseFormat to include wav and pcm
- Loading branch information
1 parent
c17dee4
commit 9124a33
Showing
13 changed files
with
425 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
// Licensed under the MIT License. See LICENSE in the project root for license information. | ||
|
||
using System.Text.Json.Serialization; | ||
|
||
namespace OpenAI.Audio | ||
{ | ||
public sealed class AudioResponse | ||
{ | ||
/// <summary> | ||
/// The language of the input audio. | ||
/// </summary> | ||
[JsonInclude] | ||
[JsonPropertyName("language")] | ||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] | ||
public string Language { get; private set; } | ||
|
||
/// <summary> | ||
/// The duration of the input audio. | ||
/// </summary> | ||
[JsonInclude] | ||
[JsonPropertyName("duration")] | ||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] | ||
public double? Duration { get; private set; } | ||
|
||
/// <summary> | ||
/// The transcribed text. | ||
/// </summary> | ||
[JsonInclude] | ||
[JsonPropertyName("text")] | ||
public string Text { get; private set; } | ||
|
||
/// <summary> | ||
/// Extracted words and their corresponding timestamps. | ||
/// </summary> | ||
[JsonInclude] | ||
[JsonPropertyName("words")] | ||
public TranscriptionWord[] Words { get; private set; } | ||
|
||
/// <summary> | ||
/// Segments of the transcribed text and their corresponding details. | ||
/// </summary> | ||
[JsonInclude] | ||
[JsonPropertyName("segments")] | ||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] | ||
public TranscriptionSegment[] Segments { get; private set; } | ||
} | ||
} |
Oops, something went wrong.