Spaces:
Configuration error
Configuration error
Fedir Zadniprovskyi
commited on
Commit
·
77b0ce3
1
Parent(s):
7f27bac
fix: piper is imported on ARM
Browse files- tests/speech_test.py +5 -3
tests/speech_test.py
CHANGED
|
@@ -5,7 +5,11 @@ from openai import APIConnectionError, AsyncOpenAI, UnprocessableEntityError
|
|
| 5 |
import pytest
|
| 6 |
import soundfile as sf
|
| 7 |
|
| 8 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
DEFAULT_MODEL,
|
| 10 |
DEFAULT_RESPONSE_FORMAT,
|
| 11 |
DEFAULT_VOICE,
|
|
@@ -15,8 +19,6 @@ from faster_whisper_server.routers.speech import (
|
|
| 15 |
|
| 16 |
DEFAULT_INPUT = "Hello, world!"
|
| 17 |
|
| 18 |
-
platform_machine = platform.machine()
|
| 19 |
-
|
| 20 |
|
| 21 |
@pytest.mark.asyncio
|
| 22 |
@pytest.mark.skipif(platform_machine != "x86_64", reason="Only supported on x86_64")
|
|
|
|
| 5 |
import pytest
|
| 6 |
import soundfile as sf
|
| 7 |
|
| 8 |
+
platform_machine = platform.machine()
|
| 9 |
+
if platform_machine != "x86_64":
|
| 10 |
+
pytest.skip("Only supported on x86_64", allow_module_level=True)
|
| 11 |
+
|
| 12 |
+
from faster_whisper_server.routers.speech import ( # noqa: E402
|
| 13 |
DEFAULT_MODEL,
|
| 14 |
DEFAULT_RESPONSE_FORMAT,
|
| 15 |
DEFAULT_VOICE,
|
|
|
|
| 19 |
|
| 20 |
DEFAULT_INPUT = "Hello, world!"
|
| 21 |
|
|
|
|
|
|
|
| 22 |
|
| 23 |
@pytest.mark.asyncio
|
| 24 |
@pytest.mark.skipif(platform_machine != "x86_64", reason="Only supported on x86_64")
|