Skip to content

Commit

Permalink
Language update
Browse files Browse the repository at this point in the history
  • Loading branch information
Akshatchaube01 committed Jul 25, 2024
1 parent 0df1598 commit a1db0f3
Show file tree
Hide file tree
Showing 10 changed files with 339 additions and 6 deletions.
226 changes: 221 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"@tabler/icons-react": "^3.11.0",
"mini-svg-data-uri": "^1.4.4",
"next": "14.2.5",
"openai": "^4.53.0",
"preline": "^2.3.0",
"react": "^18",
"react-dom": "^18",
Expand Down
19 changes: 18 additions & 1 deletion src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
"use client";
import "regenerator-runtime/runtime";
import Image from "next/image";
import { IconVolume,IconFileUpload } from '@tabler/icons-react';


import React, {useState,ChangeEvent} from "react";
import TextArea from '@/components/Inputs/TextArea';
Expand All @@ -9,6 +11,10 @@ import SpeechRecognitionComponent from '@/components/Speech Recognition/SpeechRe
export default function Home() {

const [sourceText,setSourceText]=useState<string>("");
const handleAudioPlayback = (text:string) =>{
const utterance=new SpeechSynthesisUtterance(text);
window.speechSynthesis.speak(utterance);
};
return <div>
<div className="h-[50rem] w-full dark:bg-black bg-white dark:bg-grid-white/[0.2] bg-grid-black/[0.2] relative flex items-center justify-center">
<div className="absolute pointer-events-none inset-0 flex items-center justify-center dark:bg-black bg-white [mask-image:radial-gradient(ellipse_at_center,transparent_20%,black)]"></div>
Expand Down Expand Up @@ -36,8 +42,19 @@ export default function Home() {
/>
<div className="flex flex-row justify-between w-full">
<span className="cursor-pointer flex space-x-2 flex-row">
<SpeechRecognitionComponent setSourceText={setSourceText}/>
<SpeechRecognitionComponent
setSourceText={setSourceText}
/>
<IconVolume
size={22}
onClick={() => handleAudioPlayback(sourceText)}
/>
{/* <IconFileUpload
size={22}
onClick={()=> handleFileUpload()}
/> */}
</span>

</div>
</div>
</div>
Expand Down
Loading

0 comments on commit a1db0f3

Please sign in to comment.