ylacombe / bark-small

huggingface.co
Total runs: 509
24-hour runs: 4
7-day runs: 72
30-day runs: -407
Model's Last Updated: July 18 2023
text-to-speech

Introduction of bark-small

Model Details of bark-small

Bark

Bark is a transformer-based text-to-audio model created by Suno . Bark can generate highly realistic, multilingual speech as well as other audio - including music, background noise and simple sound effects. The model can also produce nonverbal communications like laughing, sighing and crying. To support the research community, we are providing access to pretrained model checkpoints ready for inference.

The original github repo and model card can be found here .

This model is meant for research purposes only. The model output is not censored and the authors do not endorse the opinions in the generated content. Use at your own risk.

Two checkpoints are released:

Example

Try out Bark yourself!

  • Bark Colab:
Open In Colab
  • Hugging Face Colab:
Open In Colab
  • Hugging Face Demo:
Open in HuggingFace
🤗 Transformers Usage

You can run Bark locally with the 🤗 Transformers library from version 4.31.0 onwards.

  1. First install the 🤗 Transformers library from main:
pip install git+https://github.com/huggingface/transformers.git
  1. Run the following Python code to generate speech samples:
from transformers import AutoProcessor, AutoModel


processor = AutoProcessor.from_pretrained("suno/bark-small")
model = AutoModel.from_pretrained("suno/bark-small")

inputs = processor(
    text=["Hello, my name is Suno. And, uh — and I like pizza. [laughs] But I also have other interests such as playing tic tac toe."],
    return_tensors="pt",
)

speech_values = model.generate(**inputs, do_sample=True)
  1. Listen to the speech samples either in an ipynb notebook:
from IPython.display import Audio

sampling_rate = model.generation_config.sample_rate
Audio(speech_values.cpu().numpy().squeeze(), rate=sampling_rate)

Or save them as a .wav file using a third-party library, e.g. scipy :

import scipy

sampling_rate = model.config.sample_rate
scipy.io.wavfile.write("bark_out.wav", rate=sampling_rate, data=speech_values.cpu().numpy().squeeze())

For more details on using the Bark model for inference using the 🤗 Transformers library, refer to the Bark docs .

Suno Usage

You can also run Bark locally through the original Bark library :

  1. First install the bark library

  2. Run the following Python code:

from bark import SAMPLE_RATE, generate_audio, preload_models
from IPython.display import Audio

# download and load all models
preload_models()

# generate audio from text
text_prompt = """
     Hello, my name is Suno. And, uh — and I like pizza. [laughs] 
     But I also have other interests such as playing tic tac toe.
"""
speech_array = generate_audio(text_prompt)

# play text in notebook
Audio(speech_array, rate=SAMPLE_RATE)

pizza.webm

To save audio_array as a WAV file:

from scipy.io.wavfile import write as write_wav

write_wav("/path/to/audio.wav", SAMPLE_RATE, audio_array)
Model Details

The following is additional information about the models released here.

Bark is a series of three transformer models that turn text into audio.

Text to semantic tokens
Semantic to coarse tokens
  • Input: semantic tokens
  • Output: tokens from the first two codebooks of the EnCodec Codec from facebook
Coarse to fine tokens
  • Input: the first two codebooks from EnCodec
  • Output: 8 codebooks from EnCodec
Architecture
Model Parameters Attention Output Vocab size
Text to semantic tokens 80/300 M Causal 10,000
Semantic to coarse tokens 80/300 M Causal 2x 1,024
Coarse to fine tokens 80/300 M Non-causal 6x 1,024
Release date

April 2023

Broader Implications

We anticipate that this model's text to audio capabilities can be used to improve accessbility tools in a variety of languages.

While we hope that this release will enable users to express their creativity and build applications that are a force for good, we acknowledge that any text to audio model has the potential for dual use. While it is not straightforward to voice clone known people with Bark, it can still be used for nefarious purposes. To further reduce the chances of unintended use of Bark, we also release a simple classifier to detect Bark-generated audio with high accuracy (see notebooks section of the main repository).

Runs of ylacombe bark-small on huggingface.co

509
Total runs
4
24-hour runs
56
3-day runs
72
7-day runs
-407
30-day runs

More Information About bark-small huggingface.co Model

More bark-small license Visit here:

https://choosealicense.com/licenses/cc-by-nc-4.0

bark-small huggingface.co

bark-small huggingface.co is an AI model on huggingface.co that provides bark-small's model effect (), which can be used instantly with this ylacombe bark-small model. huggingface.co supports a free trial of the bark-small model, and also provides paid use of the bark-small. Support call bark-small model through api, including Node.js, Python, http.

ylacombe bark-small online free

bark-small huggingface.co is an online trial and call api platform, which integrates bark-small's modeling effects, including api services, and provides a free online trial of bark-small, you can try bark-small online for free by clicking the link below.

ylacombe bark-small online free url in huggingface.co:

https://huggingface.co/ylacombe/bark-small

bark-small install

bark-small is an open source model from GitHub that offers a free installation service, and any user can find bark-small on GitHub to install. At the same time, huggingface.co provides the effect of bark-small install, users can directly use bark-small installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

bark-small install url in huggingface.co:

https://huggingface.co/ylacombe/bark-small

Url of bark-small

bark-small huggingface.co Url

Provider of bark-small huggingface.co

ylacombe
ORGANIZATIONS

Other API from ylacombe

huggingface.co

Total runs: 163
Run Growth: 0
Growth Rate: 0.00%
Updated:October 31 2024
huggingface.co

Total runs: 53
Run Growth: -17
Growth Rate: -32.08%
Updated:October 11 2024
huggingface.co

Total runs: 36
Run Growth: 18
Growth Rate: 50.00%
Updated:August 08 2023
huggingface.co

Total runs: 6
Run Growth: 0
Growth Rate: 0.00%
Updated:October 07 2024
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:January 25 2024