Skip to content

Commit

Permalink
Merge pull request aliutkus#5 from mpariente/optimize_imports
Browse files Browse the repository at this point in the history
Optimize imports to lighten dependencies
  • Loading branch information
aliutkus authored Dec 4, 2019
2 parents 9b8a8c4 + 1b28678 commit 9b183a6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@
'numpy',
'scipy',
'tqdm',
'librosa',
'resampy',
'pystoi',
'museval',
'gammatone @ git+https://github.com/detly/gammatone',
'pypesq @ git+https://github.com/vBaiCai/python-pesq',
'srmrpy @ git+https://github.com/jfsantos/SRMRpy'
'srmrpy @ git+https://github.com/jfsantos/SRMRpy',
],
extras_require={
'cpu': ['tensorflow==2.0.0'],
'gpu': ['tensorflow-gpu==2.0.0'],
'cpu': ['tensorflow==2.0.0', 'librosa'],
'gpu': ['tensorflow-gpu==2.0.0', 'librosa'],
},
include_package_data=True
)
4 changes: 1 addition & 3 deletions speechmetrics/absolute/mosnet/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import tensorflow as tf


def load(window, hop=None):
import tensorflow as tf
from .model import MOSNet
tf.debugging.set_log_device_placement(False)
# set memory growth
Expand Down
2 changes: 1 addition & 1 deletion speechmetrics/absolute/srmr/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from .srmr import srmr
from ... import Metric


Expand All @@ -11,6 +10,7 @@ def __init__(self, window, hop=None):
self.absolute = True

def test_window(self, audios, rate):
from .srmr import srmr
return {'srmr': srmr(audios[0], self.fixed_rate, n_cochlear_filters=23,
low_freq=125, min_cf=4,
max_cf=128, fast=True, norm=False)[0]}
Expand Down

0 comments on commit 9b183a6

Please sign in to comment.