0.8.9 • Published 12 months ago

@tovera/willow-ts-client v0.8.9

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

npm.io

Willow TS Client

This repo contains the TypeScript client for interacting with Willow's WebRTC component. Detailed docs can be found here.

Installation

npm install @tovera/willow-ts-client

Basic Usage

import { WillowClient } from '@tovera/willow-ts-client'
const client = new WillowClient({ host: "http://localhost:19000/api/rtc/asr" })
client.on('onOpen', () => {
  console.log('Connection open. Recording for 30 seconds.')
  client.start()
  setTimeout(()=>client.stop(), 30*1000)
})
client.on('onLog', (log) => {
  console.log('Verbose server log: ' + log)
})
client.on('onError', (err) => {
  console.error('Willow WebRTC Error', err)
})
client.on('onInfer', (msg) => {
  console.log(`Got result ${msg.text} in ${msg.time}ms`)
})
await client.init();
0.8.9

12 months ago

0.8.8

12 months ago

0.8.7

12 months ago

0.8.6

12 months ago

0.8.5

12 months ago

0.8.4

12 months ago