Skip to content

Commit

Permalink
[HOTFIX] Pythonバージョンのアップデートとpyworldのlazy importのrevert (#204)
Browse files Browse the repository at this point in the history
* Revert "pyworld を 必要なAPIでのみインポートするように (#203)"

This reverts commit 8465e98.

* update to python 3.8

* update python version
  • Loading branch information
y-chan authored Nov 28, 2021
1 parent 9a2185b commit 118802a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
matrix:
include:
- os: [macos-11]
python: '3.7'
python: '3.8'
python_architecture: 'x64'
pip_cache_path: ~/Library/Caches/pip
voicevox_resource_version: '0.9.2'
Expand Down Expand Up @@ -408,7 +408,7 @@ jobs:
include:
# Windows CPU
- os: windows-2019
python: '3.7'
python: '3.8'
python_architecture: 'x64'
voicevox_resource_version: '0.9.2'
voicevox_core_version: '0.9.0'
Expand All @@ -421,7 +421,7 @@ jobs:
pip_cache_path: ~\AppData\Local\pip\Cache
# Windows NVIDIA GPU
- os: windows-2019
python: '3.7'
python: '3.8'
python_architecture: 'x64'
voicevox_resource_version: '0.9.2'
voicevox_core_version: '0.9.0'
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ RUN <<EOF
rm -rf /var/lib/apt/lists/*
EOF

ARG PYTHON_VERSION=3.7.12
ARG PYTHON_VERSION=3.8.10
# FIXME: Lock pyenv version with git tag
# 90d0d20508a91e7ea1e609e8aa9f9d1a28bb563e (including 3.7.12) not released yet (2021-09-12)
ARG PYENV_VERSION=master
Expand Down
5 changes: 1 addition & 4 deletions run.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from typing import List, Optional

import numpy as np
import pyworld as pw
import soundfile
import uvicorn
from fastapi import FastAPI, HTTPException, Request, Response
Expand Down Expand Up @@ -128,8 +129,6 @@ def create_accent_phrases(text: str, speaker_id: int) -> List[AccentPhrase]:
def synthesis_world_params(
query: AudioQuery, base_speaker: int, target_speaker: int
):
import pyworld as pw

base_wave = engine.synthesis(query=query, speaker_id=base_speaker).astype(
"float"
)
Expand Down Expand Up @@ -405,8 +404,6 @@ def synthesis_morphing(
モーフィングの割合は`morph_rate`で指定でき、0.0でベースの話者、1.0でターゲットの話者に近づきます。
"""

import pyworld as pw

if morph_rate < 0.0 or morph_rate > 1.0:
raise HTTPException(
status_code=422, detail="morph_rateは0.0から1.0の範囲で指定してください"
Expand Down

0 comments on commit 118802a

Please sign in to comment.