liuhuadai commited on
Commit
86766cd
1 Parent(s): 4480dee

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +56 -1
README.md CHANGED
@@ -2,4 +2,59 @@
2
  license: mit
3
  library_name: transformers
4
  pipeline_tag: text-to-audio
5
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  license: mit
3
  library_name: transformers
4
  pipeline_tag: text-to-audio
5
+ ---
6
+ # 🎵🎵🎵AudioLCM:Text-to-Audio Generation with Latent Consistency Models
7
+
8
+ We develop **AudioLCM** building on LCM (latent consistency models) for text-to-audio generation.
9
+
10
+
11
+
12
+ ## code
13
+
14
+ Our code is released here : [https://github.com/liuhuadai/AudioLCM)](https://github.com/liuhuadai/AudioLCM)
15
+
16
+ Please follow the instructions in the repository for installation, usage and experiments.
17
+
18
+
19
+
20
+ ## Quickstart Guide
21
+
22
+ Download the **AudioLCM** model and generate audio from a text prompt:
23
+
24
+ ```python
25
+ import IPython
26
+ import soundfile as sf
27
+ from infer import AudioLCMInfer
28
+
29
+
30
+ prompt="Constant rattling noise and sharp vibrations"
31
+ config_path="./audiolcm.yaml"
32
+ model_path="./audiolcm.ckpt"
33
+ vocoder_path="./model/vocoder"
34
+ audio_path = AudioLCMInfer(prompt, config_path=config_path, model_path=model_path, vocoder_path=vocoder_path)
35
+
36
+
37
+ ```
38
+
39
+
40
+
41
+ Use the `AudioLCMBatchInfer` function to generate multiple audio samples for a batch of text prompts:
42
+
43
+ ```python
44
+ import IPython
45
+ import soundfile as sf
46
+ from infer import AudioLCMBatchInfer
47
+
48
+
49
+ prompts=[
50
+ "Constant rattling noise and sharp vibrations",
51
+ "A rocket flies by followed by a loud explosion and fire crackling as a truck engine runs idle",
52
+ "Humming and vibrating with a man and children speaking and laughing"
53
+ ]
54
+ config_path="./audiolcm.yaml"
55
+ model_path="./audiolcm.ckpt"
56
+ vocoder_path="./model/vocoder"
57
+ audio_path = AudioLCMBatchInfer(prompts, config_path=config_path, model_path=model_path, vocoder_path=vocoder_path)
58
+ ```
59
+
60
+