Socket
Socket
Sign inDemoInstall

assiskyv13

Package Overview
Dependencies
6
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    assiskyv13

A Discord Speech-to-Text module made with Vosk.


Version published
Weekly downloads
1
Maintainers
1
Created
Weekly downloads
 

Readme

Source

FOSSA Status

assisky

A Discord Speech-to-Text module made with Vosk. Yes, it works!

IMPORTANT!

In Discord settings, if you are not in the Push-to-Talk mode in "Voice & Video" and you are in the Voice Activity mode, you must disable "Automatically determine input sensivity" option and set it to lowest value. Like in this screenshot:

always transmit

Installation

  1. Download a model. You can click here to find models.
  2. Extract the zip file to a folder.
  3. Rename the folder as "model" and put it in the root of your project or a path you want.
  4. If you put the model folder at a custom path then edit the model path in the code.
  5. Install ffmpeg. (apt install ffmpeg for Ubuntu)
  6. Install this npm module with npm i assisky

API

Assisky.setup(options)

options:

{
    "voskLogLevel": int, // -1 to disable logging of Vosk
    "modelPath": "Path to downloaded model folder", // Default: ./model
}

Returns an event for sending recognition results. See example for details.

Assisky.startListeningUser(userId, discordVoiceConnection)

userId: A Discord user ID that joined to a voice channel.

discordVoiceConnection: The voice connection of the bot. (Bot should join the same VC with the user.) See this for more details.

Assisky.stopListeningUser(userId)

userId: A Discord user ID that joined to a voice channel and recognition for user has been started and progressing.

Assisky.stopListeningChannel(channelId)

channelId: A Discord channel ID, bot will stop listening everyone in the channel. Useful to run before leaving a VC.

Assisky.listeningList

Bot returns an Object which contains current listening users' streams, connection, userId. {discordAudio,PCMToMP3,wavReader,rec,connection,userId}

Assisky.config

The config object that recieved from Assisky.setup() function.

Example

Inspect the example folder.

Note: In the example below, I've used the Turkish language model but you can use different models as you want.
"bu bir denemedir" means "this is a test"
"merhaba dünya" means "hello world"

Example.gif

License

FOSSA Status

Keywords

FAQs

Last updated on 29 Jun 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc