Skip to main content

bithuman

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

pip install bithuman
python -m bithuman A63GVG1577 speech.wav       # -> A63GVG1577.mp4

Two arguments — an avatar and some audio — and a video you can play. The avatar is the ten-character code the service gave it (fetched once, which is free) or a file you already have. Run python -m bithuman with no arguments to list the avatars your key can open.

No audio to hand? This package ships 15 s of speech, so the first run needs nothing you do not already have:

python -m bithuman A63GVG1577 "$(python -c 'import bithuman,os;print(os.path.join(os.path.dirname(bithuman.__file__),"assets","demo_sample.wav"))')"

python -m bithuman --help prints that path on your machine.

In your own program it is the same two things:

import bithuman, os

speech = os.path.join(os.path.dirname(bithuman.__file__),
                      "assets", "demo_sample.wav")   # 15 s, ships in the wheel

avatar = bithuman.open("A63GVG1577.imx")
for image in avatar.render(speech):
    show(image)

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.


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":

frames = avatar.render(speech)
for image in frames:
    if interrupted:
        frames.close()
        break
    show(image)

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("A63GVG1577.imx") as avatar:
    for image in avatar.render(speech):
        show(image)

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(source)
    for image in avatar.render(audio):
        show(image)
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 exist for hosts that need them, and neither is required for a working result:

BITHUMAN_API_SECRET your key
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.


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.

Release files for bithuman 2.11.3

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

Built distributions (wheels)

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

Total release size: 377.9 MB

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

Download URL bithuman-2.11.3-cp314-cp314-manylinux_2_28_x86_64.whl
Size 22.6 MB
Tags CPython 3.14 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
601d204ae53d2ed389915e56fcc9f02394462d4016f48c4d9cf9b0ab151979ee
BLAKE2b-256 checksum
How to use checksums
2a382d4571661b26b13734124e89746f8bdcd29f602a53077c33eab6cb1ff72e
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.3-cp314-cp314-manylinux_2_28_aarch64.whl

Download URL bithuman-2.11.3-cp314-cp314-manylinux_2_28_aarch64.whl
Size 21.0 MB
Tags CPython 3.14 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
b84234b69ad4ec045d4afa6a4adf37d2309e2445c5d02cc956a406ab00097984
BLAKE2b-256 checksum
How to use checksums
425670467bcdb9c16f415b21967f24d8d49e9acaf1ecddefaf1bb015bf60737a
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.3-cp314-cp314-macosx_14_0_arm64.whl

Download URL bithuman-2.11.3-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
cfb523f0e6a6733b1c0ebf3483bdf5b56338e0b40de6e6644c9d7141a4e3b4bc
BLAKE2b-256 checksum
How to use checksums
e829ce2cbd05ac42d1f2ea5b9b6784bfd1e133211bd74ae8cbec9f310eac4dc5
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.3-cp313-cp313-manylinux_2_28_x86_64.whl

Download URL bithuman-2.11.3-cp313-cp313-manylinux_2_28_x86_64.whl
Size 22.6 MB
Tags CPython 3.13 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
b63fe4c026978c955f85843544b0019415d793781b531fbb7972ee9fb85d10fe
BLAKE2b-256 checksum
How to use checksums
4935dd8d64406e9e61bbf5fcccedfd9ed9b43de6ebaf78de83c1f9033389a66b
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.3-cp313-cp313-manylinux_2_28_aarch64.whl

Download URL bithuman-2.11.3-cp313-cp313-manylinux_2_28_aarch64.whl
Size 21.0 MB
Tags CPython 3.13 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
b33afe825fbc976c2a1d5384fd07eaf5c55221b80df5bf9db657e79fe6f2a8ef
BLAKE2b-256 checksum
How to use checksums
6856c0600c4a15e209a249a073fec647ce390d098a56d9d4f505d099ddca0fd8
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.3-cp313-cp313-macosx_14_0_arm64.whl

Download URL bithuman-2.11.3-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
48aa61de757825a437be63a1fb26375195232c1481c08c31b07f772dd3c40b2d
BLAKE2b-256 checksum
How to use checksums
5503a105b5fd917b156f92d836da5c6e5d08ee5087adb63c3509c44be9c47adc
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.3-cp312-cp312-manylinux_2_28_x86_64.whl

