Skip to content

Commit

Permalink
chore: Update libarchive to version 3.7.4 and add bzip2 dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
royshil committed Jun 21, 2024
1 parent 79a5590 commit 64f5d10
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 18 deletions.
17 changes: 8 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,34 @@
# OBS Squawk - Real-time Text-to-Speech Engine

The OBS Squawk plugin adds powerful voice cloning capabilities to OBS by leveraging sherpa-onnx. With this plugin, you can enhance your audio sources with a huge library of voices and even train new voice models for unique voice cloning.
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.

## Features

- **OBS Audio Source**: Seamlessly integrates with OBS as an audio source.
- **Sherpa-onnx**: Utilizes sherpa-onnx for high-quality voice synthesis and cloning.
- **Sherpa-onnx**: Utilizes [sherpa-onnx](https://github.com/k2-fsa/sherpa-onnx/) for high-quality voice synthesis and cloning.
- **Cross-Platform**: Works on any operating system.
- **Extensive Voice Library**: Access to a huge library of pre-trained voices.
- **Custom Voice Training**: Ability to train new voice models for personalized voice cloning.

## Installation

1. Download the latest release from the [Releases](https://github.com/your-repo/obs-squawk/releases) page.
2. Extract the files to your OBS plugins directory.
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.
1. Select the `OBS Squawk Plugin` from the list of available audio sources.
1. Select the `Squawk Text to Speech` from the list of available audio sources.
1. Configure the plugin settings:
- **Select Voice**: Choose a pre-trained voice from the library.
- You can generate speech directly from the plugin settings
- Set up the automated input for generation from a Text source or a file
1. Send text to the source to produce the audio by monitoring a OBS text source or a text file.

## Voice Training

To train a new voice model:
1. Gather audio samples of the voice you want to clone.
2. Use the sherpa training interface to upload and process the samples.
3. Once training is complete, the new voice will be available in the voice selection menu.
Instructions on how to train a voice model will be provided soon.

## Contributing

Expand Down
12 changes: 4 additions & 8 deletions src/model-utils/model-downloader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,7 @@ static int copy_data(struct archive *ar, struct archive *aw)
{
int r;
const void *buff;
#ifdef WIN32
size_t size;
#else
int size;
#endif
la_int64_t offset;

for (;;) {
Expand Down Expand Up @@ -179,11 +175,7 @@ void extract(const char *filename, const char *dirname)
archive_error_string(ext));
} else {
const void *buff;
#ifdef WIN32
size_t size;
#else
int size;
#endif
la_int64_t offset;

// Read data blocks from the input archive and write to the output
Expand All @@ -194,7 +186,11 @@ void extract(const char *filename, const char *dirname)
if (r != ARCHIVE_OK)
throw std::runtime_error(archive_error_string(a));

#ifdef WIN32
r = archive_write_data_block(ext, buff, size, offset);
#else
r = archive_write_data_block(ext, buff, (int)size, offset);
#endif
if (r != ARCHIVE_OK)
throw std::runtime_error(archive_error_string(ext));
}
Expand Down
3 changes: 2 additions & 1 deletion src/sherpa-tts/sherpa-tts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ void init_sherpa_tts_context(sherpa_tts_context &context,
std::string model_folder = find_model_folder(model_info);

if (model_folder.empty()) {
obs_log(LOG_ERROR, "Model folder not found for model: %s", context.model_name);
obs_log(LOG_ERROR, "Model folder not found for model: %s",
context.model_name.c_str());
context.tts = nullptr;
return;
}
Expand Down

0 comments on commit 64f5d10

Please sign in to comment.