I-love-study/graiax-silkcoder

SyntaxError: 'await' outside function

TeaPoly opened this issue · 2 comments

It's great to write silk decoder into a python interface. Thanks for your contribution. When I install graiax-silkcoder and run example in README, then an error has raise: SyntaxError: 'await' outside function.

from graiax import silkcoder

await silkcoder.encode('a.wav', 'a.silk')

Hello
In fact, encode and decode method in graiax-silkcoder is asynchronous.
you can do it by this

import asyncio
from graiax import silkcoder
asycio.run(silkcoder.encode('a.wav', 'a.silk'))

or if you want to run in the terminal
just using python -m asyncio to open python

Hello In fact, encode and decode method in graiax-silkcoder is asynchronous. you can do it by this

import asyncio
from graiax import silkcoder
asycio.run(silkcoder.encode('a.wav', 'a.silk'))

or if you want to run in the terminal just using python -m asyncio to open python

Thanks for your reply.