Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error using WASAPI-Loopback #19

Closed
OptimisticGeek opened this issue Apr 16, 2024 · 11 comments
Closed

Error using WASAPI-Loopback #19

OptimisticGeek opened this issue Apr 16, 2024 · 11 comments
Assignees
Labels
enhancement New feature or request

Comments

@OptimisticGeek
Copy link

Hello,Sharrnah

The program reported an error after setting the Loopback. . I can't solve this problem by myself, so I have to come here to trouble you.

This is my configuration image,Note that Audio Input(mic) uses a Loopback.
image

An error occurred when tiger started loading
image

This is the complete error log image
image

Your Chinese friend,OptimisticGeek

@Sharrnah
Copy link
Owner

Looking at your headset, my guess is that it has issues with 7.1 surround sound.

It can't handle so many channels. Since i don't have 7.1 surround sound, its difficult for me to test.
Can you try it with regular stereo sound? That should definetly work.

@OptimisticGeek
Copy link
Author

I found out through your code that my headphones are mono induced.
image

Yes, my headphones have 7.1 surround sound. I'm trying to figure out how to set up the driver for this headset. I'll give you the answer later.

@OptimisticGeek
Copy link
Author

In my tests, 7.1 surround sound will report an error whether it is turned on or off.Because my headphones only support one channel,It does not support dual channels!

@Sharrnah
Copy link
Owner

one channel should also work.

Thats what it uses as fallback in the code you mentioned.

I think you confuse the microphone (which is mostly 1 channel)
and your loudspeaker in the headset (in your case probably 8 channels [7+1])

Another way that you can try is using Voicemeeter https://vb-audio.com/Voicemeeter/

with that, you can route your PC audio to a VAIO Input which again can route to your Headset.
When you now use the Loopback device of the VAIO Input, i think it could work. Though i never tested it with surround sound.

I will see if i can find a sultion with more than 2 channels of audio. So i will keep this issue open.

@Sharrnah Sharrnah reopened this Apr 16, 2024
@OptimisticGeek
Copy link
Author

OptimisticGeek commented Apr 16, 2024

I think you confuse the microphone (which is mostly 1 channel) and your loudspeaker in the headset (in your case probably 8 channels [7+1])

I do not understand the difference between single channel and dual channel, but through the online information to look up the following picture, the problem seems to be due to the limitations of my headset hardware.

Note the Input setttings -> format option,I'm guessing the 1 and 2 in your code are based on that.
image

Screenshot information link
image

Another way that you can try is using Voicemeeter https://vb-audio.com/Voicemeeter/

Yes, I have achieved real-time translation of in-game sounds in this way. And by opening a new process to achieve the voice translation function, thank you very much.

I will see if i can find a sultion with more than 2 channels of audio. So i will keep this issue open.

Okay, I won't close this comment myself anymore.

@OptimisticGeek
Copy link
Author

Note that my headset is a USB device with microphone and speaker in one, not two 3.5mm plugs (speaker plug, microphone plug)

@Sharrnah
Copy link
Owner

Note the Input setttings -> format option,I'm guessing the 1 and 2 in your code are based on that.

Yes. But in your screenshot you edit your microphone. Since you want to use [Loopback] it would actually be the loudspeakers (Output) device.

(Loopback is a feature of WASAPI that allows recording of outgoing audio, so everything that is played to the loudspeakers)

Though it is possible that Windows does not allow changing the channels for output devices.
(At least i don't see any option for that, but i only have 2 to begin with.)

@OptimisticGeek
Copy link
Author

Through the use of Voicemeeter, I understood some principles of WASAPI.
Sharrnah, thank you for your answer!

@Sharrnah Sharrnah added the enhancement New feature or request label Apr 17, 2024
@Sharrnah Sharrnah self-assigned this Apr 17, 2024
@Sharrnah
Copy link
Owner

Should be fixed in the next release version: Sharrnah/whispering#24

I haven't really tested it with more than 2 channels since i don't have anything with more than 2. But i am relatively confident it (should) work. 😬

I will keep this issue open until the next version release.

@OptimisticGeek
Copy link
Author

OptimisticGeek commented Apr 23, 2024

Ok, this is great, I will test this issue after the new version is released!
04538544

@Sharrnah
Copy link
Owner

Sharrnah commented Jul 5, 2024

I just released the new Update.

  • This should now support audio devices with more than 2 channels by resampliing them seperately and later remerging them.

I will close this. Let me know if it works with the new update.

@Sharrnah Sharrnah closed this as completed Jul 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants