forked from wit-ai/pywit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME
More file actions
44 lines (30 loc) · 1.07 KB
/
README
File metadata and controls
44 lines (30 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Wit Python SDK
`pywit` is the Python SDK for [Wit.AI](http://wit.ai).
## Prerequisites
This package requires:
* libsox (with -dev files on Debian/Ubuntu, `brew install sox` on OS X)
* libcurl (with -dev files on Debian/Ubuntu, `brew install curl` on OS X)
* a recent enough version of Python 2.7:
* for OS X users: you can install it via Homebrew using `brew install python`. The version currently shipped with OS X is too old
* for Linux users: make sure the python dev files are installed (`sudo apt-get install python-dev` on Debian)
## Installation instructions
### Using pip
```bash
pip install wit
```
### Regular way
Run the following commands into the main directory (where `setup.py` and `pywit.c` are located):
```bash
python setup.py build
sudo python setup.py install
```
## Usage
```python
import wit
access_token = 'ACCESS_TOKEN'
wit.init()
print('Reponse: {}'.format(wit.text_query('turn on the lights in the kitchen', access_token)))
print('Response: {}'.format(wit.voice_query_auto(access_token)))
wit.close()
```
See example files for further information.