Skip to content

Commit

Permalink
feat:Speech to text added (#114)
Browse files Browse the repository at this point in the history
* feat: mic button working

* feat: audio to speech added

* chore: ui changes

* chore: ui changes

* feat: speech to text added to chat ui

* added flagsmith for model ids

* feat: changed audio models

* added flagsmith cloud

* feat: added new api for odia audio

* feat: added new api for odia audio

* feat: added voice button to chat screen

* added ai tools odia stt

* yarn issues resolved

* Style/new UI (#159)

* history share and download

* minor ui bug

* removed yarn lock file

* bug fix

* bug fix

* bug fix

* download share added to history page

* added asr id and sharing toasts

* added toasts in sharing

* Added error handling for no audio

* modified recorder

* audio working on mobile

* Fix socket (#160)

* set up socket-package

* new socket working

* audio working

* socket connection first time issue fixed

* new audio package used (#161)

* toast log

* audio playing added

* audio playing added

* new package used

* new audio package

* removed audio playback

* Used web audio APIs directly (#162)

* toast log

* audio playing added

* audio playing added

* new package used

* new audio package

* removed audio playback

* added audio playback

* used web audio apis directly

* removed useless toasts

* added one toast

* Style new UI (#164)

* new ui

* audio working

* minor ui changes

* minor ui changes

* example msgs ui changed

* changed inputBox UI

* minor ui changes

* chat page icons modified

* downtime page added to home, offline retry message coming

* updated translations

* fetching is down on chat page

* added translations

* added translations

* downtime state fixed

* stop gif size reduced

* recorder error msg changed

* added timer1 back

* refresh odia translation added

* increased fallback values for timer1 timer2

* removed transliteration

* title changed

* changed odia title spelling

---------

Co-authored-by: Prateek Jakhar <[email protected]>
  • Loading branch information
geeky-abhishek and prtkjakhar authored Sep 8, 2023
1 parent 27cfafd commit 9ad530b
Show file tree
Hide file tree
Showing 72 changed files with 21,347 additions and 16,452 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*
packages/

# local env files
.env.local
.env.development.local
Expand Down
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"svg.preview.background": "dark-transparent"
"svg.preview.background": "white"
}
20 changes: 16 additions & 4 deletions apps/amakrushi/lang/en.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"label.title":"Ama KrushAI",
"label.title":"Ama Krushi AI Chatbot",
"label.welcome":"Welcome",
"label.chats":"Chats",
"label.farmer":"Farmer",
Expand All @@ -17,12 +17,19 @@
"label.submit":"Submit",
"label.submit_review":"Submit Review",
"label.mobile_number":"Mobile Number",
"label.examples":"Examples",
"label.ask_me":"Ask me anything about farming",
"label.click":"Reload",
"label.new_chat":"New chat",
"label.confirm_delete":"Are you sure you want to delete this conversation?",
"label.no_history":"No Chats",
"label.call_amakrushi":"Call Ama Krushi",
"label.no_internet":"No Internet",
"label.refresh": "Refresh",
"label.type":"Type",
"label.speak":"Speak",
"message.click_to_type": "Click here to type",
"message.downloading": "Downloading...",
"message.sharing": "Sharing...",
"message.no_history":"Your Chat History with AI will come here",
"message.socket_disconnect_msg": "to connect again.",
"message.enter_mobile":"Enter Mobile Number",
Expand All @@ -40,7 +47,9 @@
"message.wait_resending_otp": "Please wait before resending OTP",
"message.helpful": "Was this helpful?",
"message.retry":"Please retry.",
"message.down_time_retry":"Retry",
"message.down_time_title":"We're under maintenance",
"message.down_time_retry":"Try again",
"message.down_time_view_prev_chats": "View previous chats",
"message.taking_longer":"Please wait, servers are taking longer than usual.",
"message.rating_submitted": "Rating Submitted!",
"message.review_submitted": "Review Submitted!",
Expand All @@ -53,9 +62,12 @@
"message.rating_description" : "Tap a star to rate",
"message.review": "Write your review (optional)",
"message.review_description": "Please write your experience's feedback.",
"message.temporarily_down": "We're temporarily down",
"message.temporarily_down": "Have an urgent query?",
"message.temporarily_down_description": "We are experiencing high user volume at the moment, please try logging in after some time",
"message.recorder_wait": "Please wait while we process your request...",
"message.recorder_error": "Your question was not recognised. Pls try speaking more clearly.",
"message.dialer_popup":"You may speak to an Ama Krushi expert to get a satisfactory response",
"message.cannot_share": "Your system doesn't support sharing this file.",
"error.fail_to_submit":"Failed to submit rating.",
"error.fail_to_submit_review": "Failed to submit review.",
"error.sending_otp":"Error sending OTP",
Expand Down
20 changes: 16 additions & 4 deletions apps/amakrushi/lang/or.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"label.title":"ଆମ କୃଷି",
"label.title":"ଆମ କୃଷି ଏ ଆଇ ଚାଟ୍ ବୋଟ୍",
"label.welcome":"ସ୍ୱାଗତ",
"label.chats":"ଚାଟ୍",
"label.farmer":"କୃଷକ",
Expand All @@ -17,12 +17,19 @@
"label.submit":"ଦାଖଲ କର",
"label.submit_review":"ସମୀକ୍ଷା ଦାଖଲ କରନ୍ତୁ",
"label.mobile_number":"ମୋବାଇଲ୍ ନମ୍ବର",
"label.examples":"ଉଦାହରଣଗୁଡିକ",
"label.ask_me":"ଚାଷ ବିଷୟରେ ମୋତେ କିଛି ପଚାର",
"label.click":"ସତେଜ କରନ୍ତୁ",
"label.new_chat":"ନୂଆ ଚାଟ୍",
"label.confirm_delete":"ଆପଣ ନିଶ୍ଚିତ କି ଆପଣ ଏହି ବାର୍ତ୍ତାଳାପକୁ ବିଲୋପ କରିବାକୁ ଚାହୁଁଛନ୍ତି?",
"label.no_history":"କ chat ଣସି ଚାଟ୍ ନାହିଁ |",
"label.call_amakrushi":"ଆମା କ୍ରୁସିଙ୍କୁ ଡାକ",
"label.no_internet":"ନା ଇଣ୍ଟରନେଟ୍ ",
"label.refresh": "ରିଫ୍ରେସ୍ କରନ୍ତୁ",
"label.type":"ଟାଇପ୍",
"label.speak":"କଥା ହୁଅନ୍ତୁ",
"message.click_to_type": "ଟାଇପ୍ କରିବାକୁ ଏଠାରେ କ୍ଲିକ୍ କରନ୍ତୁ",
"message.downloading": "ଡାଉନଲୋଡ୍ ହେଉଛି ....",
"message.sharing": "ସେୟାରିଂ ....",
"message.no_history":"AI ସହିତ ଆପଣଙ୍କର ଚାଟ୍ ଇତିହାସ ଏଠାକୁ ଆସିବ |",
"message.socket_disconnect_msg": "ପୁନର୍ବାର ସଂଯୋଗ କରିବାକୁ |",
"message.enter_mobile":"ମୋବାଇଲ୍ ନମ୍ବର ପ୍ରବେଶ କରନ୍ତୁ |",
Expand All @@ -40,7 +47,9 @@
"message.wait_resending_otp": "OTP ପଠାଇବା ପୂର୍ବରୁ ଦୟାକରି ଅପେକ୍ଷା କରନ୍ତୁ |",
"message.helpful": "ଏହା ସାହାଯ୍ୟକାରୀ ଥିଲା କି?",
"message.retry":"ପୁନର୍ବାର ଚେଷ୍ଟା କରନ୍ତୁ",
"message.down_time_retry": "ପୂର୍ଣ୍ଣବାର ଚେଷ୍ଟା କରନ୍ତୁ",
"message.down_time_title":"ଆମେ ରକ୍ଷଣାବେକ୍ଷଣ ଅଧୀନରେ ଅଛୁ",
"message.down_time_retry": "ପୁଣି ଥରେ ଚେଷ୍ଟା କର",
"message.down_time_view_prev_chats": "ପୂର୍ବ ଚାଟ୍ ଗୁଡିକ ଦେଖନ୍ତୁ",
"message.taking_longer":"ଦୟାକରି ଅପେକ୍ଷା କରନ୍ତୁ, ସର୍ଭର୍ ସାଧାରଣ ସମୟ ରୁ ଅଧିକ ସମୟ ନେଉଛି",
"message.rating_submitted": "ମୂଲ୍ୟାୟନ ଦାଖଲ!",
"message.review_submitted": "ସମୀକ୍ଷା ଦାଖଲ!",
Expand All @@ -54,9 +63,12 @@
"message.rating_description" : "ରେଟ୍ କରିବାକୁ ଏକ ତାରକା ଟ୍ୟାପ୍ କରନ୍ତୁ |",
"message.review": "ଆପଣଙ୍କର ସମୀକ୍ଷା ଲେଖନ୍ତୁ (ବ al କଳ୍ପିକ)",
"message.review_description": "ଦୟାକରି ଆପଣଙ୍କର ଅଭିଜ୍ଞତା ମତାମତ ଲେଖନ୍ତୁ |",
"message.temporarily_down": "କିଛି ସମୟ ପାଇଁ ସର୍ଭର ଡାଉନ୍ ଅଛି |",
"message.temporarily_down": "ଏକ ଜରୁରୀ ପ୍ରଶ୍ନ ଅଛି କି?",
"message.temporarily_down_description": "ଆମେ ଏହି ମୁହୂର୍ତ୍ତରେ ଉଚ୍ଚ ଉପଭୋକ୍ତା ଏହାକୁ ବ୍ୟବହାର କରୁଥିବା ର‌ ଅନୁଭବ କରୁଛୁ | ଦୟାକରି କିଛି ସମୟ ପରେ ଲଗଇନ୍ କରିବାକୁ ଚେଷ୍ଟା କରନ୍ତୁ|",
"message.recorder_wait": "ଆମେ ତୁମର ଅନୁରୋଧ ପ୍ରକ୍ରିୟା କରୁଥିବାବେଳେ ଦୟାକରି ଅପେକ୍ଷା କର...",
"message.recorder_error": "ଆପଣଙ୍କ ପ୍ରଶ୍ନ ଚିହ୍ନଟ ହୋଇନାହିଁ। ଦୟାକରି ଅଧିକ ସ୍ପଷ୍ଟ ଭାବରେ କହିବାକୁ ଚେଷ୍ଟା କରନ୍ତୁ।",
"message.dialer_popup":"ଏକ ସନ୍ତୋଷଜନକ ପ୍ରତିକ୍ରିୟା ପାଇବା ପାଇଁ ଆପଣ ଆମା କ୍ରୁଶି ବିଶେଷଜ୍ଞଙ୍କ ସହିତ କଥା ହେଇପାରିବେ |",
"message.cannot_share": "ଆପଣଙ୍କ ସିଷ୍ଟମ୍ ଏହି ଫାଇଲ୍ ଅଂଶୀଦାର କରିବାକୁ ସମର୍ଥନ କରେ ନାହିଁ।",
"error.fail_to_submit":"ମୂଲ୍ୟାୟନ ଦାଖଲ କରିବାରେ ବିଫଳ |",
"error.fail_to_submit_review": "ସମୀକ୍ଷା ଦାଖଲ କରିବାରେ ବିଫଳ |",
"error.sending_otp":"ଗୋଟିଏ ଥର ପାସୱାର୍ଡ ପଠାଇବାରେ ତ୍ରୁଟି |",
Expand Down
1 change: 1 addition & 0 deletions apps/amakrushi/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
"react-router-dom": "^6.3.0",
"react-scripts": "5.0.0",
"react-toastify": "^9.0.5",
"socket-package": "0.13.0",
"socket.io-client": "^4.5.1",
"typescript": "^4.9.3",
"underscore": "^1.13.6",
Expand Down
Binary file added apps/amakrushi/public/example_image_one.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/amakrushi/public/example_image_three.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/amakrushi/public/example_image_two.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 30 additions & 0 deletions apps/amakrushi/src/assets/icons/downloadHistory.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/amakrushi/src/assets/icons/error.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions apps/amakrushi/src/assets/icons/keyboard.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/amakrushi/src/assets/icons/process.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions apps/amakrushi/src/assets/icons/shareHistory.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/amakrushi/src/assets/icons/startIcon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/amakrushi/src/assets/icons/stop.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions apps/amakrushi/src/assets/icons/stopIcon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 0 additions & 4 deletions apps/amakrushi/src/assets/icons/sun.svg

This file was deleted.

Binary file added apps/amakrushi/src/assets/images/downTimeGIF.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/amakrushi/src/assets/images/sendButton.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion apps/amakrushi/src/components/HistoryPage/index.module.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.main {
margin: 1vh 0 1vh 1vh;
height: 83vh;
height: 78vh;
overflow-x: hidden;
overflow-y: scroll !important;
}
Expand Down
Loading

0 comments on commit 9ad530b

Please sign in to comment.