Skip to content
This repository was archived by the owner on Apr 23, 2019. It is now read-only.

Commit f20c911

Browse files
author
Jake Mathews
committed
Added installation scripts and updated README
1 parent ba0eb7e commit f20c911

File tree

3 files changed

+105
-17
lines changed

3 files changed

+105
-17
lines changed

Diff for: README.md

+38-17
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,63 @@
11
# FaceShift
22
An electron app that uses facial tracking to move your mouse cursor.
33

4-
## Pre-requisites
4+
## Pre-requisites
5+
Prerequisites can be installed via the install script in this repository which is the recommended way for installing FaceShift.
6+
This script will only help installation on mac. Windows will require manual installation of these tools.
7+
If you have not yet cloned the repository, download just the 'install-faceshift-clone.sh' file. Place it where you want to install faceshift on your system. Now run the following command:
8+
9+
```
10+
bash ./install-faceshift-clone.sh
11+
```
12+
13+
If you have already cloned the repository, run the following command:
14+
15+
```
16+
bash ./install-faceshift.sh
17+
```
18+
19+
Note: The script only set the SnowBoy environment variable temporarily. If you terminate the terminal session, it will no longer be set. Setting it permanently will be dependent on your operating system and your preferred way of setting it. The API key for snowboy can be found in the install script.
20+
21+
If you do not want to run the script or are on Windows, you will need to install the following components manually.
22+
23+
* Git
524

625
* Node
726

827
* [Yarn](https://yarnpkg.com/lang/en/docs/install/ )
928

10-
* Electron
29+
* Electron
1130
```
1231
$ yarn global add electron
1332
```
1433

15-
## Run the project
16-
1. Clone the project
17-
```
18-
$ git clone https://github.com/FaceShift/faceshift.git
19-
```
20-
2. Build the project
21-
```
22-
$ cd faceshift
23-
$ yarn
24-
$ yarn watch
25-
```
34+
* SoX
35+
Install SoX for voice commands [http://sox.sourceforge.net/](http://sox.sourceforge.net/)
2636

27-
3. Install SoX for voice commands [http://sox.sourceforge.net/](http://sox.sourceforge.net/)
37+
* Python 2.7.x
2838

29-
4. Get an Api key from Snowboy
39+
* Get an Api key from Snowboy
3040
API token can be obtained by logging into [https://snowboy.kitt.ai](https://snowboy.kitt.ai), click on 'Profile settings'
3141

32-
5. Create an environtment variable
42+
* Create an environment variable. This process differs for Windows and Mac
3343
```
3444
SNOWBOY_API = [your api key]
3545
```
3646

37-
6. Run the project (open a different terminal/command window)
47+
## Run the project
48+
1. Build the project
49+
50+
```
51+
$ cd faceshift
52+
$ yarn
53+
$ yarn watch
54+
```
55+
56+
2. Run the project (open a different terminal/command window)
3857

3958
```
4059
Mac $ yarn start-mac
4160
Windows $ yarn start-win
4261
```
62+
63+

Diff for: install-faceshift-clone.sh

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#!/bin/sh
2+
3+
echo "[FACESHIFT] Installing faceshift pre-requisites"
4+
5+
echo "[FACESHIFT] Installing homebrew"
6+
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
7+
8+
echo "[FACESHIFT] Installing git"
9+
brew install git
10+
11+
echo "[FACESHIFT] Installing python"
12+
brew install python2
13+
14+
echo "[FACESHIFT] Installing npm"
15+
brew install npm
16+
17+
echo "[FACESHIFT] Installing yarn"
18+
brew install yarn
19+
20+
echo "[FACESHIFT] Installing electron"
21+
yarn global add electron
22+
23+
echo "[FACESHIFT] Installing sox"
24+
brew install sox
25+
26+
echo "[FACESHIFT] Cloning faceshift from GitHub"
27+
git clone https://github.com/FaceShift/faceshift.git
28+
cd ./faceshift
29+
30+
echo "[FACESHIFT] Setting environment variables"
31+
export SNOWBOY_API=27cacc0c071c70c76b61af43b514ec2453a3584a
32+
33+
echo "[FACESHIFT] Installing npm dependencies with yarn"
34+
yarn
35+
36+
echo "[FACESHIFT] FaceShift installed! Run the command 'yarn watch' in terminal with the workign directory set to the installing folder of faceshift"
37+
echo "[FACESHIFT] In another terminal window, navigate to the faceshift installation directory and run the command 'yarn start-mac'"

Diff for: install-faceshift.sh

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/bin/sh
2+
3+
echo "[FACESHIFT] Installing faceshift pre-requisites"
4+
5+
echo "[FACESHIFT] Installing homebrew"
6+
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
7+
8+
echo "[FACESHIFT] Installing python"
9+
brew install python2
10+
11+
echo "[FACESHIFT] Installing npm"
12+
brew install npm
13+
14+
echo "[FACESHIFT] Installing yarn"
15+
brew install yarn
16+
17+
echo "[FACESHIFT] Installing electron"
18+
yarn global add electron
19+
20+
echo "[FACESHIFT] Installing sox"
21+
brew install sox
22+
23+
echo "[FACESHIFT] Setting environment variables"
24+
export SNOWBOY_API=27cacc0c071c70c76b61af43b514ec2453a3584a
25+
26+
echo "[FACESHIFT] Installing npm dependencies with yarn"
27+
yarn
28+
29+
echo "[FACESHIFT] FaceShift installed! Run the command 'yarn watch' in terminal with the workign directory set to the installing folder of faceshift"
30+
echo "[FACESHIFT] In another terminal window, navigate to the faceshift installation directory and run the command 'yarn start-mac'"

0 commit comments

Comments
 (0)