Skip to content

Commit

Permalink
Merge branch 'development' into adds-WithTimestamp-functions-for-regu…
Browse files Browse the repository at this point in the history
…lar-and-streaming-versions
  • Loading branch information
StephenHodgson authored Nov 3, 2024
2 parents b5258af + 136eeca commit eb8b10e
Showing 1 changed file with 26 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ public TextToSpeechRequest(
OutputFormat outputFormat = OutputFormat.MP3_44100_128,
int? optimizeStreamingLatency = null,
Model model = null,
string previousText = null)
string previousText = null,
string nextText = null,
string[] previousRequestIds = null,
string[] nextRequestIds = null)
{
if (string.IsNullOrWhiteSpace(text))
{
Expand All @@ -48,9 +51,12 @@ public TextToSpeechRequest(
Model = model ?? Models.Model.MultiLingualV2;
Voice = voice;
VoiceSettings = voiceSettings ?? voice.Settings ?? throw new ArgumentNullException(nameof(voiceSettings));
PreviousText = previousText;
OutputFormat = outputFormat;
OptimizeStreamingLatency = optimizeStreamingLatency;
PreviousText = previousText;
NextText = nextText;
PreviousRequestIds = previousRequestIds;
NextRequestIds = nextRequestIds;
}

[Preserve]
Expand All @@ -69,16 +75,30 @@ public TextToSpeechRequest(
[JsonProperty("voice_settings")]
public VoiceSettings VoiceSettings { get; internal set; }

[Preserve]
[JsonProperty("previous_text")]
public string PreviousText { get; }

[Preserve]
[JsonIgnore]
public OutputFormat OutputFormat { get; }

[Preserve]
[JsonIgnore]
public int? OptimizeStreamingLatency { get; }

[Preserve]
[JsonProperty("previous_text")]
public string PreviousText { get; }

[Preserve]
[JsonProperty("next_text")]
public string NextText { get; }

[Preserve]
[JsonProperty("previous_request_ids")]
// Note: A maximum of three next or previous history item ids can be sent
public string[] PreviousRequestIds { get; }

[Preserve]
[JsonProperty("next_request_ids")]
// Note: A maximum of three next or previous history item ids can be sent
public string[] NextRequestIds { get; }
}
}

0 comments on commit eb8b10e

Please sign in to comment.