Skip to content

fix: add support for remote audio files#933

Merged
samsja merged 2 commits into
mainfrom
fix-audio-remote-file
Dec 13, 2022
Merged

fix: add support for remote audio files#933
samsja merged 2 commits into
mainfrom
fix-audio-remote-file

Conversation

@anna-charlotte

@anna-charlotte anna-charlotte commented Dec 13, 2022

Copy link
Copy Markdown
Contributor

Signed-off-by: anna-charlotte charlotte.gerhaher@jina.ai

Goals:
As of right now, only local audio files can be handled as part of a Document, we want to extend support for remote audio files.

The following code snippet currently fails with a FileNotFoundError:

from docarray import dataclass, Document, DocumentArray
from docarray.typing import Image, Text, Audio, Video, Blob


@dataclass
class MMDoc:
	audio: Audio = None


aud_file = MMDoc(audio='https://p.scdn.co/mp3-preview/4d26180e6961fd46866cd9106936ea55dfcbaa75?cid=774b29d4f13844c495f206cafdad9c86')
doc = Document(aud_file)

Goals:

  • add support for remoteaudio files
  • add remote audio file to test
  • check and update documentation, if required. See guide

Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
@codecov-commenter

codecov-commenter commented Dec 13, 2022

Copy link
Copy Markdown

Codecov Report

Base: 88.47% // Head: 88.53% // Increases project coverage by +0.06% 🎉

Coverage data is based on head (f47f800) compared to base (6ec0cf5).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #933      +/-   ##
==========================================
+ Coverage   88.47%   88.53%   +0.06%     
==========================================
  Files         155      155              
  Lines        8009     8018       +9     
==========================================
+ Hits         7086     7099      +13     
+ Misses        923      919       -4     
Flag Coverage Δ
docarray 88.53% <100.00%> (+0.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
docarray/document/mixins/audio.py 100.00% <100.00%> (+13.33%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@anna-charlotte anna-charlotte marked this pull request as ready for review December 13, 2022 15:25
@samsja samsja merged commit a5a6778 into main Dec 13, 2022
@samsja samsja deleted the fix-audio-remote-file branch December 13, 2022 16:19
@anna-charlotte anna-charlotte linked an issue Dec 14, 2022 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: uri when using Audio type

3 participants