Skip to content

Commit df5869b

Browse files
dmccrystals0h3yl
authored andcommitted
fix: export audio intelligence types
GitOrigin-RevId: 2b503fcca2631976f86807808f56befffb8a220d
1 parent 9e5ae41 commit df5869b

File tree

6 files changed

+85
-6
lines changed

6 files changed

+85
-6
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ questions = [
222222

223223
results = transcript.lemur.question(questions)
224224

225-
for result in results:
225+
for result in result:
226226
print(f"Question: {result.question}")
227227
print(f"Answer: {result.answer}")
228228
```

assemblyai/__init__.py

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,18 @@
33
from .transcriber import Transcriber, Transcript, TranscriptGroup
44
from .types import (
55
AssemblyAIError,
6+
AutohighlightResponse,
7+
AutohighlightResult,
8+
Chapter,
9+
ContentSafetyLabel,
10+
ContentSafetyLabelResult,
11+
ContentSafetyResponse,
12+
ContentSafetySeverityScore,
13+
Entity,
14+
EntityType,
15+
IABLabelResult,
16+
IABResponse,
17+
IABResult,
618
LanguageCode,
719
LemurError,
820
LemurModel,
@@ -13,7 +25,10 @@
1325
PIISubstitutionPolicy,
1426
RawTranscriptionConfig,
1527
Sentence,
28+
Sentiment,
29+
SentimentType,
1630
Settings,
31+
StatusResult,
1732
SummarizationModel,
1833
SummarizationType,
1934
Timestamp,
@@ -34,15 +49,32 @@
3449
__all__ = [
3550
# types
3651
"AssemblyAIError",
52+
"AutohighlightResponse",
53+
"AutohighlightResult",
54+
"Chapter",
3755
"Client",
56+
"ContentSafetyLabel",
57+
"ContentSafetyLabelResult",
58+
"ContentSafetyResponse",
59+
"ContentSafetySeverityScore",
60+
"Entity",
61+
"EntityType",
62+
"IABLabelResult",
63+
"IABResponse",
64+
"IABResult",
3865
"LanguageCode",
3966
"Lemur",
4067
"LemurError",
4168
"LemurModel",
4269
"LemurQuestion",
4370
"LemurQuestionResult",
71+
"PIIRedactionPolicy",
72+
"PIISubstitutionPolicy",
4473
"Sentence",
74+
"Sentiment",
75+
"SentimentType",
4576
"Settings",
77+
"StatusResult",
4678
"SummarizationModel",
4779
"SummarizationType",
4880
"Timestamp",

assemblyai/transcriber.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def wait_for_completion(self) -> Self:
7777
):
7878
break
7979

80-
time.sleep(self._client.settings.polling_interval)
80+
time.sleep(3)
8181

8282
return self
8383

assemblyai/types.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,6 @@ class Settings(BaseSettings):
3737
base_url: str = "https://api.assemblyai.com/v2"
3838
"The base URL for the AssemblyAI API"
3939

40-
polling_interval: float = 1.0
41-
"The default polling interval for long-running requests (e.g. polling the `Transcript`'s status)"
42-
4340
class Config:
4441
env_prefix = "assemblyai_"
4542

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
setup(
99
name="assemblyai",
10-
version="0.8.1",
10+
version="0.7.1",
1111
description="AssemblyAI Python SDK",
1212
author="AssemblyAI",
1313
author_email="[email protected]",

tests/unit/BUILD.bazel

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
load("@rules_python//python:defs.bzl", "py_library", "py_test")
2+
load("@aspect_rules_py//py:defs.bzl", "py_pytest_main")
3+
4+
py_pytest_main(name = "__test__")
5+
6+
py_library(
7+
name = "unit",
8+
testonly = True,
9+
srcs = [
10+
"__init__.py", # keep
11+
"conftest.py",
12+
"factories.py", # keep
13+
],
14+
imports = ["../../../../../.."],
15+
visibility = ["//:__subpackages__"],
16+
deps = [
17+
"@assemblyai_deps_factory_boy//:pkg", # keep
18+
"@assemblyai_deps_pytest//:pkg",
19+
],
20+
)
21+
22+
py_test(
23+
name = "unit_test",
24+
srcs = [
25+
"test_auto_chapters.py",
26+
"test_client.py",
27+
"test_config.py",
28+
"test_content_safety.py",
29+
"test_domains.py",
30+
"test_entity_detection.py",
31+
"test_lemur.py",
32+
"test_sentiment_analysis.py",
33+
"test_summarization.py",
34+
"test_transcriber.py",
35+
"test_transcript.py",
36+
":__test__",
37+
],
38+
imports = ["../../../../../.."],
39+
main = ":__test__.py",
40+
deps = [
41+
":__test__",
42+
":unit",
43+
"//assemblyai/developer_tools/python/sdk:assemblyai_sdk",
44+
"@assemblyai_deps_factory_boy//:pkg",
45+
"@assemblyai_deps_faker//:pkg",
46+
"@assemblyai_deps_httpx//:pkg",
47+
"@assemblyai_deps_pytest//:pkg",
48+
"@assemblyai_deps_pytest_httpx//:pkg",
49+
],
50+
)

0 commit comments

Comments
 (0)