Class OmniRealtimeAudioFormatConfig
java.lang.Object
com.alibaba.dashscope.legacy_2x.audio.omni.OmniRealtimeAudioFormatConfig
Deprecated.
New-style upstream/downstream audio format configuration, used to build the nested
audio.input.format / audio.output.format structure in the session.update request, e.g.
"session": {
"audio": {
"input": { "format": { "type": "pcm", "sample_rate": 16000 } },
"output": { "format": { "type": "pcm", "sample_rate": 24000 } }
}
}
-
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.OmniRealtimeAudioFormatConfig(OmniRealtimeAudioCodec type, int sampleRate) Deprecated.Creates a new audio format config.OmniRealtimeAudioFormatConfig(String type, int sampleRate) Deprecated.Creates a new audio format config. -
Method Summary
Modifier and TypeMethodDescriptionaddParameter(String key, Object value) Deprecated.Adds a single extra format parameter for future extension (e.g.protected booleanDeprecated.booleanDeprecated.Deprecated.Extra format parameters for future extension (e.g. speech rate).intDeprecated.sample rate in Hz, supports 8000/16000/24000/48000, defaults to 16000.getType()Deprecated.audio format type, supports "pcm" and "wav", defaults to "pcm".inthashCode()Deprecated.Deprecated.Creates a new audio format config, convenience factory method equivalent tonew OmniRealtimeAudioFormatConfig(type, sampleRate).voidsetParameters(Map<String, Object> parameters) Deprecated.Extra format parameters for future extension (e.g. speech rate).voidsetSampleRate(int sampleRate) Deprecated.voidDeprecated.toString()Deprecated.
-
Constructor Details
-
OmniRealtimeAudioFormatConfig
public OmniRealtimeAudioFormatConfig()Deprecated. -
OmniRealtimeAudioFormatConfig
Deprecated.Creates a new audio format config.- Parameters:
type- audio format typesampleRate- sample rate in Hz, must be one of 8000/16000/24000/48000
-
OmniRealtimeAudioFormatConfig
Deprecated.Creates a new audio format config.- Parameters:
type- "pcm" or "wav"sampleRate- sample rate in Hz, must be one of 8000/16000/24000/48000
-
-
Method Details
-
setType
Deprecated. -
setSampleRate
public void setSampleRate(int sampleRate) Deprecated. -
of
Deprecated.Creates a new audio format config, convenience factory method equivalent tonew OmniRealtimeAudioFormatConfig(type, sampleRate).- Parameters:
type- "pcm" or "wav"sampleRate- sample rate in Hz, must be one of 8000/16000/24000/48000- Returns:
- the created config
-
addParameter
Deprecated.Adds a single extra format parameter for future extension (e.g.addParameter("rate", 1.2)for speech rate). Merged into theformatnode when serialized.- Parameters:
key- parameter namevalue- parameter value- Returns:
- this config for chaining
-
getType
Deprecated.audio format type, supports "pcm" and "wav", defaults to "pcm". -
getSampleRate
public int getSampleRate()Deprecated.sample rate in Hz, supports 8000/16000/24000/48000, defaults to 16000. -
getParameters
Deprecated.Extra format parameters for future extension (e.g. speech rate). These entries are merged into theformatnode alongsidetype/sample_ratewhen serialized, so new server-side parameters can be passed through without changing this SDK. Reserved keys (type/sample_rate) set here are ignored to avoid overriding the typed fields. -
setParameters
Deprecated.Extra format parameters for future extension (e.g. speech rate). These entries are merged into theformatnode alongsidetype/sample_ratewhen serialized, so new server-side parameters can be passed through without changing this SDK. Reserved keys (type/sample_rate) set here are ignored to avoid overriding the typed fields. -
equals
Deprecated. -
canEqual
Deprecated. -
hashCode
public int hashCode()Deprecated. -
toString
Deprecated.
-