Class SpeechAPI
Inheritance
object
SpeechAPI
Assembly: .dll
Syntax
public class SpeechAPI : AIDevKitComponent
Properties
IsRecording
Declaration
public bool IsRecording { get; }
Property Value
OutputPath
Declaration
public string OutputPath { get; set; }
Property Value
Recorder
Declaration
public AudioRecorder Recorder { get; }
Property Value
Type |
Description |
AudioRecorder |
|
RecordingDuration
Declaration
public int RecordingDuration { get; set; }
Property Value
RemoveBackgroundNoise
Declaration
public bool RemoveBackgroundNoise { get; set; }
Property Value
SpeechToTextModel
Declaration
public Model SpeechToTextModel { get; set; }
Property Value
SpokenLanguage
Declaration
public SystemLanguage SpokenLanguage { get; set; }
Property Value
Type |
Description |
SystemLanguage |
|
TextToSpeechModel
Declaration
public Model TextToSpeechModel { get; set; }
Property Value
TextToSpeechVoice
Declaration
public Voice TextToSpeechVoice { get; set; }
Property Value
VoiceChangerModel
Declaration
public Model VoiceChangerModel { get; set; }
Property Value
VoiceChangerVoice
Declaration
public Voice VoiceChangerVoice { get; set; }
Property Value
Methods
ChangeVoiceAsync()
Declaration
public UniTask<GeneratedAudio> ChangeVoiceAsync()
Returns
ChangeVoiceAsync(Voice)
Declaration
public UniTask<GeneratedAudio> ChangeVoiceAsync(Voice voice)
Parameters
Type |
Name |
Description |
Voice |
voice |
|
Returns
GenerateSpeechAsync(string)
Declaration
public UniTask<GeneratedAudio> GenerateSpeechAsync(string text)
Parameters
Type |
Name |
Description |
string |
text |
|
Returns
GenerateSpeechAsync(string, Voice)
Declaration
public UniTask<GeneratedAudio> GenerateSpeechAsync(string text, Voice voice)
Parameters
Type |
Name |
Description |
string |
text |
|
Voice |
voice |
|
Returns
StartRecording(string)
Start recording audio from the microphone
Declaration
public void StartRecording(string deviceName = null)
Parameters
Type |
Name |
Description |
string |
deviceName |
|
TranscribeRecordingAsync()
Stop recording audio from the microphone and transcribe it
Declaration
public UniTask<Transcript> TranscribeRecordingAsync()
Returns
TranslateRecordingAsync()
Declaration
public UniTask<string> TranslateRecordingAsync()
Returns
Type |
Description |
UniTask<string> |
|