Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@speechly/react-client

Package Overview
Dependencies
Maintainers
6
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@speechly/react-client - npm Package Compare versions

Comparing version 0.0.12 to 0.0.13

4

context.d.ts

@@ -33,2 +33,6 @@ import React from 'react';

/**
* Current appId in multi-app project.
*/
appId?: string;
/**
* Current state of the context, whether it's idle, recording or failed, etc.

@@ -35,0 +39,0 @@ * It's advised to react to this to enable / disable voice functionality in your app

@@ -174,3 +174,10 @@ "use strict";

_this.switchApp = function (appId) {
var clientState = _this.state.clientState;
_this.setState({ appId: appId });
if (clientState === browser_client_1.ClientState.Recording) {
_this.stopContext().then(function (_) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
return [2 /*return*/, this.startContext()];
}); }); })
.catch(function (_) { throw Error('Cannot stop context'); });
}
};

@@ -278,3 +285,3 @@ _this.initialiseClient = function (opts) {

var _this = this;
var _a = this.state, recordingState = _a.recordingState, segment = _a.segment, tentativeTranscript = _a.tentativeTranscript, transcript = _a.transcript, tentativeEntities = _a.tentativeEntities, entity = _a.entity, tentativeIntent = _a.tentativeIntent, intent = _a.intent;
var _a = this.state, appId = _a.appId, recordingState = _a.recordingState, segment = _a.segment, tentativeTranscript = _a.tentativeTranscript, transcript = _a.transcript, tentativeEntities = _a.tentativeEntities, entity = _a.entity, tentativeIntent = _a.tentativeIntent, intent = _a.intent;
return (react_1.default.createElement(exports.SpeechContext.Provider, { value: {

@@ -284,2 +291,3 @@ initialise: this.initialiseAudio,

switchApp: function (appId) { return _this.switchApp(appId); },
appId: appId,
speechState: recordingState,

@@ -286,0 +294,0 @@ segment: segment,

@@ -53,2 +53,6 @@ import { Client } from '@speechly/browser-client';

/**
* Current appId in multi-app project.
*/
appId?: string;
/**
* Current state of the context, whether it's idle, recording or failed, etc.

@@ -55,0 +59,0 @@ * It's advised to react to this to enable / disable voice functionality in your app

2

package.json
{
"name": "@speechly/react-client",
"version": "0.0.12",
"version": "0.0.13",
"description": "React client for Speechly SLU API",

@@ -5,0 +5,0 @@ "private": false,

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc