Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SOLVED] RuntimeError: quantized engine QNNPACK is not supported #6

Closed
kravetsone opened this issue Oct 25, 2023 · 1 comment
Closed
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers

Comments

@kravetsone
Copy link

When I tried to run the example from the documentation I got an error

RuntimeError: quantized engine QNNPACK is not supported

import anyio
from stark import run, CommandsManager, Response
from stark.interfaces.vosk import VoskSpeechRecognizer

from stark.interfaces.silero import SileroSpeechSynthesizer

VOSK_MODEL_URL = "https://alphacephei.com/vosk/models/vosk-model-small-ru-0.22.zip"
SILERO_MODEL_URL = "https://models.silero.ai/models/tts/ru/v4_ru.pt"

recognizer = VoskSpeechRecognizer(model_url=VOSK_MODEL_URL)
synthesizer = SileroSpeechSynthesizer(model_url=SILERO_MODEL_URL)

manager = CommandsManager()

@manager.new('hello')
async def hello_command() -> Response:
    text = voice = 'Hello, world!'
    return Response(text=text, voice=voice)

async def main():
    await run(manager, recognizer, synthesizer)

if __name__ == '__main__':
    anyio.run(main)

OS: Windows 11
CPU: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz 1.99 GHz
GPU: Intel(R) UHD Graphics 620 / NVIDIA GeForce GTX 1050
stark-engine: 4.0.5
torch: 2.1.0

@kravetsone
Copy link
Author

kravetsone commented Oct 25, 2023

Solution is:

use another torch_backends_quantized_engine. See more
image

for example, i use onednn.

synthesizer = SileroSpeechSynthesizer(model_url=SILERO_MODEL_URL, torch_backends_quantized_engine="onednn")

and it works!

@MarkParker5 MarkParker5 added documentation Improvements or additions to documentation good first issue Good for newcomers labels Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants