Having trouble setting the Speech Synthesizer audio output

66 Views Asked by At

So.. ive been trying for a bit and i still cant get it to work, i was able to make it List all devices using

var enumerator = new MMDeviceEnumerator();
for (int i = 0; i < WaveOut.DeviceCount; i++)
AudioSelectBox.Items.Add(enumerator.EnumerateAudioEndPoints(DataFlow.Render, DeviceState.Active)[i]);
enumerator.Dispose();

but my way of setting them is incorrect. i was trying to set it like the way i did before with the voices which would've been like this

private void AudioSelectBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            synthesizer.SetOutputToWaveStream(AudioSelectBox.Text);
        }

i know its kinda incorrect but this method did work if it comes to the voices. i am using NAudio. is there any chance someone can help me figure out how to do it?

im just trying to get my program to play into a different audio device since its just using the default one rn, my friend wants to use it since he cant really talk, the output device is the only thing i cant get working and preventing me from finishing it

0

There are 0 best solutions below