Skip to content

Commit

Permalink
rev
Browse files Browse the repository at this point in the history
  • Loading branch information
kenarsa committed May 21, 2024
1 parent c6dea23 commit 3bd9daa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion recipes/llm-voice-assistant/python/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ def main() -> None:
help="Duration of the synthesized audio to buffer before streaming it out. A higher value helps slower "
"(e.g., Raspberry Pi) to keep up with real-time at the cost of increasing the initial delay.")
parser.add_argument('--profile', action='store_true', help='Show runtime profiling information.')
parser.add_argument('--short_answers', action='store_true')
args = parser.parse_args()

access_key = args.access_key
Expand All @@ -231,6 +232,7 @@ def main() -> None:
picollm_top_p = args.picollm_top_p
orca_warmup_sec = args.orca_warmup_sec
profile = args.profile
short_answers = args.short_answers

if keyword_model_path is None:
porcupine = pvporcupine.create(access_key=access_key, keywords=['picovoice'])
Expand Down Expand Up @@ -303,7 +305,9 @@ def handler(_, __) -> None:
if profile:
print(f"[Cheetah RTF: {cheetah_profiler.rtf():.3f}]")
else:
dialog.add_human_request(user_request)
dialog.add_human_request(
f"Provide a short answer to the following question. {user_request}" if short_answers
else user_request)

picollm_profiler = TPSProfiler()

Expand Down
1 change: 1 addition & 0 deletions res/.lint/spell-check/dict.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
dtype
logit
mixtral
numpy
pico
picollm
Expand Down

0 comments on commit 3bd9daa

Please sign in to comment.