@csukuangfj
I am currently toying with another audio output library instead but am sure the portaudio examples work as the c pre-compiled examples from the static repository archive that play audio worked for me as well :-)
Do you happen to know if it is possible to retrieve (additional) information about individual speakers of a voice model ?
It would for example be very helpful if it would be possible to know "the gender" of a speaker in order to be able to make a selection (e.g. libritts-r alone has 904 speakers).
It would also be nice to be able to use an actual name instead of "speaker with ID <insert ID number here> says:" in order to be able to distinguish individual speakers or be able to select a name from a list instead of a number.
Is there something in particular I (c/sh)ould look for in the original source-tree of sherpa-onnx to figure out if it is even possible to obtain information like that ?
TIA
procedure RotateSpeakerIDs;
var
AudioDriver : TAudioDriver;
VoiceModel : TSSTVoiceModel;
VoiceID : integer = 0;
VoiceSPD : single = 1.0;
Txt : AnsiString = 'The right word of the day like determined yesterday by the radiation-frequency of the transmitter: When it rained coliflower.';
SpeakersCount : integer;
VoiceModelDir : string;
begin
VoiceModelDir := FetchVoiceModel(GB_URLS[3]);
if VoiceModelDir = '' then
begin
writeln('PANIC: invalid voice model name. emergency exit of program.');
exit;
end;
AudioDriver := TAudioDriver.Create;
VoiceModel := TSSTVoiceModel.Create(VoiceModelDir);
try
writeln('Voice samplerate = ', VoiceModel.TTS.GetSampleRate);
SpeakersCount := VoiceModel.TTS.GetNumSpeakers;
writeLn('Voice has ', SpeakersCount, ' speakers');
for VoiceID := 0 to SpeakersCount-1
do VoiceModel.Speak(VoiceID, VoiceSPD, Txt, AudioDriver);
finally
VoiceModel.Free;
AudioDriver.Free;
end;
end;