From f73c4047f5d590a1f6d4d7eb81f481d2ac818f08 Mon Sep 17 00:00:00 2001 From: Daniel Liu Date: Sat, 11 Jun 2022 16:54:02 -0400 Subject: [PATCH] more intents + start named entities --- data/intents.json | 52 +++++++++++++++++++++++++++++++++++------------ requirements.txt | 3 +++ stream.py | 7 ++++++- 3 files changed, 48 insertions(+), 14 deletions(-) diff --git a/data/intents.json b/data/intents.json index ca6c6d7..5b8f519 100644 --- a/data/intents.json +++ b/data/intents.json @@ -3,14 +3,14 @@ { "tag": "weather", "utterances": [ - "what is the weather currently", - "how's the weather", - "what's it like outside", - "weather", - "can you tell me the weather", - "weather report", - "current weather", - "what's the weather like" + "what is the weather currently", + "how's the weather", + "what's it like outside", + "weather", + "can you tell me the weather", + "weather report", + "current weather", + "what's the weather like" ], "responses": [ ] @@ -18,15 +18,41 @@ { "tag": "datetime", "utterances": [ - "what time is it", - "tell me the time", - "what's the time", - "current time", - "time" + "what time is it", + "tell me the time", + "what's the time", + "current time", + "time" ], "responses": [ ] + }, + { + "tag": "define", + "utterances": [ + "what does {} mean", + "what is the definition of {}", + "what is the meaning of the word {}", + "{} definition" + ], + "responses": [ + ] + }, + { + "tag": "currencyConversion", + "utterances": [ + "how much is {} in {}", + "convert {} to {}", + "currency convert {} to {}" + ], + "responses": [ + ] + } + ], + "entities": [ + { + "name": "" } ] } diff --git a/requirements.txt b/requirements.txt index cd7f0ac..f3a07fe 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,6 @@ asyncio==3.4.3 certifi==2022.5.18.1 +cffi==1.15.0 charset-normalizer==2.0.12 click==8.1.3 idna==3.3 @@ -8,8 +9,10 @@ joblib==1.1.0 nltk==3.7 numpy==1.21.6 pipeop==0.3.0 +pycparser==2.21 regex==2022.6.2 requests==2.27.1 +sounddevice==0.4.4 torch==1.11.0 tqdm==4.64.0 typing_extensions==4.2.0 diff --git a/stream.py b/stream.py index b746b7c..0f09d6e 100644 --- a/stream.py +++ b/stream.py @@ -39,6 +39,11 @@ async def run(uri): await sock.send('{"eof": 1}') await sock.recv() +async def test(): + async with websockets.connect(config.VOSK_URL) as sock: + pass + if __name__ == "__main__": - asyncio.run(run(config.VOSK_URL)) + asyncio.run(test()) + # asyncio.run(run(config.VOSK_URL))