{"id":15524381,"url":"https://github.com/codeforequity-at/botium-connector-webspeech","last_synced_at":"2025-03-28T20:48:22.359Z","repository":{"id":91176486,"uuid":"235959579","full_name":"codeforequity-at/botium-connector-webspeech","owner":"codeforequity-at","description":"Botium Connector for Webspeech Input/Output","archived":false,"fork":false,"pushed_at":"2020-11-05T10:54:10.000Z","size":41,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-03T17:47:12.406Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codeforequity-at.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-01-24T07:44:04.000Z","updated_at":"2020-11-05T10:54:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"da33bc6a-b50b-460d-bd69-e72a6e843290","html_url":"https://github.com/codeforequity-at/botium-connector-webspeech","commit_stats":{"total_commits":4,"total_committers":1,"mean_commits":4.0,"dds":0.0,"last_synced_commit":"a42707ed5d473c61daeb5104d8a1bd6dea5e3ecf"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeforequity-at%2Fbotium-connector-webspeech","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeforequity-at%2Fbotium-connector-webspeech/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeforequity-at%2Fbotium-connector-webspeech/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeforequity-at%2Fbotium-connector-webspeech/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codeforequity-at","download_url":"https://codeload.github.com/codeforequity-at/botium-connector-webspeech/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246100489,"owners_count":20723469,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-02T10:51:06.915Z","updated_at":"2025-03-28T20:48:22.328Z","avatar_url":"https://github.com/codeforequity-at.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Botium Connector for Webspeech Input/Output\n\n[![NPM](https://nodei.co/npm/botium-connector-webspeech.png?downloads=true\u0026downloadRank=true\u0026stars=true)](https://nodei.co/npm/fbmessengerbots-connector-webspeech/)\n\n[![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)\n[![npm version](https://badge.fury.io/js/botium-connector-webspeech.svg)](https://badge.fury.io/js/botium-connector-webspeech)\n[![license](https://img.shields.io/github/license/mashape/apistatus.svg)]()\n\nThis 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)\n\n__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!__\n\n## How it works ?\nBotium 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.\n\nBotium is able to use the [Web Speech API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Speech_API) for running the test conversations.\n* For the user part of the conversation, the Web Speech API outputs voice to the system speaker\n* For the chatbot part of the conversation, the Web Speech API listens for voice with the system microphone\n\nNaturally, a browser supporting the SpeechRecognition and the SpeechSynthesis of the Web Speech API is a precondition - see [here](https://developer.mozilla.org/en-US/docs/Web/API/Web_Speech_API#Browser_compatibility) for an overview - a not too old Chrome is a good choice.\n\n**For obvious reasons, this Botium connector only works on a workstation with graphical user interface, not in a typical CI/CD environment**\n\nIt can be used as any other Botium connector with all Botium Stack components:\n* [Botium CLI](https://github.com/codeforequity-at/botium-cli/)\n* [Botium Bindings](https://github.com/codeforequity-at/botium-bindings/)\n* [Botium Box](https://www.botium.at)\n\n## Requirements\n\n* __Node.js and NPM__\n* 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))\n* a __project directory__ on your workstation to hold test cases and Botium configuration\n\n## Install Botium and Webspeech Connector\n\nWhen using __Botium CLI__:\n\n```\n\u003e npm install -g botium-cli\n\u003e npm install -g botium-connector-webspeech\n\u003e botium-cli init\n\u003e botium-cli run\n```\n\nWhen using __Botium Bindings__:\n\n```\n\u003e npm install -g botium-bindings\n\u003e npm install -g botium-connector-webspeech\n\u003e botium-bindings init mocha\n\u003e npm install \u0026\u0026 npm run mocha\n```\n\nWhen using __Botium Box__:\n\n_Already integrated into Botium Box, no setup required_\n\n## Connecting with Botium\n\n```\n{\n  \"botium\": {\n    \"Capabilities\": {\n      \"PROJECTNAME\": \"\u003cwhatever\u003e\",\n      \"CONTAINERMODE\": \"webspeech\"\n    }\n  }\n}\n```\n\n## Supported Capabilities\n\nSet the capability __CONTAINERMODE__ to __webspeech__ to activate this connector.\n\n```\nconst Capabilities = {\n  WEBSPEECH_SERVER_PORT: 'WEBSPEECH_SERVER_PORT',\n  WEBSPEECH_LANGUAGE: 'WEBSPEECH_LANGUAGE',\n  WEBSPEECH_PITCH: 'WEBSPEECH_PITCH',\n  WEBSPEECH_RATE: 'WEBSPEECH_RATE',\n  WEBSPEECH_VOLUME: 'WEBSPEECH_VOLUME',\n  WEBSPEECH_VOICE: 'WEBSPEECH_VOICE',\n  WEBSPEECH_CLOSEBROWSER: 'WEBSPEECH_CLOSEBROWSER',\n  WEBSPEECH_BROWSER_APP: 'WEBSPEECH_BROWSER_APP'\n}\n\nconst Defaults = {\n  [Capabilities.WEBSPEECH_SERVER_PORT]: 46050,\n  [Capabilities.WEBSPEECH_LANGUAGE]: 'en-US',\n  [Capabilities.WEBSPEECH_CLOSEBROWSER]: true,\n  [Capabilities.WEBSPEECH_BROWSER_APP]: 'chrome'  \n}\n```\n\n### WEBSPEECH_SERVER_PORT\n_Default: 46050_\n\nBotium opens up a temporary local web server to inject some Botium code into the browser. The port number can be choosen, but usually the default settings are fine.\n\n### WEBSPEECH_BROWSER_APP\n\nBotium uses the [opn](https://github.com/sindresorhus/opn) library to open the system default application for opening a web site. What browser is actually opened depends on system settings. To force a specific browser to be opened, the \"app\" option of the opn-library can be changed (for example, \"chrome\" on Windows).\n\n### WEBSPEECH_CLOSEBROWSER\n_Default: true_\n\nSometimes it can be useful to leave the browser window open after running a test case (attention: when running multiple test cases, lots of browser windows will stay open). Mainly for debugging purposes - you can open the Javascript console of the browser of WebSpeech API is failing.\n\n### WEBSPEECH_LANGUAGE\n_Default: \"en-US\"_\n\nThe language to use in speech recognition and speech synthesis.\nSee:\n* https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognition/lang\n* https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance/lang\n\n### WEBSPEECH_PITCH, WEBSPEECH_RATE, WEBSPEECH_VOLUME, WEBSPEECH_VOICE\n\nWith these capabilities the SpeechSynthesis can be adapted.\nSee: \n* https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeforequity-at%2Fbotium-connector-webspeech","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodeforequity-at%2Fbotium-connector-webspeech","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeforequity-at%2Fbotium-connector-webspeech/lists"}