1{
2 buildPythonPackage,
3 fetchFromGitHub,
4 httpx,
5 lib,
6 poetry-core,
7 pydantic,
8 pydantic-core,
9 requests,
10 typing-extensions,
11 websockets,
12}:
13
14let
15 version = "1.58.1";
16 tag = "v${version}";
17in
18buildPythonPackage {
19 pname = "elevenlabs";
20 inherit version;
21 pyproject = true;
22
23 src = fetchFromGitHub {
24 owner = "elevenlabs";
25 repo = "elevenlabs-python";
26 inherit tag;
27 hash = "sha256-zg+vIJaTH7ev8YiPLVqM+8J352afPQVyeq+1UDwOUac=";
28 };
29
30 build-system = [ poetry-core ];
31
32 dependencies = [
33 httpx
34 pydantic
35 pydantic-core
36 requests
37 typing-extensions
38 websockets
39 ];
40
41 pythonImportsCheck = [ "elevenlabs" ];
42
43 # tests access the API on the internet
44 doCheck = false;
45
46 meta = {
47 changelog = "https://github.com/elevenlabs/elevenlabs-python/releases/tag/${tag}";
48 description = "Official Python API for ElevenLabs Text to Speech";
49 homepage = "https://github.com/elevenlabs/elevenlabs-python";
50 license = lib.licenses.mit;
51 maintainers = with lib.maintainers; [ dotlambda ];
52 };
53}