mirror of
https://github.com/shirayu/whispering.git
synced 2024-11-25 18:31:00 +00:00
Fix bugs
This commit is contained in:
parent
cc00c74280
commit
36c547ad50
1 changed files with 8 additions and 4 deletions
|
@ -235,10 +235,14 @@ def main() -> None:
|
||||||
if opts.show_devices:
|
if opts.show_devices:
|
||||||
return show_devices()
|
return show_devices()
|
||||||
|
|
||||||
if opts.host is not None and opts.port is not None and opts.mode != Mode.client:
|
if (
|
||||||
opts.mode = Mode.server
|
opts.host is not None
|
||||||
|
and opts.port is not None
|
||||||
|
and opts.mode != Mode.client.value
|
||||||
|
):
|
||||||
|
opts.mode = Mode.server.value
|
||||||
|
|
||||||
if opts.mode == Mode.client:
|
if opts.mode == Mode.client.value:
|
||||||
assert opts.language is None
|
assert opts.language is None
|
||||||
assert opts.model is None
|
assert opts.model is None
|
||||||
try:
|
try:
|
||||||
|
@ -249,7 +253,7 @@ def main() -> None:
|
||||||
)
|
)
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
pass
|
pass
|
||||||
elif opts.mode == Mode.server:
|
elif opts.mode == Mode.server.value:
|
||||||
assert opts.language is not None
|
assert opts.language is not None
|
||||||
assert opts.model is not None
|
assert opts.model is not None
|
||||||
wsp = get_wshiper(opts=opts)
|
wsp = get_wshiper(opts=opts)
|
||||||
|
|
Loading…
Reference in a new issue