Skip to content

Commit

Permalink
HCI update
Browse files Browse the repository at this point in the history
  • Loading branch information
louisbrulenaudet committed Dec 31, 2023
1 parent 8115778 commit f46f52c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 29 deletions.
Binary file modified .DS_Store
Binary file not shown.
29 changes: 0 additions & 29 deletions hci.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,32 +391,3 @@ def recognize_speech(self, duration:int=5, sample_rate:int=16000) -> str:

except Exception as e:
raise RuntimeError(f"An error occurred during speech recognition: {e}")


# Example usage:
if __name__ == "__main__":
actions = {
"validate": [
"confirm", "approve", "verify", "validate",
"authenticate", "ratify", "endorse", "certify",
"pass", "authorize", "accredit", "yes"
],
"invalidate": [
"reject", "deny", "invalidate", "disapprove",
"refuse", "void", "nullify", "revoke",
"discredit", "disqualify", "abrogate", "annul", "no"
]
}

instance = Speech2Interact(
actions=actions,
wav2vec_model="facebook/wav2vec2-large-960h",
sentence_similarity_model="sentence-transformers/all-mpnet-base-v2"
)

while True:
action = instance.recognize_speech(
duration=3
)

print(action)

0 comments on commit f46f52c

Please sign in to comment.