Skip to main content

bithuman

Run a bitHuman avatar on your own machine, in your own process.

pip install bithuman
DEMO=$(python -c 'import bithuman,os; print(os.path.join(os.path.dirname(bithuman.__file__), "assets", "demo_sample.wav"))')
python -m bithuman render sofia-ramirez "$DEMO"     # -> sofia-ramirez.mp4

Two arguments — an avatar and some audio — and a video you can play (with your API secret in BITHUMAN_API_SECRET; see the key). The avatar is a showcase name (python -m bithuman list), your agent's ten-character code (python -m bithuman list --mine; fetched once, which is free), or a file you already have. The audio above is 15 s of speech that ships with this package, so the first run needs nothing you do not already have. It is the same command line as the bithuman CLI: render <avatar> <audio> [-o out.mp4] [--limit N] [--json], list [--mine], and one sign-in (bithuman login) serves both.

In your own program it is the same two things. The command above fetched the avatar to ~/.cache/bithuman/showcase/:

import bithuman, os

speech = os.path.join(os.path.dirname(bithuman.__file__),
                      "assets", "demo_sample.wav")   # 15 s, ships in the wheel
avatar_file = os.path.expanduser("~/.cache/bithuman/showcase/sofia-ramirez.imx")

avatar = bithuman.open(avatar_file)
frames = 0
for image in avatar.render(speech):   # each image: (height, width, 3) uint8, RGB
    frames += 1
print(frames, "frames")

That is the whole thing: open an avatar, then render audio through it.

both families, the same two lines

An essence-2 avatar and an expression-2 avatar are opened and rendered by the code above, unchanged. Nothing you write says which one you have, and you do not have to know.

expression-2 needs one extra package on the machine:

pip install "bithuman[expression-2]"

Open an expression-2 avatar without it and the refusal says so, and says that line. Nothing else differs.

offline rendering, without 3 GB of CUDA you will never run

bithuman[offline] adds torch and onnxruntime. From PyPI's default index that resolves to the CUDA build of torch, and the extra costs 3.18 GB of wheels — 2.45 GB of it nvidia-*, cuda-* and triton that the offline route never executes. Install torch first from PyTorch's own selector — choose the Compute Platform without CUDA and run the one line it prints — and the same extra then resolves to 0.18 GB, with no CUDA wheel in the set at all (the extra asks for torch>=2.1, and any build satisfies it):

pip install "bithuman[offline]"      # after torch, from the line the selector printed

