misc

Module: misc

Currently unused functions.

Authors:

Copyright 2015, Sage Bionetworks (http://sagebase.org), Apache v2.0 License

mhealthx.misc.convert_audio_files(input_files, file_append, command='ffmpeg', input_args='-i', output_args='-ac 2')

Convert audio files to new format.

Calls python-audiotranscode (and faad2)

input_files : list of strings
full path to the input files
file_append : string
append to each file name to indicate output file format (e.g., ‘.wav’)
command : string
executable command without arguments
input_args : string
arguments preceding input file name in command
output_args : string
arguments preceding output file name in command
output_files : list of strings
each string is the full path to a renamed file
>>> from mhealthx.synapse_io import convert_audio_files
>>> input_files = ['/Users/arno/mhealthx_working/mHealthX/phonation_files/test.m4a']
>>> file_append = '.wav'
>>> command = '/home/arno/software/audio/ffmpeg/ffmpeg'
>>> input_args = '-i'
>>> output_args = '-ac 2'
>>> output_files = convert_audio_files(input_files, file_append, command, input_args, output_args)