add Speech Event< T > ( client: Client < boolean > , options?: SpeechOptions < T > ) : { group?: string ; ignoreBots?: boolean ; key?: string ; lang?: string ; minimalVoiceMessageDuration?: number ; profanityFilter?: boolean ; shouldProcessSpeech?: ( ( user: User ) => boolean ) ; speechRecognition?: ( ( audioBuffer: Buffer , options?: GoogleSpeechV2Options ) => Promise < string > ) }
Returns { group?: string ; ignoreBots?: boolean ; key?: string ; lang?: string ; minimalVoiceMessageDuration?: number ; profanityFilter?: boolean ; shouldProcessSpeech?: ( ( user: User ) => boolean ) ; speechRecognition?: ( ( audioBuffer: Buffer , options?: GoogleSpeechV2Options ) => Promise < string > ) }
Optional group?: string
Optional ignore Bots?: boolean
Optional key?: string
Optional lang?: string
Optional minimal Voice Message Duration?: number
Optional profanity Filter?: boolean
Optional should Process Speech?: ( ( user: User ) => boolean )
( user: User ) : boolean
Returns boolean
Optional speech Recognition?: ( ( audioBuffer: Buffer , options?: GoogleSpeechV2Options ) => Promise < string > )
Main function, use this to add new events to present discord.Client
Defaults uses
en-USlanguage and google speech v2 api with generic key, that should be used for personal or testing purposes only, as it may be revoked by Google at any time.You can obtain your own API key here http://www.chromium.org/developers/how-tos/api-keys.
See python speech recognition package for more details.
Example usage: