Skip to content

Commit d839072

Browse files
fix comment
1 parent 24ea82f commit d839072

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

dspy/adapters/types/audio.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,6 @@
1818

1919

2020
class Audio(BaseType):
21-
"""
22-
Encode audio to dict with 'data' and 'format'.
23-
24-
Accepts: local file path, URL, data URI, dict, Audio instance, numpy array, or bytes (with known format).
25-
"""
2621
data: str
2722
format: str
2823

@@ -117,6 +112,11 @@ def __repr__(self) -> str:
117112
return f"Audio(data=<AUDIO_BASE_64_ENCODED({length})>, format='{self.format}')"
118113

119114
def encode_audio(audio: Union[str, bytes, dict, "Audio", Any], sampling_rate: int = 16000, format: str = "wav") -> dict:
115+
"""
116+
Encode audio to a dict with 'data' and 'format'.
117+
118+
Accepts: local file path, URL, data URI, dict, Audio instance, numpy array, or bytes (with known format).
119+
"""
120120
if isinstance(audio, dict) and "data" in audio and "format" in audio:
121121
return audio
122122
elif isinstance(audio, Audio):

0 commit comments

Comments
 (0)