Update kaldi (#8682)

* Update kaldi

always use the --fst-version otherwise it does the wrong thing with
selecting the fst version.

also enable speex by default

* Give version a more meaningful name

* Update older version with a date string instead
This commit is contained in:
Jimmy Tang 2018-07-11 18:38:06 +01:00 committed by Adam J. Stewart
parent a985dc859c
commit 5780eadf64

View File

@ -38,7 +38,9 @@ class Kaldi(Package): # Does not use Autotools
url = "https://github.com/kaldi-asr/kaldi/archive/master.zip"
version('master', git='https://github.com/kaldi-asr/kaldi.git')
version('c024e8', git='https://github.com/kaldi-asr/kaldi.git',
version('2018-07-11', git='https://github.com/kaldi-asr/kaldi.git',
commit='6f2140b032b0108bc313eefdca65151289642773')
version('2015-10-07', git='https://github.com/kaldi-asr/kaldi.git',
commit='c024e8aa0a727bf76c91a318f76a1f8b0b59249e')
variant('shared', default=True,
@ -53,18 +55,16 @@ class Kaldi(Package): # Does not use Autotools
depends_on('sph2pipe', type='run')
depends_on('sctk', type='run')
depends_on('speex', type='run')
depends_on('openfst@1.4.1-patch', when='@c024e8')
depends_on('openfst@1.4.1-patch', when='@2015-10-07')
depends_on('openfst@1.6.0:', when='@2018-07-11')
depends_on('openfst')
patch('openfst-1.4.1.patch', when='@c024e8')
patch('openfst-1.4.1.patch', when='@2015-10-07')
def install(self, spec, prefix):
configure_args = ['--fst-root=' + spec['openfst'].prefix]
if spec.satisfies('c024e8'):
configure_args.append('--fst-version=' + str(spec['openfst'].version))
configure_args.append('--speex-root=' + spec['speex'].prefix)
configure_args.append('--fst-version=' +
str(spec['openfst'].version))
if '~shared' in spec:
configure_args.append('--static')