a method to convert an audio file into a different codec
            
        :param file_path: string with path to file on localhost 
        :param new_mimetype: string with mimetype for new file
        :param overwrite: [optional] boolean to overwrite existing file
        :return: string with path to new file on localhost
        
            SEE: https://github.com/Ch00k/ffmpy

def convert_audio(self, file_path, new_mimetype, overwrite=False):

        '''
            a method to convert an audio file into a different codec
            
        :param file_path: string with path to file on localhost 
        :param new_mimetype: string with mimetype for new file
        :param overwrite: [optional] boolean to overwrite existing file
        :return: string with path to new file on localhost
        
            SEE: https://github.com/Ch00k/ffmpy
        '''

        title = '%s.convert_audio' % self.__class__.__name__

    # validate inputs
        input_fields = {
            'file_path': file_path,
            'new_mimetype': new_mimetype
        }
        for key, value in input_fields.items():
            object_title = '%s(%s=%s)' % (title, key, str(value))
            self.fields.validate(value, '.%s' % key, object_title)

    # retrieve file extension
        new_extension = ''
        mimetype_list = []
        mime_arg = '%s(new_mimetype=%s)' % (title, new_mimetype)
        for key, value in self.fields.schema['audio_extensions'].items():
            mimetype_list.append(value['mimetype'])
            if value['mimetype'] == new_mimetype:
                new_extension = value['extension']
                break
        if not new_extension:
            raise ValueError('%s must be one of %s mimetypes' % (mime_arg, mimetype_list))

    # import dependencies
        from os import path
        import ffmpy

    # validate existence of file
        file_arg = '%s(file_path=%s)' % (title, file_path)
        if not path.exists(file_path):
            raise ValueError('%s is not a valid path', file_arg)

    # construct new file
        file_name, file_extension = path.splitext(file_path)
        output_path = file_name + new_extension

    # construct inputs
        ffmpeg_kwargs = {
            'inputs': {file_path: None},
            'outputs': {output_path: None},
            'global_options': [ '-v error']
        }
        if overwrite:
            ffmpeg_kwargs['global_options'].append('-y')
        ffmpeg_client = ffmpy.FFmpeg(**ffmpeg_kwargs)

    # run conversion
        ffmpeg_client.run()

        return output_path