Skip to content

Commit c799819

Browse files
committed
update examples;
1 parent 1989f77 commit c799819

File tree

2 files changed

+5
-16
lines changed

2 files changed

+5
-16
lines changed

examples/speech_to_text_sync.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@
44
# the API token but usage will be limited
55
API_KEY = "YOUR_API_KEY"
66

7-
service_provider = SpeechToText.ServiceProvider.WHISPER
8-
audio_filepath = "test.mp3"
7+
service_provider = SpeechToText.ServiceProvider.AWS
8+
9+
# we support many formats, including mp3, mp4, wav, etc.
10+
file_path = "test.mp4"
911

1012
# Find all the service providers that we support by running the choices() method
1113
print(f"Available providers: {SpeechToText.ServiceProvider.choices()}")
@@ -15,7 +17,7 @@
1517
model = SpeechToText(api_key=API_KEY)
1618

1719
# Upload audio
18-
uploaded_file = model.upload_audio(audio_filepath)
20+
uploaded_file = model.upload_audio(file_path)
1921
print(f"file uploaded: {uploaded_file}")
2022

2123
response = model.execute(

examples/youtube-video-transcription/transcribe_multiple_videos.py

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)