(Measured 2026-09-19 on Linux x86_64 with pip install --dry-run --report: 49 wheels / 3.18 GB from the default index alone, 30 wheels / 0.18 GB with PyTorch's CUDA-free index beside it. Use the default index only if you actually want CUDA.)


The surface — eight names

you write it means
bithuman.open(source) open the avatar file on this machine; returns an Avatar
avatar.render(audio) yield the frames for that audio
Avatar what open gives you
AvatarError catch this for any refusal
InvalidAvatar we cannot find it, or it is not a usable avatar
NotSupported this avatar cannot run here
NotAuthorised the key is missing, invalid, or out of credit
Failed we could not do it — the message says which

There is nothing else, and nothing to configure. This package runs the avatar on this machine, so there is no choice left about where or how it runs.

audio in

audio is 16 kHz mono, and it is either a buffer or a stream — the same call:

avatar.render(speech)                      # an audio file path
avatar.render(samples)                     # int16 or float32 in [-1, 1]
avatar.render(raw_bytes)                   # 16 kHz mono, signed 16-bit
avatar.render(microphone())                # any iterable of the above

frames out

Each frame is a (height, width, 3) uint8 array in RGB order, in order, at the avatar's own frame rate — which is a property of the avatar, not something to choose. (This line read "one per 40 ms of speech" until 2026-09-06, which was true of every avatar the package could open at the time and is not true of an expression-2 one.)

import cv2
for image in avatar.render(speech):
    cv2.imshow("avatar", image[:, :, ::-1])   # OpenCV wants BGR
    cv2.waitKey(1)

stopping early

Someone interrupting the avatar is "stop consuming and close the iterator":

images = avatar.render(speech)
for n, image in enumerate(images):
    if n == 50:                       # e.g. the user started talking
        images.close()
        break

releasing it

with frees everything at the end of the block; without it, the avatar is freed when it is garbage collected.

with bithuman.open(avatar_file) as avatar:
    for image in avatar.render(speech):
        frames += 1

The four refusals

Each one leads to a different fix, and none of them asks you to know anything about how we are built.

try:
    avatar = bithuman.open(avatar_file)
    for image in avatar.render(speech):
        pass
except bithuman.InvalidAvatar:
    ...   # fix the path or the code, or fetch the avatar again
except bithuman.NotSupported:
    ...   # use the cloud package, or another device
except bithuman.NotAuthorised:
    ...   # fix the credential
except bithuman.Failed:
    ...   # retry, then report it

Every one of them is an AvatarError, so except bithuman.AvatarError catches all four.


The key

Rendering is metered, and the key belongs in the environment rather than in your code:

export BITHUMAN_API_SECRET=...

Without one, render refuses with NotAuthorised before it hands you a frame. Get a key at https://www.bithuman.ai/developer/api-keys.

python -m bithuman also reads a .env file beside you, which is where a key usually already is. What is already in the environment always wins.


Where it runs

Python 3.10 – 3.14
macOS Apple silicon
Linux x86-64 and arm64
Windows, Intel Macs not built — pip install refuses loudly rather than quietly giving you an old release

ffmpeg is used to read an audio file when it is on your PATH; when it is not, the decoder this package already installs reads the same file in this process, so it is not something to install first.

Two environment variables:

BITHUMAN_API_SECRET your API secret, from https://www.bithuman.ai/developer/api-keys — rendering is metered, so it is required unless you pass api_secret=. BITHUMAN_API_KEY is read as a deprecated alias
BITHUMAN_CACHE_DIR where a prepared avatar is kept (default ~/.cache/bithuman)

This package never puts a command on your PATH

pip install bithuman installs a library and nothing else — and python -m bithuman is why that costs you nothing: a module needs no script, cannot collide with one, and is there the moment pip finishes. The full bithuman command-line tool (a live avatar, a conversation) is a different artifact and is not installed with pip:

curl -fsSL https://raw.githubusercontent.com/bithuman-product/homebrew-bithuman/main/install.sh | sh
brew install bithuman-product/bithuman/bithuman-cli      # macOS, equivalently

That is an invariant, not an accident: a pip-installed command named bithuman would overwrite the one Homebrew put at the same path, and every check would still report success. tests/test_no_console_script.py fails if a release ever grows one — on every push and pull request (the source side, with three firing controls) and again inside each publish job, run directly against the wheels being uploaded. A directory that is declared and holds no bithuman wheel exits 2: a publish that cannot be graded is refused, not passed.


Using it from a LiveKit agent

The LiveKit integration is a separate package, livekit-plugins-bithuman, published by LiveKit out of github.com/livekit/agents. Install pillow beside it:

pip install livekit-plugins-bithuman pillow

That plugin imports PIL.Image at module scope and its published metadata does not declare pillow, so installing it on its own ends at ModuleNotFoundError: No module named 'PIL' the first time you import it. The metadata is upstream's, not ours — this line is the whole fix, and the deploy guide carries it too.

On Python 3.10 and 3.14 there is a second one, and pillow alone does not clear it. That plugin declares bithuman behind a python_version >= "3.11" and python_version < "3.14" marker, so on those two interpreters pip reports success and installs no bithuman at all — which takes cv2 with it, and the import dies there instead. This package publishes cp310 and cp314 wheels that install and import cleanly, so name it yourself:

pip install livekit-plugins-bithuman pillow bithuman     # Python 3.10 / 3.14

Both workarounds have an expiry: pillow and the dropped marker are already merged upstream in livekit/agents#7280 and are waiting on a plugin release. A release after that commit needs neither word.

Coming from 2.10.0?

3.0.0 is a clean break. Thirty-two names became eight, and fourteen error classes became four.

if you see do this
cannot import name 'AsyncBithuman' (or Bithuman, AudioChunk, VideoFrame, VideoControl) bithuman.open(...) and avatar.render(audio) replace all of them
cannot import name 'Fixture' (or Runtime, EP_AUTO, ComposedFrame) same: they were the layer under render, and there is no layer to reach for now
no module named 'bithuman.api' (or .models, .exceptions, .config, .bhci) the values they held are gone from the surface; the four refusals replace the error classes
a DeprecationWarning when you import the 2.x offline-render module it still works until 4.0.0; the warning names the module and the class names to write instead (bithuman.offline, OfflineRenderer, OfflineRenderError)
module 'bithuman' has no attribute '__version__' importlib.metadata.version("bithuman")
you install the 2.x extra for offline rendering it still installs the same three packages until 4.0.0; the extra is now bithuman[offline]
your frames look blue frames are RGB now, not BGR — image[:, :, ::-1] if you feed OpenCV
except BithumanError never fires except bithuman.AvatarError

Frames are still (height, width, 3) uint8 arrays, still 25 per second, still in order.

2.10.0 is on PyPI forever and keeps resolving exactly as it does today. Pin bithuman<3 to stay on it.


Licence

Proprietary — this package carries the runtime. See LICENSE.

Metadata

Release files for bithuman 2.11.15

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bithuman 2.11.15
File Size Uploaded
bithuman-2.11.15.tar.gz 2.1 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for bithuman 2.11.15
File
bithuman-2.11.15-cp314-cp314-manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.28+ x86-64 Details
bithuman-2.11.15-cp314-cp314-manylinux_2_28_aarch64.whl CPython 3.14 CPython 3.14 Linux glibc 2.28+ ARM64 Details
bithuman-2.11.15-cp314-cp314-macosx_14_0_arm64.whl CPython 3.14 CPython 3.14 macOS 14.0+ ARM64 Details
bithuman-2.11.15-cp313-cp313-manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ x86-64 Details
bithuman-2.11.15-cp313-cp313-manylinux_2_28_aarch64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ ARM64 Details
bithuman-2.11.15-cp313-cp313-macosx_14_0_arm64.whl CPython 3.13 CPython 3.13 macOS 14.0+ ARM64 Details
bithuman-2.11.15-cp312-cp312-manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ x86-64 Details
bithuman-2.11.15-cp312-cp312-manylinux_2_28_aarch64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ ARM64 Details
bithuman-2.11.15-cp312-cp312-macosx_14_0_arm64.whl CPython 3.12 CPython 3.12 macOS 14.0+ ARM64 Details
bithuman-2.11.15-cp311-cp311-manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ x86-64 Details
bithuman-2.11.15-cp311-cp311-manylinux_2_28_aarch64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ ARM64 Details
bithuman-2.11.15-cp311-cp311-macosx_14_0_arm64.whl CPython 3.11 CPython 3.11 macOS 14.0+ ARM64 Details
bithuman-2.11.15-cp310-cp310-manylinux_2_28_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.28+ x86-64 Details
bithuman-2.11.15-cp310-cp310-manylinux_2_28_aarch64.whl CPython 3.10 CPython 3.10 Linux glibc 2.28+ ARM64 Details
bithuman-2.11.15-cp310-cp310-macosx_14_0_arm64.whl CPython 3.10 CPython 3.10 macOS 14.0+ ARM64 Details

Total release size: 379.7 MB

Release files / bithuman-2.11.15.tar.gz

Download URL bithuman-2.11.15.tar.gz
Size 2.1 kB
Tags Source
SHA-256 checksum
How to use checksums
a942ba4423feea2f075b9ba0a5cf3437bc14439d3eb6529037f98af49c8c5c20
BLAKE2b-256 checksum
How to use checksums
0a385516e18d9db18d6318c0fb337c6fd474c74f94249b9f2c8431f05e7fc0d7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Release files / bithuman-2.11.15-cp314-cp314-manylinux_2_28_x86_64.whl

Download URL bithuman-2.11.15-cp314-cp314-manylinux_2_28_x86_64.whl
Size 22.8 MB
Tags CPython 3.14 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
1fa7377b45374b66dedf27b53e92ce7ca47406ae8737935d83cd9dc299212fc7
BLAKE2b-256 checksum
How to use checksums
c0d1ad5dbdc077d04fb28c1f9e5f8d758c7bef1dd149c1ae36318dc8f83b7b8d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Release files / bithuman-2.11.15-cp314-cp314-manylinux_2_28_aarch64.whl

Download URL bithuman-2.11.15-cp314-cp314-manylinux_2_28_aarch64.whl
Size 21.2 MB
Tags CPython 3.14 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
7d23a6cd4f2b279461c1afb7695eedb66fc362425692b1e5b35d8e8c96934ff1
BLAKE2b-256 checksum
How to use checksums
e1aec9e94df049baad0cfe14c07c4a614bef61557e0f74793f4b047762230651
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Release files / bithuman-2.11.15-cp314-cp314-macosx_14_0_arm64.whl

Download URL bithuman-2.11.15-cp314-cp314-macosx_14_0_arm64.whl
Size 31.9 MB
Tags CPython 3.14 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
b01bfcdacdfebffa8e029612e42d22684d5241a0c0b8206f9db314e26e315e53
BLAKE2b-256 checksum
How to use checksums
62320263328f8ca8f5cab1697f11a4b57d1952aa71b236fb9cf740b61ee8fac1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Release files / bithuman-2.11.15-cp313-cp313-manylinux_2_28_x86_64.whl

Download URL bithuman-2.11.15-cp313-cp313-manylinux_2_28_x86_64.whl
Size 22.8 MB
Tags CPython 3.13 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
5cfbeb22dd77be9c6891b0b4fc3f370a78b1bc9fb7e2692f11b332371a70971b
BLAKE2b-256 checksum
How to use checksums
6dc44b466c801114bce3f633c79ada8e0750e69ea617ddbcfca1a8176ea2eb00
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Release files / bithuman-2.11.15-cp313-cp313-manylinux_2_28_aarch64.whl

Download URL bithuman-2.11.15-cp313-cp313-manylinux_2_28_aarch64.whl
Size 21.2 MB
Tags CPython 3.13 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
5b4c8d6573f0b30a4b8805b780f0b76dfe340bbed0fb19a584cc4e7fa857c0fb
BLAKE2b-256 checksum
How to use checksums
e2755bf13c16b963fd945e26959fe08e8e03391915a6737b05d0539ec167371e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Release files / bithuman-2.11.15-cp313-cp313-macosx_14_0_arm64.whl

Download URL bithuman-2.11.15-cp313-cp313-macosx_14_0_arm64.whl
Size 31.9 MB
Tags CPython 3.13 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
c1c57b6959ff3f40409ecc7fe2aa9b6d9acfe4d163bb1c44b74c341c63b3d792
BLAKE2b-256 checksum
How to use checksums
7030c8c2dfd067cee4cc04c5b4bb7ed45db70ca4b4c4662e55013ca5afaa32d8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Release files / bithuman-2.11.15-cp312-cp312-manylinux_2_28_x86_64.whl

Download URL bithuman-2.11.15-cp312-cp312-manylinux_2_28_x86_64.whl
Size 22.8 MB
Tags CPython 3.12 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
3c34beb85baa66a8348195f089122607fad8eb98f37207890a54d50411488182
BLAKE2b-256 checksum
How to use checksums
074b0b621bafe75f3b48f802c56ce8dc217fe98c0d1c46e38d39b98d00db223a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Release files / bithuman-2.11.15-cp312-cp312-manylinux_2_28_aarch64.whl

Download URL bithuman-2.11.15-cp312-cp312-manylinux_2_28_aarch64.whl
Size 21.2 MB
Tags CPython 3.12 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
c2d6af4ad743e7a00e156e10a4a28346819762a4de5b4af70f3614b1fd5a5d61
BLAKE2b-256 checksum
How to use checksums
cfc7181ca1d04f5c79189eea573df40f92215eca9042268274db1d5b13a00ab3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Release files / bithuman-2.11.15-cp312-cp312-macosx_14_0_arm64.whl

Download URL bithuman-2.11.15-cp312-cp312-macosx_14_0_arm64.whl
Size 31.9 MB
Tags CPython 3.12 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
511fc7e4244a4c7564ee5c3e23794e722ec926a1dd5d87942bcecf6b0767181a
BLAKE2b-256 checksum
How to use checksums
f3bca6bec9ef75225305c04db0571ac0e0f2e14682a036b2244e5ed988c3cdfc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Release files / bithuman-2.11.15-cp311-cp311-manylinux_2_28_x86_64.whl

Download URL bithuman-2.11.15-cp311-cp311-manylinux_2_28_x86_64.whl
Size 22.8 MB
Tags CPython 3.11 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
96b3505b2518a4d6cadef0d90f4207ed621445f80dab9133ee763acdb21650b9
BLAKE2b-256 checksum
How to use checksums
b7055481a77eaf9710218f94deaca42b1b72e02009c70325ca2a1d34cd8c8f93
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Release files / bithuman-2.11.15-cp311-cp311-manylinux_2_28_aarch64.whl

Download URL bithuman-2.11.15-cp311-cp311-manylinux_2_28_aarch64.whl
Size 21.2 MB
Tags CPython 3.11 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
73a5fc8ec59b3524d6e19d8ff0cc6de9f0d1b111368e9e16ef2bd38c273ef43e
BLAKE2b-256 checksum
How to use checksums
581e655c130460425345bf06908ad89efc20e99873c64cb6533cd0375a5211a6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Release files / bithuman-2.11.15-cp311-cp311-macosx_14_0_arm64.whl

Download URL bithuman-2.11.15-cp311-cp311-macosx_14_0_arm64.whl
Size 31.9 MB
Tags CPython 3.11 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
dfef787dc0d399bce1c16232d84c42401dfc8d853df8290ff00fd2461ed6a27a
BLAKE2b-256 checksum
How to use checksums
148cb8c8e31c056323dd6a60d57ebb8f10066224495cfea173e76c58e78e41fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Release files / bithuman-2.11.15-cp310-cp310-manylinux_2_28_x86_64.whl

Download URL bithuman-2.11.15-cp310-cp310-manylinux_2_28_x86_64.whl
Size 22.8 MB
Tags CPython 3.10 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
1834812354b8cf8bb4b3daf9eb956f6b5507f4b1875aff9c789a0cfd7b06724e
BLAKE2b-256 checksum
How to use checksums
0ee125857d3eb90db83633332d527f0817e27b679c949939e2b248c721c3d79e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Release files / bithuman-2.11.15-cp310-cp310-manylinux_2_28_aarch64.whl

Download URL bithuman-2.11.15-cp310-cp310-manylinux_2_28_aarch64.whl
Size 21.2 MB
Tags CPython 3.10 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
2d4b1f91186d299ddf8db438c1d43e2dd8620d4140b56ddd2333b2d907548961
BLAKE2b-256 checksum
How to use checksums
5dbc7fdc4ba1f628bc702f7edef858575103f71b7e9d9c55b5a83eb4eab316a7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Release files / bithuman-2.11.15-cp310-cp310-macosx_14_0_arm64.whl

Download URL bithuman-2.11.15-cp310-cp310-macosx_14_0_arm64.whl
Size 31.9 MB
Tags CPython 3.10 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
8cadba65d19cb7dee9cf9bd95bb55a93122801e005890ecccebf24eedcc224dd
BLAKE2b-256 checksum
How to use checksums
a729130bf9825a125f6ac5bc39acdf6cb7b121c3c334d9895853a3a567c13de2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Release history Release notifications | RSS feed

This release

2.11.15 This release

16 release files

2.3.4

15 release files

1.15.2

3 release files

1.15.1

3 release files

1.15.0

3 release files

1.14.0

3 release files

1.13.0

3 release files

1.12.4

3 release files

1.12.3

3 release files

1.12.2

3 release files

1.12.1

3 release files

1.12.0

3 release files

0.8.1

24 release files

0.1.3

3 release files

0.1.2

1 release file

0.1.1

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page