Skip to main content

gstvosk/
lib.rs

1// Copyright (C) 2022 Rafael Caricio <rafael@caricio.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
9extern crate core;
10
11use gst::glib;
12
13mod transcriber;
14mod vosk_client;
15
16fn plugin_init(plugin: &gst::Plugin) -> Result<(), glib::BoolError> {
17    transcriber::register(plugin)?;
18    Ok(())
19}
20
21gst::plugin_define!(
22    vosktranscriber,
23    env!("CARGO_PKG_DESCRIPTION"),
24    plugin_init,
25    concat!(env!("CARGO_PKG_VERSION"), "-", env!("COMMIT_ID")),
26    "MPL",
27    env!("CARGO_PKG_NAME"),
28    env!("CARGO_PKG_NAME"),
29    env!("CARGO_PKG_REPOSITORY"),
30    env!("BUILD_REL_DATE")
31);