File tree Expand file tree Collapse file tree 5 files changed +18
-3
lines changed
llama_cloud_services/parse Expand file tree Collapse file tree 5 files changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -112,7 +112,7 @@ class ChartItem(BaseModel):
112
112
class Page (BaseModel ):
113
113
"""A page of the document."""
114
114
115
- page : int = Field (description = "The page number." )
115
+ page : int = Field (default = 0 , description = "The page number." )
116
116
text : Optional [str ] = Field (default = None , description = "The text of the page." )
117
117
md : Optional [str ] = Field (default = None , description = "The markdown of the page." )
118
118
images : List [ImageItem ] = Field (
@@ -153,6 +153,12 @@ class Page(BaseModel):
153
153
noTextContent : bool = Field (
154
154
default = False , description = "Whether the page has no text content."
155
155
)
156
+ isAudioTranscript : bool = Field (
157
+ default = False , description = "Whether the page is an audio transcript."
158
+ )
159
+ durationInSeconds : Optional [float ] = Field (
160
+ default = None , description = "The duration of the audio transcript in seconds."
161
+ )
156
162
157
163
158
164
class JobResult (BaseModel ):
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ dev = [
11
11
12
12
[project ]
13
13
name = " llama-parse"
14
- version = " 0.6.56 "
14
+ version = " 0.6.57 "
15
15
description = " Parse files into RAG-Optimized formats."
16
16
authors = [{
name =
" Logan Markewich" ,
email =
" [email protected] " }]
17
17
requires-python = " >=3.9,<4.0"
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ dev = [
18
18
19
19
[project ]
20
20
name = " llama-cloud-services"
21
- version = " 0.6.56 "
21
+ version = " 0.6.57 "
22
22
description = " Tailored SDK clients for LlamaCloud services."
23
23
authors = [{
name =
" Logan Markewich" ,
email =
" [email protected] " }]
24
24
requires-python = " >=3.9,<4.0"
Original file line number Diff line number Diff line change @@ -202,3 +202,12 @@ async def test_get_result(markdown_parser: LlamaParse) -> None:
202
202
result = await markdown_parser .aget_result (expected .job_id )
203
203
assert result .job_id == expected .job_id
204
204
assert len (result .pages ) == len (expected .pages )
205
+
206
+
207
+ @pytest .mark .asyncio
208
+ async def test_parse_audio () -> None :
209
+ parser = LlamaParse ()
210
+ filepath = "tests/test_files/hello_world.m4a"
211
+
212
+ result = await parser .aparse (filepath )
213
+ assert result .job_id is not None
You can’t perform that action at this time.
0 commit comments