a method to transcribe the text from an audio file
        
        EXAMPLE: https://github.com/dannguyen/watson-word-watcher
        
        :param file_path: string with path to audio file on localhost
        :param clip_length: [optional] integer with seconds to divide clips into
        :param compress: [optional] boolean to convert file to audio/ogg
        :return: dictionary with transcribed text segments in 'segments' key

def transcribe_file(self, file_path, clip_length=10, compress=True):

        '''
            a method to transcribe the text from an audio file
        
        EXAMPLE: https://github.com/dannguyen/watson-word-watcher
        
        :param file_path: string with path to audio file on localhost
        :param clip_length: [optional] integer with seconds to divide clips into
        :param compress: [optional] boolean to convert file to audio/ogg
        :return: dictionary with transcribed text segments in 'segments' key
        '''

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

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

    # run conversion
        import os
        if compress:
            file_name, file_extension = os.path.splitext(file_path)
            if file_extension != '.ogg':
                file_path = self.convert_audio(file_path, 'audio/ogg', True)

    # construct empty file details
        file_details = {
            'name': '',
            'mimetype': '',
            'extension': ''
        }

    # retrieve file name
        file_arg = '%s(file_path=%s)' % (title, str(file_path))
        split_file = os.path.split(file_path)
        file_details['name'] = split_file[0]
        if len(split_file) > 1:
            file_details['name'] = split_file[1]
        if not file_details['name']:
            raise ValueError('%s must have a file name.' % file_arg)

    # validate file extension
        ext_kwargs = {
            'file_name': file_details['name'],
            'extension_map': self.fields.schema['audio_extensions'],
            'method_title': title,
            'argument_title': file_path
        }
        regex_details = self._validate_extension(**ext_kwargs)
        file_details.update(**regex_details)

    # retrieve byte data
        if not os.path.exists(file_path):
            raise ValueError('%s is not a valid file path.' % file_arg)

    # validate file mimetype
        if self.magic:
            magic_details = self.magic.analyze(file_path)
            mimetype_text = file_details['mimetype'][6:]
            if mimetype_text not in magic_details['mimetype']:
                raise ValueError('%s byte data mimetype %s does not match %s file extension.' % (file_arg, magic_details['mimetype'], file_details['extension']))

    # import dependencies
        from math import ceil
        from moviepy.editor import AudioFileClip

    # open audio file
        audio = AudioFileClip(file_path)
        audio_duration = audio.duration

    # construct list of files to transcribe
        file_list = []
        if audio_duration < clip_length:
            file_list.append(file_path)
        else:
    # create temporary audio files
            clip_folder = self._create_folder()
            count = 0
            t_start = 0
            while t_start < audio_duration:
                t_end = t_start + clip_length
                if t_end > audio_duration:
                    t_end = ceil(audio_duration)
                    segment = audio.subclip(t_start)
                else:
                    segment = audio.subclip(t_start, t_end)
                clip_name = 'audio%s.%s' % (count, file_details['extension'])
                clip_path = os.path.join(clip_folder, clip_name)
                segment.write_audiofile(clip_path, verbose=False)
                file_list.append(clip_path)
                count += 1
                t_start = t_end

    # run file transcription method
        transcription_result = self._transcribe_files(file_list, file_details['mimetype'])

    # remove temp files
        if len(file_list) > 1:
            from labpack.records.settings import remove_settings
            for file in file_list:
                remove_settings(file, remove_dir=True)

        return transcription_result