livekit-plugins-bithuman 1.0.22__py3-none-any.whl → 1.0.23__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -39,6 +39,7 @@ class AvatarSession:
39
39
  api_url: NotGivenOr[str] = NOT_GIVEN,
40
40
  api_secret: NotGivenOr[str] = NOT_GIVEN,
41
41
  api_token: NotGivenOr[str] = NOT_GIVEN,
42
+ runtime: NotGivenOr[AsyncBithuman | None] = NOT_GIVEN,
42
43
  ) -> None:
43
44
  self._api_url = api_url or os.getenv("BITHUMAN_API_URL")
44
45
  self._api_secret = api_secret or os.getenv("BITHUMAN_API_SECRET")
@@ -51,20 +52,25 @@ class AvatarSession:
51
52
  raise BitHumanException("BITHUMAN_MODEL_PATH must be set")
52
53
 
53
54
  self._avatar_runner: AvatarRunner | None = None
55
+ self._runtime = runtime
54
56
 
55
57
  async def start(self, agent_session: AgentSession, room: rtc.Room) -> None:
56
- kwargs = {
57
- "model_path": self._model_path,
58
- }
59
- if self._api_secret:
60
- kwargs["api_secret"] = self._api_secret
61
- if self._api_token:
62
- kwargs["token"] = self._api_token
63
- if self._api_url:
64
- kwargs["api_url"] = self._api_url
65
-
66
- runtime = await AsyncBithuman.create(**kwargs)
67
- await runtime.start()
58
+ if self._runtime:
59
+ runtime = self._runtime
60
+ else:
61
+ kwargs = {
62
+ "model_path": self._model_path,
63
+ }
64
+ if self._api_secret:
65
+ kwargs["api_secret"] = self._api_secret
66
+ if self._api_token:
67
+ kwargs["token"] = self._api_token
68
+ if self._api_url:
69
+ kwargs["api_url"] = self._api_url
70
+
71
+ runtime = await AsyncBithuman.create(**kwargs)
72
+ await runtime.start()
73
+
68
74
  video_generator = BithumanGenerator(runtime)
69
75
 
70
76
  output_width, output_height = video_generator.video_resolution
@@ -12,4 +12,4 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
- __version__ = "1.0.22"
15
+ __version__ = "1.0.23"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: livekit-plugins-bithuman
3
- Version: 1.0.22
3
+ Version: 1.0.23
4
4
  Summary: Agent Framework plugin for services from BitHuman Avatar Rendering
5
5
  Project-URL: Documentation, https://docs.livekit.io
6
6
  Project-URL: Website, https://livekit.io/
@@ -17,8 +17,8 @@ Classifier: Topic :: Multimedia :: Sound/Audio
17
17
  Classifier: Topic :: Multimedia :: Video
18
18
  Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
19
19
  Requires-Python: >=3.9.0
20
- Requires-Dist: bithuman>=0.5.5
21
- Requires-Dist: livekit-agents>=1.0.22
20
+ Requires-Dist: bithuman>=0.5.10
21
+ Requires-Dist: livekit-agents>=1.0.23
22
22
  Description-Content-Type: text/markdown
23
23
 
24
24
  # BitHuman plugin for LiveKit Agents
@@ -0,0 +1,7 @@
1
+ livekit/plugins/bithuman/__init__.py,sha256=yEz6LYNiykKKobr6e20vHipDN6Xzi61oRtnUoMZSDDw,1280
2
+ livekit/plugins/bithuman/avatar.py,sha256=IlFtxJIXEN4SfEE6x7h78U2oCixHpndra7xIIdqT8Hw,5305
3
+ livekit/plugins/bithuman/log.py,sha256=1lFUaugLdHDmBqFuNz2Z70iMRyuOtQ9KkL5h3ney0So,71
4
+ livekit/plugins/bithuman/version.py,sha256=O5JviWLJVBpC-DAakcGUwagiTFI5ZD7HTTTp2woaBmo,601
5
+ livekit_plugins_bithuman-1.0.23.dist-info/METADATA,sha256=V-abLhK_RT_xmF7qVwmEDAqq7qlj7yS0jVIq1yytR30,1180
6
+ livekit_plugins_bithuman-1.0.23.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
7
+ livekit_plugins_bithuman-1.0.23.dist-info/RECORD,,
@@ -1,7 +0,0 @@
1
- livekit/plugins/bithuman/__init__.py,sha256=yEz6LYNiykKKobr6e20vHipDN6Xzi61oRtnUoMZSDDw,1280
2
- livekit/plugins/bithuman/avatar.py,sha256=XdvsIhKofmtDTJKe6Je2Yx67fzcbd1ikM2MTYvaztxs,5089
3
- livekit/plugins/bithuman/log.py,sha256=1lFUaugLdHDmBqFuNz2Z70iMRyuOtQ9KkL5h3ney0So,71
4
- livekit/plugins/bithuman/version.py,sha256=fFh0krgNqxKvDz0uOvDLACfvE24LL65uGmzGKWgu_wM,601
5
- livekit_plugins_bithuman-1.0.22.dist-info/METADATA,sha256=psu4A7HZ3aDvV0ZPT3qvpgKT6CFHjntTaCoJ4zJ5jgA,1179
6
- livekit_plugins_bithuman-1.0.22.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
7
- livekit_plugins_bithuman-1.0.22.dist-info/RECORD,,