GithubHelp home page GithubHelp logo

node-siri's Introduction

node-siri

nodejs Siri代理.

NPM方式

npm install siri
siri #测试脚本需要使用80和443端口

开始使用

  1. 想办法将 guzzoni.apple.com DNS解析到运行代理的机器,(如果越狱了,可以直接改host。没有越狱的话,也可以通过架设DNS代理服务器然后修改路由器的DNS服务器来实现).
  2. 运行 sudo node install.js ,Siri代理使用443端口,检测界面使用80端口(可选).
  3. 通过IOS设备访问 http://guzzoni.apple.com ,系统会自动检测配置.
  4. 写自己的程序,尽情的调戏Siri吧。

编程示例

var siri = require("siri");

siri.createServer(function(cmd, dev) {
    if (/你好/.test(cmd)) {
        dev.end("Siri代理向你问好.");
    } else {
        dev.proxy();
    }
}).start();

API

SiriDevice.say(text[, speakable]):

返回信息,在本次对话结束前可以多次调用。

SiriDevice.ask(text[, speakable], callback):

询问方式,在本次对话结束前可以多次调用。  
callback(answer):
回答回调函数,answer为回复内容。

SiriDevice.end([text[, speakable]]):

结束本次对话,返回信息可选。

SiriDevice.proxy():

将本次对话交由Siri服务器处理。

node-siri's People

Contributors

zhangyuanwei avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.