# botium-connector-webspeech

> Botium Connector for Webspeech Input/Output

Latest version **0.0.1** (published 2020-01-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install botium-connector-webspeech
pnpm add botium-connector-webspeech
yarn add botium-connector-webspeech
bun add botium-connector-webspeech
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2020-01-24 |
| First published | 2020-01-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 6 |
| Unpacked size | 140.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Botium GmbH |
| Maintainers | ftreml |

## Links

- npm: https://www.npmjs.com/package/botium-connector-webspeech
- Repository: https://github.com/codeforequity-at/botium-connector-webspeech
- Homepage: https://github.com/codeforequity-at/botium-core
- Issues: https://github.com/codeforequity-at/botium-core/issues
- npm.io page: https://npm.io/package/botium-connector-webspeech

## Dependencies (6)

- [open](https://npm.io/package/open.md) ^7.0.0
- [debug](https://npm.io/package/debug.md) ^4.1.1
- [find-root](https://npm.io/package/find-root.md) ^1.1.0
- [socket.io](https://npm.io/package/socket.io.md) ^2.3.0
- [tiny-server](https://npm.io/package/tiny-server.md) ^1.1.0
- [@babel/runtime](https://npm.io/package/@babel/runtime.md) ^7.8.3

## Recent versions

- 0.0.1 (latest) — 2020-01-24

## README

# Botium Connector for Webspeech Input/Output

[![NPM](https://nodei.co/npm/botium-connector-webspeech.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/fbmessengerbots-connector-webspeech/)

[![Codeship Status for codeforequity-at/botium-connector-webspeech](https://app.codeship.com/projects/88b80180-20bb-0138-59ee-1ed6ecea113b/status?branch=master)](https://app.codeship.com/projects/382617)
[![npm version](https://badge.fury.io/js/botium-connector-webspeech.svg)](https://badge.fury.io/js/botium-connector-webspeech)
[![license](https://img.shields.io/github/license/mashape/apistatus.svg)]()

This is a [Botium](https://github.com/codeforequity-at/botium-core) connector for using audio input and output via [Webspeech API](https://de.wikipedia.org/wiki/Web_Speech_API)

__Did you read the [Botium in a Nutshell](https://medium.com/@floriantreml/botium-in-a-nutshell-part-1-overview-f8d0ceaf8fb4) articles ? Be warned, without prior knowledge of Botium you won't be able to properly use this library!__

## How it works ?
Botium starts a web browser and utilizes the integrated Webspeech controls to start a conversation with whoever is sitting in front of the workstation. This can be a human, but also an Alexa or Google device.

**For obvious reasons, this Botium connector only works on a workstation with graphical user interface, not in a typical CI/CD environment**

It can be used as any other Botium connector with all Botium Stack components:
* [Botium CLI](https://github.com/codeforequity-at/botium-cli/)
* [Botium Bindings](https://github.com/codeforequity-at/botium-bindings/)
* [Botium Box](https://www.botium.at)

## Requirements

* __Node.js and NPM__
* a __Web Browser__ (Currently, the only desktop browser to [support Webspeech API is Google Chrome](https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognition#Browser_compatibility))
* a __project directory__ on your workstation to hold test cases and Botium configuration

## Install Botium and Webspeech Connector

When using __Botium CLI__:

```
> npm install -g botium-cli
> npm install -g botium-connector-webspeech
> botium-cli init
> botium-cli run
```

When using __Botium Bindings__:

```
> npm install -g botium-bindings
> npm install -g botium-connector-webspeech
> botium-bindings init mocha
> npm install && npm run mocha
```

When using __Botium Box__:

_Already integrated into Botium Box, no setup required_

## Connecting with Botium

```
{
  "botium": {
    "Capabilities": {
      "PROJECTNAME": "<whatever>",
      "CONTAINERMODE": "webspeech"
    }
  }
}
```

## Supported Capabilities

Set the capability __CONTAINERMODE__ to __webspeech__ to activate this connector.

```
const Capabilities = {
  WEBSPEECH_SERVER_PORT: 'WEBSPEECH_SERVER_PORT',
  WEBSPEECH_LANGUAGE: 'WEBSPEECH_LANGUAGE',
  WEBSPEECH_PITCH: 'WEBSPEECH_PITCH',
  WEBSPEECH_RATE: 'WEBSPEECH_RATE',
  WEBSPEECH_VOLUME: 'WEBSPEECH_VOLUME',
  WEBSPEECH_VOICE: 'WEBSPEECH_VOICE',
  WEBSPEECH_CLOSEBROWSER: 'WEBSPEECH_CLOSEBROWSER',
  WEBSPEECH_BROWSER_APP: 'WEBSPEECH_BROWSER_APP'
}

const Defaults = {
  [Capabilities.WEBSPEECH_SERVER_PORT]: 46050,
  [Capabilities.WEBSPEECH_LANGUAGE]: 'en-US',
  [Capabilities.WEBSPEECH_CLOSEBROWSER]: true,
  [Capabilities.WEBSPEECH_BROWSER_APP]: 'chrome'  
}
```

---
_Source: https://npm.io/package/botium-connector-webspeech · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
