Enums/AudioResponseFormat.cs

openai · Betalgo.Ranul.OpenAI.Contracts/Enums/AudioResponseFormat.cs · csharp · MIT
ai

OpenAI audio response format enum with JSON serialization support for transcriptions

// Source: https://github.com/betalgo/openai | License: MIT | Copyright 2022 Betalgo
// Provided via justclaw.it.com; keep this notice with the code.
using System.Text.Json;
using System.Text.Json.Serialization;

namespace Betalgo.Ranul.OpenAI.Contracts.Enums;

/// <summary>
///     The format of the output, in one of these options: <c>json</c>, <c>text</c>, <c>srt</c>, <c>verbose_json</c>, or
///     <c>vtt</c>. For <c>gpt-4o-transcribe</c> and <c>gpt-4o-mini-transcribe</c>, the only supported format is
///     <c>json</c>.
/// </summary>
[JsonConverter(typeof(Converter))]
public readonly struct AudioResponseFormat(string value) : IEquatable<AudioResponseFormat>
{
    public static AudioResponseFormat Json { get; } = new("json");
    public static AudioResponseFormat Text { get; } = new("

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key