Rei-x / discord-speech-recognition

Speech to text extension for discord.js
https://npmjs.com/package/discord-speech-recognition
MIT License
56 stars 22 forks source link

Short words are not detectable #50

Closed Naozumi520 closed 1 year ago

Naozumi520 commented 1 year ago

Some words like Hi and really are not detectable, and I didn't see any option to filter short words.

Rei-x commented 1 year ago

ah, yes, it was hardcoded so voice messages shorter than 1 seconds are ignored to avoid too many requests https://github.com/Rei-x/discord-speech-recognition/blob/076bdc0a6e2aad338e558dc252dd7862a3b5404b/src/bot/voiceMessage/createVoiceMessage.ts#L28

I will add soon option to override it

Rei-x commented 1 year ago

added in v3.3.0

Naozumi520 commented 1 year ago

I tried to put

addSpeechEvent(client, {
    minimalVoiceMessageDuration: 1,
})

But it did not detect anything

Rei-x commented 1 year ago

change it to lower value, like 0.5 or 0.3, experiment with it until you get what you like