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

geist

Package Overview
Dependencies
Maintainers
55
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

geist - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

42

package.json
{
"name": "geist",
"version": "0.1.0",
"description": "Build virtual assistants for the web",
"homepage": "https://github.com/syntheticore/geist",
"author": "Björn Breitgoff <syntheticore@gmail.com>",
"license": "MIT",
"repository": {
"type": "git",
"url": "git://github.com/syntheticore/geist.git"
},
"bugs": {
"url": "https://github.com/syntheticore/geist/issues"
},
"main": "geist.js",
"scripts": {
"test": "make test"
},
"dependencies": {
"eakwell": "^0.1.0",
"natural": "^0.2.1",
"rsvp": "^3.1.0",
"ssml": "0.0.3"
},
"devDependencies": {
"chai": "^2.2.0",
"codeclimate-test-reporter": "^0.1.1",
"istanbul": "^0.3.13",
"mocha": "^2.2.1"
},
"keywords": [
"ai",
"chat bot",
"speech",
"recognition",
"synthesis",
"virtual",
"assistant",
"siri",
"cortana"
]
"version": "0.1.1",
"main": "index.js",
"license": "MIT"
}

@@ -1,90 +0,1 @@

# Geist
[![npm version](https://badge.fury.io/js/geist.svg)](http://badge.fury.io/js/geist) [![Build Status](https://travis-ci.org/syntheticore/geist.svg?branch=master)](https://travis-ci.org/syntheticore/geist) [![Dependency Status](https://david-dm.org/syntheticore/geist.svg)](https://david-dm.org/syntheticore/geist) [![Code Climate](https://codeclimate.com/github/syntheticore/geist/badges/gpa.svg)](https://codeclimate.com/github/syntheticore/geist)
Build virtual assistants for the web
Designed for use with Browserify
## Installation
npm install geist --save
## Usage
```JavaScript
var geist = require('geist');
// Describe your assistant
var hal = new geist.Mind('HAL 9000', {
// Language is taken from the document if not specified here
language: 'en-US',
// Keep listening all the time if you like
continuous: true,
// Define generic concepts for recognition and/or answer text generation
// You can either use template strings or functions to determine a match
concepts: {
TOD: ["morning | afternoon | evening | night", function() {
// Current time of day
var hours = new Date().getHours();
if(hours < 12) return 'morning';
else if(hours <= 16) return 'afternoon';
else if(hours <= 22) return 'evening';
else return 'night';
}],
JOKE: [undefined, function() {
// Random joke
return _.pick(jokes);
}]
},
// Define your action handlers
actions: {
MESSAGE: function(person, text) {
// Send message...
}
},
// Build the actual conversation
conversation: {
// Use alternatives to make recognition flexible and output diverse
"Thank('s | you)" : "You're welcome! | No problem!",
// Reference general concepts in your conversation and influence TTS using emotions
"Open #ARTICLE * [pod bay] door[s]" : "I'm sorry, #HUMAN. %SAD(I'm afraid I can't do that)",
// Create your own concepts and reference them
"(Tell [me] | [Do] you know) a joke" : "How about this one: #JOKE",
// Allow greetings before other text and greet back before continuing
"(Hi | Hello | Good #TOD) [#NAME] [...]" : "(Hello | Good #TOD), #HUMAN! ...",
// Use $variables to extract information
"[(Send | write | new) [a]] message to {$person: *}" : { "What message would you like to send to $person?" : {
// Drill down into conversations to retrieve additional information
"{$message: *}" : { "Shall is send \"$message \" to $person?" : {
// Call action handler
"#YES" : "!MESSAGE($person, $message) It's out!",
// Ask for the message again
"#NO" : "Sorry, <-",
// Back to top level
"#CANCEL" : "Ok, not sending it. <--"
}}
}},
// Make sure at least one phrase catches everything
"*" : "Excuse me!? | Can you please repeat that, #HUMAN?"
}
});
// Start listening to the users voice
// The user will be asked for access to her microphone
hal.listen(function(interimText) {
// Visualize speech recognition process..
}, function(text) {
// Show final recognized text...
}, function(answer) {
// (Answer is being spoken using TTS)
// Display answer as well if you like...
});
// Stop speaking and listening immediately
hal.stop();
```
## License
MIT
# geist
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