Dionyssos commited on
Commit
7fa53df
·
1 Parent(s): 8c00071
Files changed (2) hide show
  1. README.md +9 -10
  2. demo.py +2 -2
README.md CHANGED
@@ -19,9 +19,9 @@ tags:
19
  # Affective TTS / SoundScapes
20
 
21
  - [SHIFT TTS tool](https://github.com/audeering/shift)
22
- - Analysis of emotionality [#1](https://huggingface.co/dkounadis/artificial-styletts2/discussions/2)
23
- - Soundscapes `trees, water, castles` via [AudioGen](https://huggingface.co/dkounadis/artificial-styletts2/discussions/3)
24
- - `landscape2soundscape.py` shows how to overlay TTS & sound to image and create video
25
 
26
  ## Available Voices
27
 
@@ -29,16 +29,16 @@ tags:
29
 
30
  ## Flask API
31
 
32
-
33
- ```
34
- git clone https://huggingface.co/dkounadis/artificial-styletts2
35
- ```
36
-
37
  <details>
38
  <summary>
39
  Create virtualenv
40
  </summary>
41
 
 
 
 
 
 
42
  ```
43
  virtualenv --python=python3 ~/.envs/.my_env
44
  source ~/.envs/.my_env/bin/activate
@@ -46,7 +46,6 @@ cd artificial-styletts2/
46
  pip install -r requirements.txt
47
  ```
48
 
49
-
50
  </details>
51
 
52
  Start Flask
@@ -57,7 +56,7 @@ CUDA_DEVICE_ORDER=PCI_BUS_ID HF_HOME=./hf_home CUDA_VISIBLE_DEVICES=2 python api
57
 
58
  ## Landscape 2 Soundscape
59
 
60
- The following needs `api.py` to be already running `on a tmux session`.
61
 
62
  ```python
63
  # TTS & soundscape - overlay to .mp4
 
19
  # Affective TTS / SoundScapes
20
 
21
  - [SHIFT TTS tool](https://github.com/audeering/shift)
22
+ - Analysis of TTS emotionality [#1](https://huggingface.co/dkounadis/artificial-styletts2/discussions/2)
23
+ - Soundscapes `trees, water, ..` via [AudioGen](https://huggingface.co/dkounadis/artificial-styletts2/discussions/3)
24
+ - `landscape2soundscape.py` - overlays TTS & sound to still image and create video
25
 
26
  ## Available Voices
27
 
 
29
 
30
  ## Flask API
31
 
 
 
 
 
 
32
  <details>
33
  <summary>
34
  Create virtualenv
35
  </summary>
36
 
37
+
38
+ ```
39
+ git clone https://huggingface.co/dkounadis/artificial-styletts2
40
+ ```
41
+
42
  ```
43
  virtualenv --python=python3 ~/.envs/.my_env
44
  source ~/.envs/.my_env/bin/activate
 
46
  pip install -r requirements.txt
47
  ```
48
 
 
49
  </details>
50
 
51
  Start Flask
 
56
 
57
  ## Landscape 2 Soundscape
58
 
59
+ The following needs `api.py` to be already running on a tmux session.
60
 
61
  ```python
62
  # TTS & soundscape - overlay to .mp4
demo.py CHANGED
@@ -4,7 +4,7 @@ import numpy as np
4
 
5
  print('\n\n\n\n___________________')
6
 
7
- txt = 'australian music'
8
 
9
  sound_generator = AudioGen.get_pretrained('facebook/audiogen-medium')
10
  sound_generator.set_generation_params(duration=1) # why is generating so long at 14 seconds
@@ -12,4 +12,4 @@ sound_generator.set_generation_params(duration=1) # why is generating so long
12
  x = sound_generator.generate([txt])[0].detach().cpu().numpy()[0, :]
13
  x /= np.abs(x).max() + 1e-7
14
 
15
- audiofile.write('_audio3_.wav', x, 16000)
 
4
 
5
  print('\n\n\n\n___________________')
6
 
7
+ txt = 'car'
8
 
9
  sound_generator = AudioGen.get_pretrained('facebook/audiogen-medium')
10
  sound_generator.set_generation_params(duration=1) # why is generating so long at 14 seconds
 
12
  x = sound_generator.generate([txt])[0].detach().cpu().numpy()[0, :]
13
  x /= np.abs(x).max() + 1e-7
14
 
15
+ audiofile.write('_audio1_.wav', x, 16000)