Feat: new backend: transformers-musicgen (#1387)

Transformers-MusicGen
---------

Signed-off-by: Dave <dave@gray101.com>
This commit is contained in:
Dave 2023-12-08 04:01:02 -05:00 committed by GitHub
parent 6011911746
commit 8b6e601405
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
26 changed files with 868 additions and 13 deletions

View file

@ -52,6 +52,20 @@ Note:
- The model name is case sensitive.
- LocalAI must be compiled with the `GO_TAGS=tts` flag.
LocalAI also has experimental support for `transformers-musicgen` for the generation of short musical compositions. Currently, this is implemented via the same requests used for text to speech:
```
curl --request POST \
--url http://localhost:8080/tts \
--header 'Content-Type: application/json' \
--data '{
"backend": "transformers-musicgen",
"model": "facebook/musicgen-medium",
"input": "Cello Rave"
}' | aplay```
Future versions of LocalAI will expose additional control over audio generation beyond the text prompt.
#### Configuration
Audio models can be configured via `YAML` files. This allows to configure specific setting for each backend. For instance, backends might be specifying a voice or supports voice cloning which must be specified in the configuration file.