locaal-ai / obs-squawk

Real-time Text-to-Speech AI Engine built-in OBS, integrative and intuitive
GNU General Public License v2.0
40 stars 1 forks source link
ai obs plugin realtime text-to-speech tts

OBS Squawk - Real-time Versatile Text-to-Speech Source

[![GitHub](https://img.shields.io/github/license/occ-ai/obs-squawk)](https://github.com/occ-ai/obs-squawl/blob/main/LICENSE) [![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/occ-ai/obs-squawk/push.yaml)](https://github.com/occ-ai/obs-squawk/actions/workflows/push.yaml) [![Total downloads](https://img.shields.io/github/downloads/occ-ai/obs-squawk/total)](https://github.com/occ-ai/obs-squawk/releases) [![GitHub release (latest by date)](https://img.shields.io/github/v/release/occ-ai/obs-squawk)](https://github.com/occ-ai/obs-squawk/releases) [![Discord](https://img.shields.io/discord/1200229425141252116)](https://discord.gg/KbjGU2vvUz)

The OBS Squawk plugin adds powerful voice cloning capabilities to OBS by leveraging sherpa-onnx. With this plugin, you can generate speech on the fly and in real-time inside OBS without any external services or access to the network.


3 Minute Tutorial

Features

Installation

  1. Download the latest release from the Releases page.
  2. Run the installer or extract the files from the zip to your OBS plugins directory.
  3. Restart OBS to load the new plugin.

Usage

  1. Open OBS and add a new Audio Source.
  2. Select the Squawk Text to Speech from the list of available audio sources.
  3. Configure the source settings:
    • Select Voice: Choose a pre-trained voice package from the library. Models will be downloaded as necessary.
    • Select the Speaker ID: some voice packages have multiple (even 100s) speakers.
    • You can generate speech directly from the plugin settings by clicking the button.
    • Set up the monitoring of a Text source or a file.
  4. Send text to the source to produce the audio by monitoring a OBS text source or a text file.

Voice Training

Instructions on how to train a voice model to clone your own or otheres voice will be provided soon!

Models

The plugin lists the directory of models offered by sherpa-onnx.

Using an external model for generation will be available soon!

Building

Mac OSX

Using the CI pipeline scripts, locally you would just call the zsh script:

$ ./.github/scripts/build-macos -c Release

Install

The above script should succeed and the plugin files (e.g. obs-squawk.plugin) will reside in the ./release/Release folder off of the root. Copy the .plugin file to the OBS directory e.g. ~/Library/Application Support/obs-studio/plugins.

To get .pkg installer file, run for example

$ ./.github/scripts/package-macos -c Release

(Note that maybe the outputs will be in the Release folder and not the install folder like pakage-macos expects, so you will need to rename the folder from build_x86_64/Release to build_x86_64/install)

Linux

Ubuntu

For successfully building on Ubuntu, first clone the repo, then from the repo directory:

$ sudo apt install -y libssl-dev libarchive-dev libbzip2-dev
$ ./.github/scripts/build-linux

Copy the results to the standard OBS folders on Ubuntu

$ sudo cp -R release/RelWithDebInfo/lib/* /usr/lib/
$ sudo cp -R release/RelWithDebInfo/share/* /usr/share/

Note: The official OBS plugins guide recommends adding plugins to the ~/.config/obs-studio/plugins folder. This has to do with the way you installed OBS.

In case the above doesn't work, attempt to copy the files to the ~/.config folder:

$ mkdir -p ~/.config/obs-studio/plugins/obs-squawk/bin/64bit
$ cp -R release/RelWithDebInfo/lib/x86_64-linux-gnu/obs-plugins/* ~/.config/obs-studio/plugins/obs-squawk/bin/64bit/
$ mkdir -p ~/.config/obs-studio/plugins/obs-squawk/data
$ cp -R release/RelWithDebInfo/share/obs/obs-plugins/obs-squawk/* ~/.config/obs-studio/plugins/obs-squawk/data/

Other distros

For other distros where you can't use the CI build script, you can build the plugin as follows

  1. Clone the repository and install these dependencies using your distribution's package manager:

    • libssl (with development headers)
  2. Generate the CMake build scripts (adjust folders if necessary)

    cmake -B build-dir --preset linux-x86_64 -DUSE_SYSTEM_CURL=ON -DCMAKE_INSTALL_PREFIX=./output_dir
  3. Build the plugin and copy the files to the output directory

    cmake --build build-dir --target install
  4. Copy plugin to OBS plugins folder

    mkdir -p ~/.config/obs-studio/plugins/bin/64bit
    cp -R ./output_dir/lib/obs-plugins/* ~/.config/obs-studio/plugins/bin/64bit/

    N.B. Depending on your system, the plugin might be in ./output_dir/lib64/obs-plugins instead.

  5. Copy plugin data to OBS plugins folder - Possibly only needed on first install

    mkdir -p ~/.config/obs-studio/plugins/data
    cp -R ./output_dir/share/obs/obs-plugins/obs-squawk/* ~/.config/obs-studio/plugins/data/

Windows

Use the CI scripts again, for example:

> .github/scripts/Build-Windows.ps1 -Configuration Release

The build should exist in the ./release folder off the root. You can manually install the files in the OBS directory.

> Copy-Item -Recurse -Force "release\Release\*" -Destination "C:\Program Files\obs-studio\"

Contributing

We welcome contributions! Please fork the repository and submit pull requests. For major changes, please open an issue first to discuss what you would like to change.

License

This project is licensed under the GPLv2 License - see the LICENSE file for details.

Acknowledgements

Support

For support and troubleshooting, please visit our GitHub Issues page or reach out on our Discord server.


Thank you for using the OBS Squawk Plugin! Enhance your streams with the power of voice cloning.