Download a Mac DMG through the Releases tab on the right or navigate to the limited web version.
- Clone this repository, including its submodules:
git clone --recurse-submodules https://github.com/sarahayu/drift4.git
- Prepare the python environment
- Drift uses python2 and python3. Make sure the command
python
refers to python2 andpython3
refers to python3. At this time of development, the versions used are2.7.18
for python2 and3.8.10
for python3. scikits.audiolab
requireslibsndfile
, so install the latter first. On Mac, this can be done through Homebrew:On a Linux or WSL, usebrew install libsndfile
apt-get
:You can also build it from source.sudo apt-get install libsndfile1 sudo apt-get install libsndfile-dev
- Install python dependencies using these commands:
python -m pip install -r py2requirements.txt python3 -m pip install -r py3requirements.txt
- Drift uses python2 and python3. Make sure the command
- Install ffmpeg by running these commands:
**When bundling, make sure to include the ffmpeg executable inside the main directory. You can download an executable from the ffmpeg official website.
sudo apt update sudo apt install ffmpeg
- Run Gentle. Then, run Drift by running the following command from inside Drift's main directory:
This will run Drift's backend on port
npm run dev
9899
(you can change the port in thenpm_drift.sh
file). Navigate to React's endpoint (usuallylocalhost:3000
unless you've changed this) to see the compiled frontend. Editing/saving any file insrc/
will result in those changes being updated live.
Bundling Drift to a Mac DMG is a finicky process. The following steps seem to work only for High Sierra on Mac:
- Install the
PyInstaller
package on both python2 and python3 - Make sure to rollback PyQt to version 5.12.3 to avoid segfault errors:
python3 -m pip install --upgrade PyQt5==5.12.3
- Run
make_dmg.sh
. The DMG file will be found in thedist
folder asdrift4.dmg
.
- Run the following command to generate static files.
npm run build.web
- Run the following command to start Drift4 in web hosting mode.
You can run
./serve -w
./serve -h
to see a list of options, like changing Drift or Gentle ports.-
You can host Drift securely by providing a
.env
file with variablesPRIVATE_KEY_FILENAME
andCERT_FILENAME
that point to your certificates before running the above command.Example
.env
file:PRIVATE_KEY_FILENAME=/path/to/privatekey.pem CERT_FILENAME=/path/to/certificate.pem
-
Gentle provides a DMG for Mac, but if you need to put yourself through the ordeal of running Drift on Windows or Linux, either for development purposes or out of spite, you can still run Gentle with some extra steps. Follow the installation instructions on their GitHub repository. Docker is the easiest option, but if you are building from source, make the following change:
- Fix the broken download link in
ext/kaldi/tools/Makefile
by changing the link on line 87towget -T 10 -t 1 http://openfst.cs.nyu.edu/twiki/pub/FST/FstDownload/openfst-$(OPENFST_VERSION).tar.gz || \
openfst.org
so it looks like sowget -T 10 -t 1 http://openfst.org/twiki/pub/FST/FstDownload/openfst-$(OPENFST_VERSION).tar.gz || \
The following pointers may also help:
- Make sure to include submodules. Use
git clone --recurse-submodules
instead of downloading the releasedzip
source code. - You might have to install gfortran with the following:
sudo apt install gfortran
- Compiling Gentle from source might require more memory than available. If Gentle fails to compile and running the command
dmesg
returns "Out of memory", you can follow this StackOverflow answer and then reruninstall.sh
. - If you still run into errors, consult the Gentle issues page; this thread might be a good starting point.