Skip to content

Commit 605d3f2

Browse files
authored
update outetts according new repo structure (#2569)
1 parent 99c1124 commit 605d3f2

File tree

3 files changed

+96
-146
lines changed

3 files changed

+96
-146
lines changed

.ci/skipped_notebooks.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,6 +545,8 @@
545545
skips:
546546
- os:
547547
- macos-13
548+
- python:
549+
- '3.9'
548550
- notebook: notebooks/mobileclip-video-search/mobileclip-video-search.ipynb
549551
skips:
550552
- os:
@@ -555,4 +557,4 @@
555557
- macos-13
556558
- ubuntu-20.04
557559
- ubuntu-22.04
558-
- windows-2019
560+
- windows-2019

notebooks/outetts-text-to-speech/outetts-text-to-speech.ipynb

Lines changed: 75 additions & 140 deletions
Large diffs are not rendered by default.

notebooks/outetts-text-to-speech/ov_outetts_helper.py

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,19 @@
1-
from outetts.v0_1.interface import InterfaceHF
2-
from outetts.v0_1.audio_codec import AudioCodec
3-
from outetts.v0_1.prompt_processor import PromptProcessor
4-
from outetts.v0_1.model import HFModel
51
import torch
62
from optimum.intel.openvino import OVModelForCausalLM
73

4+
try:
5+
from outetts.version.v1.interface import InterfaceHF
6+
from outetts.version.v1.prompt_processor import PromptProcessor
7+
from outetts.version.v1.model import HFModel
8+
from outetts.wav_tokenizer.audio_codec import AudioCodec
9+
updated_version = True
10+
except ImportError:
11+
from outetts.v0_1.interface import InterfaceHF
12+
from outetts.v0_1.audio_codec import AudioCodec
13+
from outetts.v0_1.prompt_processor import PromptProcessor
14+
from outetts.v0_1.model import HFModel
15+
updated_version = False
16+
817

918
class OVHFModel(HFModel):
1019
def __init__(self, model_path, device):
@@ -20,5 +29,9 @@ def __init__(
2029
) -> None:
2130
self.device = torch.device("cpu")
2231
self.audio_codec = AudioCodec(self.device)
23-
self.prompt_processor = PromptProcessor(model_path)
32+
self.prompt_processor = PromptProcessor(model_path) if not updated_version else PromptProcessor(model_path, ["en"])
2433
self.model = OVHFModel(model_path, device)
34+
self.language = "en"
35+
self.verbose = False
36+
self.languages = ["en"]
37+
self._device = torch.device("cpu")

0 commit comments

Comments
 (0)