Skip to content

Commit f6048ac

Browse files
committed
Update transcribe_example_result string
1 parent 831caf7 commit f6048ac

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

PythonRpcServer/transcribe.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
def 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
5858
if __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)

0 commit comments

Comments
 (0)