Skip to content
forked from strob/drift3

A fork of Robert Ochshorn's Drift3, updated with a new interface and prosodic measures

License

Notifications You must be signed in to change notification settings

sarahayu/drift4

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Usage

Download a Mac DMG through the Releases tab on the right or navigate to the limited web version.

Development

  1. Clone this repository, including its submodules:
    git clone --recurse-submodules https://github.com/sarahayu/drift4.git
  2. Prepare the python environment
    • Drift uses python2 and python3. Make sure the command python refers to python2 and python3 refers to python3. At this time of development, the versions used are 2.7.18 for python2 and 3.8.10 for python3.
    • scikits.audiolab requires libsndfile, so install the latter first. On Mac, this can be done through Homebrew:
      brew install libsndfile
      On a Linux or WSL, use apt-get:
      sudo apt-get install libsndfile1
      sudo apt-get install libsndfile-dev
      You can also build it from source.
    • Install python dependencies using these commands:
      python -m pip install -r py2requirements.txt
      python3 -m pip install -r py3requirements.txt
  3. Install ffmpeg by running these commands:
    sudo apt update
    sudo apt install ffmpeg
    **When bundling, make sure to include the ffmpeg executable inside the main directory. You can download an executable from the ffmpeg official website.
  4. Run Gentle. Then, run Drift by running the following command from inside Drift's main directory:
    npm run dev
    This will run Drift's backend on port 9899 (you can change the port in the npm_drift.sh file). Navigate to React's endpoint (usually localhost:3000 unless you've changed this) to see the compiled frontend. Editing/saving any file in src/ will result in those changes being updated live.

Making a DMG

Bundling Drift to a Mac DMG is a finicky process. The following steps seem to work only for High Sierra on Mac:

  1. Install the PyInstaller package on both python2 and python3
  2. Make sure to rollback PyQt to version 5.12.3 to avoid segfault errors:
    python3 -m pip install --upgrade PyQt5==5.12.3
  3. Run make_dmg.sh. The DMG file will be found in the dist folder as drift4.dmg.

Hosting Drift4

  1. Run the following command to generate static files.
    npm run build.web
  2. Run the following command to start Drift4 in web hosting mode.
    ./serve -w
    You can run ./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 variables PRIVATE_KEY_FILENAME and CERT_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

Running Gentle on Windows/Linux

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 87
    wget -T 10 -t 1 http://openfst.cs.nyu.edu/twiki/pub/FST/FstDownload/openfst-$(OPENFST_VERSION).tar.gz || \
    to openfst.org so it looks like so
    wget -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 released zip 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 rerun install.sh.
  • If you still run into errors, consult the Gentle issues page; this thread might be a good starting point.

About

A fork of Robert Ochshorn's Drift3, updated with a new interface and prosodic measures

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 45.7%
  • Python 25.5%
  • HTML 15.5%
  • CSS 12.2%
  • Shell 1.1%