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

Is it possible for in-game audio sources to be omitted from whisper? #62

Open
yosun opened this issue Nov 22, 2023 · 6 comments
Open

Is it possible for in-game audio sources to be omitted from whisper? #62

yosun opened this issue Nov 22, 2023 · 6 comments
Labels
question Further information is requested

Comments

@yosun
Copy link
Contributor

yosun commented Nov 22, 2023

Is it possible for in-game audio sources to be omitted from whisper?

@Macoron
Copy link
Owner

Macoron commented Nov 22, 2023

If I understand your question correctly, for example when a player's speakers are quite loud and potentially being picked up by the microphone, then the answer is no.

Whisper operates directly with audio input from the microphone or an audio clip, and it does not include any feature for filtering out these types of background noises or sounds emitted from the in-game audio. The only suggestion I can offer is to fine-tune the Voice Activity Detection (VAD) settings to ensure that it does not react to in-game sounds captured by the microphone

@Macoron Macoron added the question Further information is requested label Nov 22, 2023
@yosun
Copy link
Contributor Author

yosun commented Nov 22, 2023 via email

@Macoron
Copy link
Owner

Macoron commented Nov 23, 2023

what if there is speaking audio from the game (NPCs) ... that you don't want whisper to pick up?

Message ID: @.***>

The simplest way is to use headphones. You can also do some custom push-to-talk button, which turn off NPC voices while player is speaking. In worst case you would need to implement some custom audio filters.

Whisper.cpp also supports speech segmentation (ggerganov/whisper.cpp#1058), but this is probably an overkill and it doesn't supported by Unity bindings yet.

@yosun
Copy link
Contributor Author

yosun commented Nov 25, 2023

Something like vocalremover.org but given the input from the in-game audio, be able to remove/extract from microphone (?)

@Macoron
Copy link
Owner

Macoron commented Nov 26, 2023

Something like vocalremover.org but given the input from the in-game audio, be able to remove/extract from microphone (?)

To be honest, I don't know. There is no build-in solution in whisper.cpp that can do something like that.

@Tyrannicus100BC
Copy link

The technical term is "echo cancellation" and is mostly used in audio chat apps. The concept is to keep track of what audio was played out of the computer speakers in the past and analyze incoming microphone input to identify that previous audio. It then uses acoustical analysis to remove the previous audio from the captured microphone input before feeding into whisper.

I did some looking around recently and couldn't find any good echo cancellation libraries for Unity :-/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants