thumbs/links
Browse files
README.md
CHANGED
|
@@ -19,12 +19,12 @@ tags:
|
|
| 19 |
---
|
| 20 |
|
| 21 |
|
| 22 |
-
# Affective TTS /
|
| 23 |
|
| 24 |
-
- [SHIFT TTS tool](https://github.com/audeering/shift)
|
| 25 |
- Analysis of emotionality [#1](https://huggingface.co/dkounadis/artificial-styletts2/discussions/2)
|
| 26 |
- Soundscape `e.g. trees, water, hills,`, generation via [AudioGen](https://huggingface.co/dkounadis/artificial-styletts2/discussions/3)
|
| 27 |
-
- `landscape2soundscape.py` shows how to overlay TTS &
|
| 28 |
|
| 29 |
## Available Voices
|
| 30 |
|
|
@@ -32,8 +32,6 @@ tags:
|
|
| 32 |
|
| 33 |
## API
|
| 34 |
|
| 35 |
-
Install
|
| 36 |
-
|
| 37 |
```
|
| 38 |
virtualenv --python=python3 ~/.envs/.my_env
|
| 39 |
source ~/.envs/.my_env/bin/activate
|
|
@@ -47,34 +45,7 @@ Flask
|
|
| 47 |
CUDA_DEVICE_ORDER=PCI_BUS_ID HF_HOME=./hf_home CUDA_VISIBLE_DEVICES=2 python api.py
|
| 48 |
```
|
| 49 |
|
| 50 |
-
The following need `api.py` to be running on a
|
| 51 |
-
|
| 52 |
-
## Text 2 Speech
|
| 53 |
-
|
| 54 |
-
```python
|
| 55 |
-
# Basic TTS - See Available Voices
|
| 56 |
-
python tts.py --text sample.txt --voice "en_US/m-ailabs_low#mary_ann" --affective
|
| 57 |
-
|
| 58 |
-
# voice cloning
|
| 59 |
-
python tts.py --text sample.txt --native assets/native_voice.wav
|
| 60 |
-
```
|
| 61 |
-
|
| 62 |
-
## Image 2 Video
|
| 63 |
-
|
| 64 |
-
```python
|
| 65 |
-
# Make video narrating an image - All above TTS args apply also here!
|
| 66 |
-
python tts.py --text sample.txt --image assets/image_from_T31.jpg
|
| 67 |
-
```
|
| 68 |
-
|
| 69 |
-
## Video 2 Video
|
| 70 |
-
|
| 71 |
-
```python
|
| 72 |
-
# Video Dubbing - from time-stamped subtitles (.srt)
|
| 73 |
-
python tts.py --text assets/head_of_fortuna_en.srt --video assets/head_of_fortuna.mp4
|
| 74 |
-
|
| 75 |
-
# Video narration - from text description (.txt)
|
| 76 |
-
python tts.py --text assets/head_of_fortuna_GPT.txt --video assets/head_of_fortuna.mp4
|
| 77 |
-
```
|
| 78 |
|
| 79 |
## Landscape 2 Soundscape
|
| 80 |
|
|
@@ -83,7 +54,7 @@ python tts.py --text assets/head_of_fortuna_GPT.txt --video assets/head_of_fortu
|
|
| 83 |
python landscape2soundscape.py
|
| 84 |
```
|
| 85 |
|
| 86 |
-
# Examples
|
| 87 |
|
| 88 |
Substitute Native voice via TTS
|
| 89 |
|
|
@@ -132,9 +103,9 @@ python tts.py --text sample.txt --image assets/image_from_T31.jpg
|
|
| 132 |
```
|
| 133 |
|
| 134 |
## Landscape 2 Soundscape
|
| 135 |
-
- YouTube Videos
|
|
|
|
| 136 |
|
| 137 |
-
[](https://www.youtube.com/watch?v=FCYS29OrA1s)
|
| 138 |
|
| 139 |
|
| 140 |
|
|
@@ -143,6 +114,10 @@ python tts.py --text sample.txt --image assets/image_from_T31.jpg
|
|
| 143 |
python landscape2soundscape.py
|
| 144 |
```
|
| 145 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 146 |
|
| 147 |
# Live Demo - Paplay
|
| 148 |
|
|
|
|
| 19 |
---
|
| 20 |
|
| 21 |
|
| 22 |
+
# Affective TTS / SoundScapes
|
| 23 |
|
| 24 |
+
- [SHIFT TTS tool](https://github.com/audeering/shift)
|
| 25 |
- Analysis of emotionality [#1](https://huggingface.co/dkounadis/artificial-styletts2/discussions/2)
|
| 26 |
- Soundscape `e.g. trees, water, hills,`, generation via [AudioGen](https://huggingface.co/dkounadis/artificial-styletts2/discussions/3)
|
| 27 |
+
- `landscape2soundscape.py` shows how to overlay TTS & sound to image and create video
|
| 28 |
|
| 29 |
## Available Voices
|
| 30 |
|
|
|
|
| 32 |
|
| 33 |
## API
|
| 34 |
|
|
|
|
|
|
|
| 35 |
```
|
| 36 |
virtualenv --python=python3 ~/.envs/.my_env
|
| 37 |
source ~/.envs/.my_env/bin/activate
|
|
|
|
| 45 |
CUDA_DEVICE_ORDER=PCI_BUS_ID HF_HOME=./hf_home CUDA_VISIBLE_DEVICES=2 python api.py
|
| 46 |
```
|
| 47 |
|
| 48 |
+
The following need `api.py` to be already running `on a tmux session`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
|
| 50 |
## Landscape 2 Soundscape
|
| 51 |
|
|
|
|
| 54 |
python landscape2soundscape.py
|
| 55 |
```
|
| 56 |
|
| 57 |
+
# YouTube Videos / Examples
|
| 58 |
|
| 59 |
Substitute Native voice via TTS
|
| 60 |
|
|
|
|
| 103 |
```
|
| 104 |
|
| 105 |
## Landscape 2 Soundscape
|
| 106 |
+
- YouTube Videos For SHIFT demo / Collaboration with [SMB](https://www.smb.museum/home/)
|
| 107 |
+
|
| 108 |
|
|
|
|
| 109 |
|
| 110 |
|
| 111 |
|
|
|
|
| 114 |
python landscape2soundscape.py
|
| 115 |
```
|
| 116 |
|
| 117 |
+
[](https://youtu.be/SSi3gUO4GtY)
|
| 118 |
+
|
| 119 |
+
[(https://youtu.be/2YjxAPkdXIc)
|
| 120 |
+
|
| 121 |
|
| 122 |
# Live Demo - Paplay
|
| 123 |
|
landscape2soundscape.py
CHANGED
|
@@ -110,7 +110,7 @@ DESCRIPTIONS = [
|
|
| 110 |
'09_Blechen_AII823_001.jpg',
|
| 111 |
'09_Blechen_AII823_001.txt',
|
| 112 |
'Cascade in Africa',
|
| 113 |
-
'C. Blechen,
|
| 114 |
'en_US/m-ailabs_low#mary_ann',
|
| 115 |
],
|
| 116 |
# 10
|
|
@@ -118,7 +118,7 @@ DESCRIPTIONS = [
|
|
| 118 |
'10_Boecklin_967648_NG2-80_001_rsz.jpg',
|
| 119 |
'10_Boecklin_967648_NG2-80_001.txt',
|
| 120 |
'Hades ades at it sisland',
|
| 121 |
-
'A.
|
| 122 |
'en_US/cmu-arctic_low#jmk',
|
| 123 |
],
|
| 124 |
# 11
|
|
@@ -175,6 +175,8 @@ for img, text, scene, title, voice in DESCRIPTIONS[:20]:
|
|
| 175 |
im[offset_h:h+offset_h, :w, :] = (.4 * im[offset_h:h+offset_h, :w, :] + .6 * fram).astype(np.uint8)
|
| 176 |
|
| 177 |
cv2.imwrite('_tmp_banner.png', im)
|
|
|
|
|
|
|
| 178 |
OUT_FILE = img.split('/')[-1].replace('.','__') + '.mp4' # assets / -1
|
| 179 |
print(f'{OUT_FILE=}\n')
|
| 180 |
subprocess.run(
|
|
|
|
| 110 |
'09_Blechen_AII823_001.jpg',
|
| 111 |
'09_Blechen_AII823_001.txt',
|
| 112 |
'Cascade in Africa',
|
| 113 |
+
'C. Blechen, Wasserfalle Bei Tivoli, 1832',
|
| 114 |
'en_US/m-ailabs_low#mary_ann',
|
| 115 |
],
|
| 116 |
# 10
|
|
|
|
| 118 |
'10_Boecklin_967648_NG2-80_001_rsz.jpg',
|
| 119 |
'10_Boecklin_967648_NG2-80_001.txt',
|
| 120 |
'Hades ades at it sisland',
|
| 121 |
+
'A. Bocklin, Toteninsel, 1883',
|
| 122 |
'en_US/cmu-arctic_low#jmk',
|
| 123 |
],
|
| 124 |
# 11
|
|
|
|
| 175 |
im[offset_h:h+offset_h, :w, :] = (.4 * im[offset_h:h+offset_h, :w, :] + .6 * fram).astype(np.uint8)
|
| 176 |
|
| 177 |
cv2.imwrite('_tmp_banner.png', im)
|
| 178 |
+
print('save 2nd',PIC_DIR + 'thumb____' + img)
|
| 179 |
+
cv2.imwrite(PIC_DIR + 'thumb____' + img, cv2.resize(im, (im.shape[1]//4, im.shape[0]//4)))
|
| 180 |
OUT_FILE = img.split('/')[-1].replace('.','__') + '.mp4' # assets / -1
|
| 181 |
print(f'{OUT_FILE=}\n')
|
| 182 |
subprocess.run(
|
uc_spk_Landscape2Soundscape_Masterpieces_pics/thumb____01_Schick_AII840_001.jpg
ADDED
|
|
uc_spk_Landscape2Soundscape_Masterpieces_pics/thumb____02_Constable_AI555_001.jpg
ADDED
|
|