File tree Expand file tree Collapse file tree
recipes/timers-and-such/direct Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -66,9 +66,7 @@ epoch_counter: !new:speechbrain.utils.epoch_loop.EpochCounter
6666 limit : !ref <number_of_epochs>
6767
6868# Models
69- asr_model : !apply:speechbrain.pretrained.EncoderDecoderASR.from_hparams
70- source : speechbrain/asr-crdnn-rnnlm-librispeech
71- run_opts : {"device":"cuda:0"}
69+ asr_model_source : speechbrain/asr-crdnn-rnnlm-librispeech
7270
7371slu_enc : !new:speechbrain.nnet.containers.Sequential
7472 input_shape : [null, null, !ref <ASR_encoder_dim>]
Original file line number Diff line number Diff line change @@ -344,6 +344,14 @@ def text_pipeline(semantics):
344344 run_on_main (hparams ["pretrainer" ].collect_files )
345345 hparams ["pretrainer" ].load_collected (device = run_opts ["device" ])
346346
347+ # Download pretrained ASR model
348+ from speechbrain .pretrained import EncoderDecoderASR
349+
350+ hparams ["asr_model" ] = EncoderDecoderASR .from_hparams (
351+ source = hparams ["asr_model_source" ],
352+ run_opts = {"device" : run_opts ["device" ]},
353+ )
354+
347355 # Brain class initialization
348356 slu_brain = SLU (
349357 modules = hparams ["modules" ],
You can’t perform that action at this time.
0 commit comments