Skip to content

Commit

Permalink
moved pmdl model wrapper to pmdl folder
Browse files Browse the repository at this point in the history
  • Loading branch information
chenguoguo committed Dec 31, 2020
1 parent d2a65f4 commit e837c7f
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 10 deletions.
2 changes: 1 addition & 1 deletion examples/Python/generate_pmdl.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import uuid
from scipy.io import wavfile
from pmdl import snowboy_pmdl_config
from lib.snowboy_model import SnowboyPersonalEnroll, SnowboyTemplateCut
from pmdl.snowboy_pmdl import SnowboyPersonalEnroll, SnowboyTemplateCut

def check_enroll_output(enroll_ans):
if enroll_ans == -1:
Expand Down
1 change: 0 additions & 1 deletion examples/Python/lib

This file was deleted.

1 change: 1 addition & 0 deletions examples/Python/pmdl/lib
12 changes: 12 additions & 0 deletions examples/Python/pmdl/snowboy_pmdl.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import os
import sys
import platform

if platform.system() == "Darwin":
sys.path.insert(0, os.path.join(os.path.dirname(os.path.abspath(__file__)), "lib/osx/pmdl"))
from snowboy import *
elif platform.linux_distribution()[0] == "Ubuntu" and platform.linux_distribution()[1] == "16.04":
sys.path.insert(0, os.path.join(os.path.dirname(os.path.abspath(__file__)), "lib/ubuntu64/pmdl"))
from snowboy import *
else:
raise ImportError("pmdl generator only runs on OSX or Ubuntu 16.04.")
Empty file removed lib/__init__.py
Empty file.
Empty file removed lib/osx/__init__.py
Empty file.
8 changes: 0 additions & 8 deletions lib/snowboy_model.py

This file was deleted.

Empty file removed lib/ubuntu64/__init__.py
Empty file.

0 comments on commit e837c7f

Please sign in to comment.