Skip to content

Commit

Permalink
stage
Browse files Browse the repository at this point in the history
  • Loading branch information
laves committed Oct 6, 2023
1 parent 45184c2 commit abd59b8
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 14 deletions.
8 changes: 4 additions & 4 deletions binding/python/_rhino.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,8 +347,8 @@ def get_inference(self) -> Inference:
byref(slot_values))
if status is not self.PicovoiceStatuses.SUCCESS:
raise self._PICOVOICE_STATUS_TO_EXCEPTION[status](
message='Failed to get intent',
message_stack=self._get_error_stack())
message='Failed to get intent',
message_stack=self._get_error_stack())

intent = intent.value.decode('utf-8')

Expand All @@ -359,8 +359,8 @@ def get_inference(self) -> Inference:
status = self._free_slots_and_values_func(self._handle, slot_keys, slot_values)
if status is not self.PicovoiceStatuses.SUCCESS:
raise self._PICOVOICE_STATUS_TO_EXCEPTION[status](
message='Failed to clear resources',
message_stack=self._get_error_stack())
message='Failed to clear resources',
message_stack=self._get_error_stack())
else:
intent = None
slots = dict()
Expand Down
12 changes: 6 additions & 6 deletions binding/python/test_rhino.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
from parameterized import parameterized

from _rhino import Rhino, RhinoError
from _util import *
from test_util import *

within_context_parameters, out_of_context_parameters = load_test_data()
Expand Down Expand Up @@ -86,15 +85,16 @@ def test_out_of_context(self, language, context_name):
context_name=context_name,
is_within_context=False)

def test_reset(self)
def test_reset(self):
relative_path = '../..'

rhino = Rhino(
access_key=sys.argv[1],
library_path=pv_library_path(relative_path),
model_path=get_model_path_by_language(relative_path, 'en'),
context_path=get_context_path_by_language(relative_path, 'coffee_maker', 'en')
)
relative_path = '../..'
audio_file = get_audio_file_by_language(relative_path, 'en', true)
audio_file = get_audio_file_by_language(relative_path, 'en', True)

is_finalized = self._process_file_helper(rhino, audio_file, 15)
self.assertFalse(is_finalized)
Expand All @@ -111,7 +111,7 @@ def test_message_stack(self):

error = None
try:
r = Rhino(
_ = Rhino(
access_key='invalid',
library_path=pv_library_path(relative_path),
model_path=get_model_path_by_language(relative_path, 'en'),
Expand All @@ -123,7 +123,7 @@ def test_message_stack(self):
self.assertGreater(len(error), 0)

try:
r = Rhino(
_ = Rhino(
access_key='invalid',
library_path=pv_library_path(relative_path),
model_path=get_model_path_by_language(relative_path, 'en'),
Expand Down
9 changes: 5 additions & 4 deletions resources/.lint/spell-check/dict.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ downsampled
downsampling
drwav
dylib
éclairage
emptively
emptively
endpointing
exopackage
Expand All @@ -54,6 +56,7 @@ inteligente
IntelliJ
interactable
Itertools
jbklasdfjbas
Jetson
jomyeong
jomyeong
Expand Down Expand Up @@ -132,9 +135,7 @@ wavspec
wchars
xcframework
xcodeproj
xcshareddata
xcscheme
xcschemes
xcworkspace
éclairage
emptively
xcshareddata
xcworkspace

0 comments on commit abd59b8

Please sign in to comment.