File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88
99def transcribe_audio (media_filepath ):
1010
11- if media_filepath == 'EXAMPLE_TRANSCRIBE_EXAMPLE_RESULT ' :
11+ if media_filepath == 'TEST-transcribe_example_result ' :
1212 result_json_file = 'transcribe_example_result.json'
1313 with open (result_json_file , 'r' ) as json_file :
1414 transcription_result = json .load (json_file )
@@ -57,7 +57,11 @@ def transcribe_audio(media_filepath):
5757# Example usage
5858if __name__ == '__main__' :
5959 # Example media file path inside the container (the actual path will depend on where the file is located)
60- audio_filepath = 'sharedVolume/recording0.wav' # Update this path as needed
60+ import sys
61+ if len (sys .argv ) > 1 :
62+ audio_filepath = sys .argv [1 ]
63+ else :
64+ audio_filepath = 'sharedVolume/recording0.wav' # Update this path as needed
6165
6266 try :
6367 transcription_result = transcribe_audio (audio_filepath )
You can’t perform that action at this time.
0 commit comments