Download URL bithuman-2.11.3-cp312-cp312-manylinux_2_28_x86_64.whl
Size 22.6 MB
Tags CPython 3.12 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
82aeb810b5d1e46ac774bbafc4acf03fe103a3c849c86a2ab6913574ca93428d
BLAKE2b-256 checksum
How to use checksums
09c444a3ec950290c232c2ca94e179c6b01b5eab7d62d60f92934355f5a441b5
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.3-cp312-cp312-manylinux_2_28_aarch64.whl

Download URL bithuman-2.11.3-cp312-cp312-manylinux_2_28_aarch64.whl
Size 21.0 MB
Tags CPython 3.12 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
259b1133311a376d97ca9a5aa31dcce852f114588b7cc7ebae2f3bb0b67962ae
BLAKE2b-256 checksum
How to use checksums
28851285892325935ae6e58a7640c8b399665cc595015e97a900326e52e4d940
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.3-cp312-cp312-macosx_14_0_arm64.whl

Download URL bithuman-2.11.3-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
cc68ef7d10436cfd9bb6a30c9ab507ce1d07135e7eff46e1e6299adb21b519fc
BLAKE2b-256 checksum
How to use checksums
78d6d36374be17d6b79d616b5c9c080ec82bb90003e4a4c20f9560950fc015d1
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.3-cp311-cp311-manylinux_2_28_x86_64.whl

Download URL bithuman-2.11.3-cp311-cp311-manylinux_2_28_x86_64.whl
Size 22.6 MB
Tags CPython 3.11 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
141fe1918b1e2fa8e97be49e8a86031a7956e8d58003accc5879a7cc76242b85
BLAKE2b-256 checksum
How to use checksums
81bfb03f1635ea2c40e1516af42bc79d229d633e577d01a75a72eec7b2e4b431
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.3-cp311-cp311-manylinux_2_28_aarch64.whl

Download URL bithuman-2.11.3-cp311-cp311-manylinux_2_28_aarch64.whl
Size 21.0 MB
Tags CPython 3.11 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
2ea092f99b5e060ad7869abc62d3a2300d3eb9391401ec22de073165c407ab8f
BLAKE2b-256 checksum
How to use checksums
a82a035b8adc02f1b1042e5f3f1eef27db6f91d5ae361d90f802780c0b3a5ec1
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.3-cp311-cp311-macosx_14_0_arm64.whl

Download URL bithuman-2.11.3-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
26cd25b4bb45bbf2467734165ac1c875526805594595924d75b2d8ba490069da
BLAKE2b-256 checksum
How to use checksums
2011247969f2913590b56f151b5391625a6f12d099254f6df8365e8503fb465f
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.3-cp310-cp310-manylinux_2_28_x86_64.whl

Download URL bithuman-2.11.3-cp310-cp310-manylinux_2_28_x86_64.whl
Size 22.6 MB
Tags CPython 3.10 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
780d5db6c06387919b37556950e11d9eeb9ca641a19915513655d39516f19a96
BLAKE2b-256 checksum
How to use checksums
5b1ceb9ca8e5dbbdbfbd034bd008e62aa92945d8887d9cb5d50b47c68445df7f
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.3-cp310-cp310-manylinux_2_28_aarch64.whl

Download URL bithuman-2.11.3-cp310-cp310-manylinux_2_28_aarch64.whl
Size 21.0 MB
Tags CPython 3.10 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
b54331c25acd21b5b4847a03917e52a0e203c5bc8ace57f3aa82ab700261fc0f
BLAKE2b-256 checksum
How to use checksums
d3380c8c0e06d25153ad487f27938848ad0632efc80d9197c537702a0f09c8ba
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.3-cp310-cp310-macosx_14_0_arm64.whl

Download URL bithuman-2.11.3-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
10d248429fb79c72e606a952f80880d5e998da25ced58e0792f64f3ae384627d
BLAKE2b-256 checksum
How to use checksums
a5926320a7b6d513236b881c6e9d1d263ac56652a99f8255972cce680096ab18
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.3 This release

15 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