Skip to content

Commit

Permalink
fixed typo and added amr support
Browse files Browse the repository at this point in the history
  • Loading branch information
SanderGi committed Oct 23, 2023
1 parent 2a40f15 commit 06ed3ea
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion daras_ai_v2/asr.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ def run_asr(
is_youtube_url = "youtube" in audio_url or "youtu.be" in audio_url
if is_youtube_url:
audio_url, size = download_youtube_to_wav(audio_url)
elif is_gdrive_url:
elif is_gdrive_url(furl(audio_url)):
meta: dict[str, str] = gdrive_metadata(url_to_gdrive_file_id(furl(audio_url)))
anybytes, ext = gdrive_download(
furl(audio_url), meta.get("mimeType", "audio/wav")
Expand Down
12 changes: 11 additions & 1 deletion recipes/asr.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,17 @@ def related_workflows(self) -> list:
def render_form_v2(self):
document_uploader(
"##### Audio Files",
accept=(".wav", ".ogg", ".mp3", ".aac", ".opus", ".oga", ".mp4", ".webm"),
accept=(
".wav",
".ogg",
".mp3",
".aac",
".opus",
".oga",
".mp4",
".webm",
".amr",
),
)
col1, col2 = st.columns(2, responsive=False)
with col1:
Expand Down

0 comments on commit 06ed3ea

Please sign in to comment.