npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

augnitosdk

v0.0.28

Published

AugnitoSDK lets you make use of the Speech Recognition AI. You can edit, format and complete reports at the speed of human speech, with the best-in-class accuracy

Downloads

226

Readme

Augnito Speech SDK

You can use Augnito SDK to make use of the Speech Recognition AI. To get access credentials or talk to us about your project, get in touch with us at [email protected].

Installation

Install the library in your project

npm install augnitosdk

Basic Usage

1- Import the library

import { Augnito, AugnitoConfig, AugnitoAPIServer } from 'augnitosdk';

2- Create the configuration file and instantiate Augnito Client

const augnitoConfig: AugnitoConfig = {
  server: <your server>,
  accountCode: '<your accountcode>',
  accessKey: '<your accesskey>',
  userTag: '<your usertag>',
  sourceApp: '<your sourceapp>',
  lmId: '<your lmid>',
};

const augnito = new Augnito(augnitoConfig);

3- Toogle the client!

Now all you have to do is toggle the status when you want to connect/disconnect!

// Toggles the Speech API connection
augnito.toggleListening();

That's all!

Note: If the client does not start, it may be that onMicrophoneOnError was called. This was implemented to prevent a user from opening a conection in multiple tabs. You can use requestMicOff to force close other connections.

augnito.onMicrophoneOnError = (isWebClient: boolean) => {
  //If you want to use Augnito in this tab.
  augnito.requestMicOff();
  augnito.toggleListening();
};

Mobile Application

Whether you want to use the Augnito App as your microphone, or you want to develop your own app, we got you covered.

All you have to do is initialize the mobile configuration. The SDK will generate a value that you need to use to generate a QR code which should be scanned in the App.

import { AugnitoMobileConfig } from 'augnitosdk';

const mobileConfig: AugnitoMobileConfig = {
  enableLogs: false
};
const augnitoMobile = augnito.initMobileClient(mobileConfig);

//Generate a QR Code with the following value
const code = augnito.getQRCode();

Augnito - Speech Related Callbacks

| Name | type | Description | | ------------------- | ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | onPartialResult | (text: string) => void | Partial Result generated from the server | | onFinalResult | (finalText: Recipe) => boolean | A final result is called when text has been processed by the Speech Server. Returns true to stop the processing in the SDK | | onCommandResult | (command: Recipe) => boolean | A command generated from the server. Returns true to stop the processing in the SDK | | onStateChanged | (isConnected: boolean) => void | Callback to indicate the status of the connection has changed. | | onSessionEvent | (data: AugnitoSocketResponse) => void | Callback to intercept Session Events | | onIdleMic | () => void | Callback when the Mic is idle for 5 minutes | | onMicrophoneOnError | (isWebClient: boolean) => void | Callback triggered when trying to start the connection, but it fails because it is already opened. (It can be opened in another tab, or it was not closed properly) | | onError | (error: AugnitoSDKErrorMessage) => void| Callback triggered when the SDK encouters an error |

Augnito Mobile - Speech Related Callbacks

| Name | type | Description | | ------------------- | ---------- | ------------------------------------------------------ | | onConnectionRequest | () => void | Callback when a mobile client is requesting to connect | | onMobileScan | () => void | Callback when a mobile client has scanned the QR Code |

Augnito Methods

| prop | type | notes | | ---------------- | ------------- | -------------------------------------------------------------------------------------------------------------------------------- | | toggleListening | void | Toggles the Speech API connection: if already connected, it will stop the web socket; otherwise, it will start a new connection. | | isConnected | boolean | Returns the status of the web socket: true if connected; otherwise false. | | getQRCode | string | Returns the Generated Value for the QR Code (If and only if the DeviceId was provided). | | dispose | void | Dispose all resources. | | initMobileClient | AugnitoMobile | Creates a web socket for getting notifications from client mobile application: only to be used with Mobile App | | apisFactory | FactoryAPI | Returns an Abstract Factory to create different API Clients. | | requestMicOff | void | Sends a request to close all opened connections. |

MacrosAPI

MacrosAPI Methods

| name | type | notes | | ----------- | -------------------- | -------------------------------------------------- | | getMacros | Promise: MacroResult | Returns a list of macros for the specified user. | | upsertMacro | Promis: MacroResult | Creates or Updates a Macro for the specified user. | | deleteMacro | Promise: MacroResult | Deletes a Macro for the specified user. |

1- Create Macros Client

// If you already have an augnito client..
const macrosClient = augnito.apisFactory.getMacrosAPI();

// OR
import { MacrosAPI } from 'augnitosdk';
const macrosClient = new MacrosAPI(
  accountCode,
  accessKey,
  AugnitoAPIServer.INDIA
);

2- Use the Macros Client to list, create, update or delete user macros

macrosClient
  .getMacros({
    UserTag: userTag
  })
  .then((result) => {
    console.log(result);
  });