-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Releasing version 95.0.0
- Loading branch information
Showing
74 changed files
with
3,820 additions
and
112 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
/* | ||
* Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. | ||
* This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. | ||
*/ | ||
|
||
// NOTE: Code generated by OracleSDKGenerator. | ||
// DO NOT EDIT this file manually. | ||
|
||
|
||
using System.ComponentModel.DataAnnotations; | ||
using System.Runtime.Serialization; | ||
using Newtonsoft.Json; | ||
using Newtonsoft.Json.Converters; | ||
|
||
|
||
namespace Oci.AispeechService.Models | ||
{ | ||
/// <summary> | ||
/// Input JSON to get audio inference from TTS Service. | ||
/// </summary> | ||
public class SynthesizeSpeechDetails | ||
{ | ||
|
||
/// <value> | ||
/// The text input to get the inference audio from TTS Service. | ||
/// </value> | ||
/// <remarks> | ||
/// Required | ||
/// </remarks> | ||
[Required(ErrorMessage = "Text is required.")] | ||
[JsonProperty(PropertyName = "text")] | ||
public string Text { get; set; } | ||
|
||
/// <value> | ||
/// If set to true, response will be sent in the chunked transfer-encoding and audio chunks | ||
/// are sent back as and when they are ready. If set to false, response will be sent only once | ||
/// the entire audio is generated. | ||
/// | ||
/// </value> | ||
[JsonProperty(PropertyName = "isStreamEnabled")] | ||
public System.Nullable<bool> IsStreamEnabled { get; set; } | ||
|
||
/// <value> | ||
/// The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment where the user has access to call `SpeechSynthesize` api. But default user access will be checked at tenancy level. | ||
/// </value> | ||
[JsonProperty(PropertyName = "compartmentId")] | ||
public string CompartmentId { get; set; } | ||
|
||
[JsonProperty(PropertyName = "configuration")] | ||
public TtsConfiguration Configuration { get; set; } | ||
|
||
[JsonProperty(PropertyName = "audioConfig")] | ||
public TtsAudioConfig AudioConfig { get; set; } | ||
|
||
} | ||
} |
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,70 @@ | ||
/* | ||
* Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. | ||
* This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. | ||
*/ | ||
|
||
// NOTE: Code generated by OracleSDKGenerator. | ||
// DO NOT EDIT this file manually. | ||
|
||
|
||
using System.ComponentModel.DataAnnotations; | ||
using System.Runtime.Serialization; | ||
using Newtonsoft.Json; | ||
using Newtonsoft.Json.Converters; | ||
using Newtonsoft.Json.Linq; | ||
|
||
namespace Oci.AispeechService.Models | ||
{ | ||
/// <summary> | ||
/// Use this schema to specify handling of audio response. | ||
/// If audioConfig is not provided, raw response is handed over for the user to handle. | ||
/// | ||
/// </summary> | ||
[JsonConverter(typeof(TtsAudioConfigModelConverter))] | ||
public class TtsAudioConfig | ||
{ | ||
/// | ||
/// <value> | ||
/// The audio config type to use for handling the audio output. | ||
/// Supported config types are: | ||
/// - BASE_AUDIO_CONFIG | ||
/// | ||
/// </value> | ||
/// | ||
public enum ConfigTypeEnum { | ||
[EnumMember(Value = "BASE_AUDIO_CONFIG")] | ||
BaseAudioConfig | ||
}; | ||
|
||
|
||
} | ||
|
||
public class TtsAudioConfigModelConverter : JsonConverter | ||
{ | ||
public override bool CanWrite => false; | ||
public override bool CanRead => true; | ||
public override bool CanConvert(System.Type type) | ||
{ | ||
return type == typeof(TtsAudioConfig); | ||
} | ||
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) | ||
{ | ||
throw new System.InvalidOperationException("Use default serialization."); | ||
} | ||
|
||
public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer) | ||
{ | ||
var jsonObject = JObject.Load(reader); | ||
var obj = default(TtsAudioConfig); | ||
var discriminator = jsonObject["configType"].Value<string>(); | ||
switch (discriminator) | ||
{ | ||
case "BASE_AUDIO_CONFIG": | ||
obj = new TtsBaseAudioConfig(); | ||
break; | ||
} | ||
serializer.Populate(jsonObject.CreateReader(), obj); | ||
return obj; | ||
} | ||
} | ||
} |
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,37 @@ | ||
/* | ||
* Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. | ||
* This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. | ||
*/ | ||
|
||
// NOTE: Code generated by OracleSDKGenerator. | ||
// DO NOT EDIT this file manually. | ||
|
||
|
||
using System.ComponentModel.DataAnnotations; | ||
using System.Runtime.Serialization; | ||
using Newtonsoft.Json; | ||
using Newtonsoft.Json.Converters; | ||
|
||
|
||
namespace Oci.AispeechService.Models | ||
{ | ||
/// <summary> | ||
/// Use this audio config for saving the audio response at specified path. | ||
/// </summary> | ||
public class TtsBaseAudioConfig : TtsAudioConfig | ||
{ | ||
|
||
/// <value> | ||
/// Specify the path where you want to save the audio response. | ||
/// </value> | ||
/// <remarks> | ||
/// Required | ||
/// </remarks> | ||
[Required(ErrorMessage = "SavePath is required.")] | ||
[JsonProperty(PropertyName = "savePath")] | ||
public string SavePath { get; set; } | ||
|
||
[JsonProperty(PropertyName = "configType")] | ||
private readonly string configType = "BASE_AUDIO_CONFIG"; | ||
} | ||
} |
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,67 @@ | ||
/* | ||
* Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. | ||
* This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. | ||
*/ | ||
|
||
// NOTE: Code generated by OracleSDKGenerator. | ||
// DO NOT EDIT this file manually. | ||
|
||
|
||
using System.ComponentModel.DataAnnotations; | ||
using System.Runtime.Serialization; | ||
using Newtonsoft.Json; | ||
using Newtonsoft.Json.Converters; | ||
using Newtonsoft.Json.Linq; | ||
|
||
namespace Oci.AispeechService.Models | ||
{ | ||
/// <summary> | ||
/// Speech configuration for TTS API. | ||
/// </summary> | ||
[JsonConverter(typeof(TtsConfigurationModelConverter))] | ||
public class TtsConfiguration | ||
{ | ||
/// | ||
/// <value> | ||
/// The class of models to use for speech generation. The available model families are: | ||
/// - ORACLE | ||
/// | ||
/// </value> | ||
/// | ||
public enum ModelFamilyEnum { | ||
[EnumMember(Value = "ORACLE")] | ||
Oracle | ||
}; | ||
|
||
|
||
} | ||
|
||
public class TtsConfigurationModelConverter : JsonConverter | ||
{ | ||
public override bool CanWrite => false; | ||
public override bool CanRead => true; | ||
public override bool CanConvert(System.Type type) | ||
{ | ||
return type == typeof(TtsConfiguration); | ||
} | ||
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) | ||
{ | ||
throw new System.InvalidOperationException("Use default serialization."); | ||
} | ||
|
||
public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer) | ||
{ | ||
var jsonObject = JObject.Load(reader); | ||
var obj = default(TtsConfiguration); | ||
var discriminator = jsonObject["modelFamily"].Value<string>(); | ||
switch (discriminator) | ||
{ | ||
case "ORACLE": | ||
obj = new TtsOracleConfiguration(); | ||
break; | ||
} | ||
serializer.Populate(jsonObject.CreateReader(), obj); | ||
return obj; | ||
} | ||
} | ||
} |
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,33 @@ | ||
/* | ||
* Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. | ||
* This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. | ||
*/ | ||
|
||
// NOTE: Code generated by OracleSDKGenerator. | ||
// DO NOT EDIT this file manually. | ||
|
||
|
||
using System.ComponentModel.DataAnnotations; | ||
using System.Runtime.Serialization; | ||
using Newtonsoft.Json; | ||
using Newtonsoft.Json.Converters; | ||
|
||
|
||
namespace Oci.AispeechService.Models | ||
{ | ||
/// <summary> | ||
/// Use this configuration for selecting a model from Oracle model family. | ||
/// </summary> | ||
public class TtsOracleConfiguration : TtsConfiguration | ||
{ | ||
|
||
[JsonProperty(PropertyName = "modelDetails")] | ||
public TtsOracleModelDetails ModelDetails { get; set; } | ||
|
||
[JsonProperty(PropertyName = "speechSettings")] | ||
public TtsOracleSpeechSettings SpeechSettings { get; set; } | ||
|
||
[JsonProperty(PropertyName = "modelFamily")] | ||
private readonly string modelFamily = "ORACLE"; | ||
} | ||
} |
Oops, something went wrong.