Skip to content

Commit

Permalink
Results folder parameter improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
aivo0 committed Jan 31, 2023
1 parent d94d219 commit 88bfb64
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
1 change: 1 addition & 0 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@ profiles {
}

}

18 changes: 8 additions & 10 deletions transcribe.nf
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
#!/usr/bin/env nextflow

def env = System.getenv()
params.in = "/home/aivo_olevi/tmp/ao_1.wav"
params.out_dir = "results/"
params.out_dir = ""
params.do_speaker_id = true
params.do_punctuation = true
params.do_language_id = true
audio_file = file(params.in)

out_dir = ""
if (params.out_dir[-1] != "/") {
if (params.out_dir == "") {
out_dir = "/results/${audio_file.baseName}/"
}
else if (params.out_dir[-1] != "/") {
out_dir = params.out_dir + "/"
}
else out_dir = params.out_dir
Expand Down Expand Up @@ -156,10 +158,6 @@ process mfcc {
'''
}





process speaker_id {
memory '5GB'

Expand Down Expand Up @@ -218,7 +216,7 @@ process speaker_id {
// Do 1-pass decoding using chain online models
process one_pass_decoding {
memory '5GB'
cpus params.nthreads * 2
cpus params.nthreads

// Do 1-pass decoding using chain online models
input:
Expand Down Expand Up @@ -380,7 +378,7 @@ process punctuation {
process output {
memory '500MB'

publishDir "${out_dir}${audio_file.baseName}", mode: 'copy', overwrite: true
publishDir "${out_dir}", mode: 'copy', overwrite: true

input:
file with_compounds_ctm
Expand Down Expand Up @@ -408,7 +406,7 @@ process output {

process empty_output {

publishDir "${out_dir}/${audio_file.baseName}", mode: 'copy', overwrite: true
publishDir "${out_dir}", mode: 'copy', overwrite: true

input:
val a from datadir.ifEmpty{ 'EMPTY' }
Expand Down

0 comments on commit 88bfb64

Please sign in to comment.