Skip to main content

gstelevenlabs/
lib.rs

1// Copyright (C) 2025 Mathieu Duponchelle <mathieu@centricular.com>
2//
3// This Source Code Form is subject to the terms of the Mozilla Public License, v2.0.
4// If a copy of the MPL was not distributed with this file, You can obtain one at
5// <https://mozilla.org/MPL/2.0/>.
6//
7// SPDX-License-Identifier: MPL-2.0
8#![allow(clippy::non_send_fields_in_send_ty, unused_doc_comments)]
9#![recursion_limit = "128"]
10
11use gst::glib;
12/**
13 * plugin-elevenlabs:
14 *
15 * Since: plugins-rs-0.14.0
16 */
17use std::sync::LazyLock;
18use tokio::runtime;
19
20static RUNTIME: LazyLock<runtime::Runtime> = LazyLock::new(|| {
21    runtime::Builder::new_multi_thread()
22        .enable_all()
23        .worker_threads(1)
24        .build()
25        .unwrap()
26});
27
28mod cloner;
29mod synthesizer;
30
31fn plugin_init(plugin: &gst::Plugin) -> Result<(), glib::BoolError> {
32    synthesizer::register(plugin)?;
33    cloner::register(plugin)?;
34
35    Ok(())
36}
37
38gst::plugin_define!(
39    elevenlabs,
40    env!("CARGO_PKG_DESCRIPTION"),
41    plugin_init,
42    concat!(env!("CARGO_PKG_VERSION"), "-", env!("COMMIT_ID")),
43    "MPL",
44    env!("CARGO_PKG_NAME"),
45    env!("CARGO_PKG_NAME"),
46    env!("CARGO_PKG_REPOSITORY"),
47    env!("BUILD_REL_DATE")
48);