diff --git a/package.json b/package.json index 6c2057f..719a958 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,8 @@ "build": "next build", "start": "next start", "lint": "next lint", - "static": "next build && next export" + "static": "node script.js && next build && next export", + "custom-script": "node script.js" }, "dependencies": { "@fortawesome/fontawesome-svg-core": "^6.5.1", @@ -32,6 +33,7 @@ "markdown-to-jsx": "^7.4.0", "next": "^13.4.12", "next-mdx-remote": "^4.4.1", + "node-fetch": "^3.3.2", "postcss": "8.4.27", "react": "18.2.0", "react-canvas-nest": "^1.1.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6f25d5f..59cad87 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -71,6 +71,9 @@ dependencies: next-mdx-remote: specifier: ^4.4.1 version: 4.4.1(react-dom@18.2.0)(react@18.2.0) + node-fetch: + specifier: ^3.3.2 + version: 3.3.2 postcss: specifier: 8.4.27 version: 8.4.27 @@ -1388,6 +1391,11 @@ packages: resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==} dev: false + /data-uri-to-buffer@4.0.1: + resolution: {integrity: sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==} + engines: {node: '>= 12'} + dev: false + /datasette@1.0.1: resolution: {integrity: sha512-aJdlCBToEJUP4M57r67r4V6tltwGKa3qetnjpBtXYIlqbX9tM9jsoDMxb4xd9AGjpp3282oHRmqI5Z8TVAU0Mg==} dependencies: @@ -1873,6 +1881,14 @@ packages: reusify: 1.0.4 dev: false + /fetch-blob@3.2.0: + resolution: {integrity: sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==} + engines: {node: ^12.20 || >= 14.13} + dependencies: + node-domexception: 1.0.0 + web-streams-polyfill: 3.3.3 + dev: false + /fill-range@7.0.1: resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} engines: {node: '>=8'} @@ -1993,6 +2009,13 @@ packages: resolution: {integrity: sha512-For0Y8egwEK96JgJo4NONErPhtl7H2QzeB2NYGmzeGeJ8a1JZqPgLYOtM3oJRCYhmgsdDFd6KGRYyfe37XY4Yg==} dev: false + /formdata-polyfill@4.0.10: + resolution: {integrity: sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==} + engines: {node: '>=12.20.0'} + dependencies: + fetch-blob: 3.2.0 + dev: false + /forwarded@0.2.0: resolution: {integrity: sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==} engines: {node: '>= 0.6'} @@ -3874,6 +3897,11 @@ packages: resolution: {integrity: sha512-YdKcy2x0dDwOh+8BEuHvA+mnOKAhmMQDgKBOCUGaLpewdmsRYguYZSom3yA+/OrE61O/q+NMQANnun65xpI1Hw==} dev: false + /node-domexception@1.0.0: + resolution: {integrity: sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==} + engines: {node: '>=10.5.0'} + dev: false + /node-fetch@2.7.0: resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==} engines: {node: 4.x || >=6.0.0} @@ -3886,6 +3914,15 @@ packages: whatwg-url: 5.0.0 dev: false + /node-fetch@3.3.2: + resolution: {integrity: sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + dependencies: + data-uri-to-buffer: 4.0.1 + fetch-blob: 3.2.0 + formdata-polyfill: 4.0.10 + dev: false + /node-releases@2.0.14: resolution: {integrity: sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==} dev: false @@ -5450,6 +5487,11 @@ packages: graceful-fs: 4.2.11 dev: false + /web-streams-polyfill@3.3.3: + resolution: {integrity: sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==} + engines: {node: '>= 8'} + dev: false + /webidl-conversions@3.0.1: resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} dev: false diff --git a/public/blog-response.json b/public/blog-response.json new file mode 100644 index 0000000..67a0e80 --- /dev/null +++ b/public/blog-response.json @@ -0,0 +1,55 @@ +{ + "meta": { + "total_count": 2 + }, + "items": [ + { + "id": 8, + "meta": { + "type": "blog.BlogPage", + "detail_url": "http://localhost/api/v2/pages/8/", + "html_url": "http://localhost/blogs/insane-engineering-of-sr71/", + "slug": "insane-engineering-of-sr71", + "show_in_menus": false, + "seo_title": "", + "search_description": "", + "first_published_at": "2024-01-29T14:58:56.774677Z", + "alias_of": null, + "locale": "en" + }, + "title": "Insane Engineering Of Sr71", + "blog_body": "It’s hard to explain the engineering marvel that is the SR-71 Blackbird. A long-range plane capable of flying 26 kilometers above the surface of the planet. So high that the pilots could see the curvature on the planet and the inky black of space from their cockpits. It flew so fast that the engineers had to develop entirely new materials and designs to mitigate and dissipate the heat generated from aerodynamic friction. Unique engines were needed to function from 0 up to Mach 3.2, dealing with a myriad of problems like cooling, fuel efficiency, and supersonic shock waves interfering with airflow. A plane so advanced that when it detected a surface-to-air missile its response was simply to change course and speed up. Even though the missiles had a higher top speed, they couldn’t achieve the range and high altitude maneuverability the Blackbird could. A speed at which the SR-71 could cruise for extended periods.\r\n\r\n![aerodynamics](https://tetragram.codered.cloud/media/images/1.max-800x600.png)\r\n\r\nHow on earth did it manage that? To achieve those kinds of speeds a ramjet is typically needed. A ramjet, as you can probably guess from the name, relies on ram pressure to operate. Ram Pressure is simply the pressure that occurs as a plane rams itself through the air. So, as the engine moves through the sky, it funnels this high-pressure air inside. Before entering the combustion chamber the supersonic airflow must first be slowed down. This acts as the compressor stage of a normal jet engine, elevating the air pressure before it enters the combustion chamber. Once the air enters the combustion chamber, It is mixed with fuel and ignited. It expands and accelerates once again out of the exit nozzle. With no moving parts, this type of engine is capable of flying at speeds far greater than a typical turbine-driven engine, but it cannot start from zero. It needs forward movement to achieve the correct compression of air in the combustion chamber. So, they are either dropped from a conventional plane, have a secondary propulsion system, or are a hybrid of a conventional jet engine and a ramjet, which is precisely what the SR-71 used.\r\n\r\nThe turbojet J58 engine of the SR-71 is nestled inside the nacelle here. In front and around The J58 is a complicated system of airflow management. These control mechanisms allow the propulsion system to transition from a primarily turbojet engine to a ramjet engine in mid-flight\r\n\r\nFirst, the inlet spike. It is capable of moving forward and back by 0.66 meters. This adjusts the inlet and the throat area, which controls the airflow entering the engine. It also keeps the position of the normal shock wave at its ideal position between the inlet throat and the compressor, this is the most efficient position for the shock wave, as it minimizes the energy lost due to drag as air flows over the shock wave. The inlet spike stays in the forward position until Mach 1.6. After this point, it begins to move backward by 41 millimeters forever 0.1 increase in Mach number. Keeping the shock wave in its ideal position. The inlet spike contains perforations that connect to the outside of the nacelle through ducts. Initially, the flow of air will come from the outside in to provide additional airflow to the turbojet engines, but once the plane hits about Mach 0.5 this airflow reverses. As the plane speeds up the inlet spike develops a significant boundary layer of air. A boundary layer is a layer of very slow-moving air that clings to the surface of objects. By bleeding this layer of slow-moving air off to the inlet spike it frees up a greater area of the inlet area for high energy fast-moving air, and thus improves efficiency. Around the engine, there is a bypass area, which takes air from the inlet and bypasses it is around the J58 engine. This air was used to cool the J58, which again improved engine efficiency and allowed the plane to fly faster. After the air passes the engine it rejoins the airflow just after the engine afterburner, adding additional thrust as more oxygen becomes available for combustion and increases the pressure through the ejector nozzle. Air got into this bypass area in several ways. There was a shock trap, otherwise known as the cowl bleed, located here, which again helped minimize boundary layer growth. There were stuck-in doors, located here, which opened only from Mach 0 to Mach 0.5, to add additional air to the bypass for engine cooling.", + "blog_img_url": "https://tetragram.codered.cloud/media/images/1.max-800x600.png", + "blog_title": "Insane Engineering Of Sr71", + "blog_authors": "Ramesh, Suresh, Chaitanya", + "published_on": "2024-01-29", + "blog_slug": "aerodynamics", + "blog_description": "It’s hard to explain the engineering marvel that is the SR-71 Blackbird. A long-range plane capable of flying 26 kilometers above the surface of the planet.", + "blog_tags": "Rust, Golang, Serverside" + }, + { + "id": 9, + "meta": { + "type": "blog.BlogPage", + "detail_url": "http://localhost/api/v2/pages/9/", + "html_url": "http://localhost/blogs/the-future-of-processors-and-computing/", + "slug": "the-future-of-processors-and-computing", + "show_in_menus": false, + "seo_title": "", + "search_description": "", + "first_published_at": "2024-01-29T15:01:20.613379Z", + "alias_of": null, + "locale": "en" + }, + "title": "The Future Of Processors And Computing", + "blog_body": "The CPU has had a revolutionary phase backed up with many challenges to become what it looks like today. During the initial 2000s, when the fight for performance was at its peak, AMD and Intel were contending as the frontrunners. At first, increasing clock speed posed a major threat which lasted for quite a while and didn't require much effort. However, due to the laws of physics, this rapid growth had to reach its end.\r\n\r\nAccording to Moore's Law, the number of transistors on a chip had to be doubled every 24 months. Processors had to become smaller to accommodate more transistors, which would mean better performance. However, the resultant increase in temperature would depend on massive cooling. Therefore, the race for speed soon changed its trajectory to be the fight against the laws of physics. Though, the solution to this problem didn't take much of a cost. Instead of increasing clock speeds, producers now introduce multiple-core chips, where each core had the exact same clock speed because of which computers could now be more effective in performing multiple tasks during the same intervals.\r\n\r\n![SPACE](https://tetragram.codered.cloud/media/images/1.max-800x600_Mr08U9t.png)\r\n\r\nThe strategy ultimately prevailed but it came along with some drawbacks. The introduction of multiple cores needed developers to introduce different algorithms so that the improvements could be observable. Now, this didn't come quite easy in the gaming world where the CPU's performance had always been a prime characteristic. Another issue was that the more cores you have, operating them becomes harder.\r\n\r\nIt was also difficult to come up with an efficient code that would function with all the cores. If there was a possibility to develop a 150 GHz single- core unit, it would've been the ideal machine. However, silicon chips cannot be clocked up that fast due to the laws of physics. And this started to raise possibilities of replacing silicon in the processor industry.", + "blog_img_url": "https://tetragram.codered.cloud/media/images/1.max-800x600_Mr08U9t.png", + "blog_title": "The Future Of Processors And Computing", + "blog_authors": "Ramesh, Suresh, Chaitanya", + "published_on": "2023-01-04", + "blog_slug": "computing", + "blog_description": "The CPU has had a revolutionary phase backed up with many challenges to become what it looks like today. During the initial 2000s, when the fight for performance was at its peak, AMD and Intel were contending as the frontrunners.", + "blog_tags": "mbsa, ayush, ietnitk, webdev" + } + ] +} \ No newline at end of file diff --git a/public/event-response.json b/public/event-response.json new file mode 100644 index 0000000..ad07fe8 --- /dev/null +++ b/public/event-response.json @@ -0,0 +1,55 @@ +{ + "meta": { + "total_count": 2 + }, + "items": [ + { + "id": 10, + "meta": { + "type": "events.EventsPage", + "detail_url": "http://localhost/api/v2/pages/10/", + "html_url": "http://localhost/events/dare-to-design/", + "slug": "dare-to-design", + "show_in_menus": false, + "seo_title": "", + "search_description": "", + "first_published_at": "2024-01-29T15:24:26.781796Z", + "alias_of": null, + "locale": "en" + }, + "title": "DARE TO DESIGN", + "event_title": "
DARE TO DESIGN
", + "event_slug": "daretodesign", + "event_date": "2023-09-13", + "event_organizer": "IET NITK", + "event_location": "Google Meet", + "event_tags": "python, rust, ruby", + "event_img_url": "https://images.unsplash.com/photo-1577401159468-3bbc7ee440b5?q=80&w=2070&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D", + "event_body": "# Schedule\r\n\r\nFriday, 14th January 2022 - Knowledge Exchange Program on The Basics of Electronics(R,L,C) - 5:00 PM.\r\n\r\nSaturday, 22nd January 2022 - Competition - From 6 PM\r\n\r\n## General FAQ'S Regarding Event\r\n1. **Who’s eligible?**\r\n\r\n1st and 2nd year Undergraduates all over India.\r\n\r\n2. **Do we have to pay for registering?**\r\n\r\nNo, registration is absolutely free. \r\n\r\n3. **Are teams allowed to participate?**\r\n\r\nNo, it is an individual competition.\r\n\r\n4. **What are the perks of participating?**\r\n\r\n- The top 2 contestants get a chance to win prize money.\r\n\r\n- Top 3 participants will receive commendation certificates.\r\n\r\n5. **When and where?**\r\n\r\nThe KEP is scheduled on 14th January 2022 and the competition on 22st January 2022. It will be conducted virtually.\r\n\r\n6. **Where do I register for it?**\r\n\r\nRegistration link : [https://forms.gle/oAnDSa6jjQqa3SkQA](https://forms.gle/oAnDSa6jjQqa3SkQA)\r\n\r\n7. **What are the topics I need to be good at for Competition?**\r\n\r\n- Basics of R,L,C,RL,RC,RLC circuits and their transient analysis and Frequency Analysis.\r\n\r\n- KEP (Knowledge Exchange Program) on the above topics and practice questions will be provided to boost your confidence for the Competition.\r\n\r\n- More details about the competition will be provided a day before the competition.\r\n\r\n8. **Is Laptop Mandatory for Competition?**\r\n\r\n- LTSpice software will be used for competition. So a laptop will be mandatory.\r\n\r\n- We shall provide a tutorial on how to install and use it.\r\n\r\n9. **Is it mandatory to attend KEP?**\r\n\r\n- KEP is to help you understand the basics of R,L,C circuits and on how to use LTSpice software.\r\n\r\n- It's not mandatory but we recommend everyone to attend it.\r\n\r\n10. **Why there is week gap between KEP and Competition?**\r\n\r\n- After KEP, we are providing time for the registrants to dig deep into topics and understand them well.\r\n\r\n- We will also provide questions for practicing." + }, + { + "id": 11, + "meta": { + "type": "events.EventsPage", + "detail_url": "http://localhost/api/v2/pages/11/", + "html_url": "http://localhost/events/inkfiesta/", + "slug": "inkfiesta", + "show_in_menus": false, + "seo_title": "", + "search_description": "", + "first_published_at": "2024-01-29T15:25:29.935217Z", + "alias_of": null, + "locale": "en" + }, + "title": "INKFIESTA", + "event_title": "INKFIESTA
", + "event_slug": "inkfiesta", + "event_date": "2026-01-08", + "event_organizer": "NITK", + "event_location": "NITK Main Building", + "event_tags": "webdev, css, html, js, python", + "event_img_url": "https://images.unsplash.com/photo-1577401159468-3bbc7ee440b5?q=80&w=2070&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D", + "event_body": "# VALOSTORM\r\n\r\nA fun-filled event to bring out the gamer in you and compete to be the best gamer out there. Register in teams of 5 or individually and showcase your gaming talent! Individual registrants will be teamed up with other individual registrants to form teams of 5.\r\n\r\nGame: **Valorant** - A 5v5 Character-based FPS Tactical shooter game\r\n\r\nMode: **Spike Rush** (first team to win 4 rounds wins)\r\n\r\nKnockout tournament (Winning team advances to the next round)\r\n\r\nHosting platform: Valorant ( Download link: [https://playvalorant.com/en-gb/](https://playvalorant.com/en-gb/) )\r\n\r\n**Are you up for the challenge? Registration Link** -[https://bit.ly/Valostorm](https://bit.ly/Valostorm)\r\n\r\n# SEIZE THE NIGHT\r\nSEIZE THE NIGHT is an event to discover and shine your hidden talent. We present you a stage where you can perform various things such as\r\n\r\n- Skit\r\n- Music\r\n- Stand-up\r\n- Story Telling\r\n- Poem Reciting and many more.\r\n\r\nYou need to fill out the registration form with your details and choose your performance. There will be a panel of judges who will score you according to your presentation, confidence and communication skills. So get ready to amaze everyone with your bag of tricks.\r\n\r\n**Registration Link** - [https://bit.ly/SeizeTheNt](https://bit.ly/SeizeTheNt)\r\n\r\n# DO I MATTER?\r\nWe will be talking about an introduction to one’s inner journey and what they can do on a regular basis to keep their mental health upright. You can read more about the organization here in the link - [https://www.chanshi.org/](https://www.chanshi.org/)\r\n\r\nThe event goes live on the 30th of January at 11 AM on the Inkheart Youtube Channel. Along with that, a meeting link will be shared, 30 mins prior to the event start.\r\n\r\n**Youtube Channel Link** - [https://bit.ly/InkheartYT](https://bit.ly/InkheartYT)\r\n\r\n**Do join us and have a fun-filled weekend!**" + } + ] +} \ No newline at end of file diff --git a/public/project-response.json b/public/project-response.json new file mode 100644 index 0000000..21d5b83 --- /dev/null +++ b/public/project-response.json @@ -0,0 +1,57 @@ +{ + "meta": { + "total_count": 2 + }, + "items": [ + { + "id": 12, + "meta": { + "type": "projects.ProjectsPage", + "detail_url": "http://localhost/api/v2/pages/12/", + "html_url": "http://localhost/projects/audio-fingerprinting/", + "slug": "audio-fingerprinting", + "show_in_menus": false, + "seo_title": "", + "search_description": "", + "first_published_at": "2024-01-29T15:27:29.458646Z", + "alias_of": null, + "locale": "en" + }, + "title": "Audio Fingerprinting", + "project_title": "Audio Fingerprinting", + "project_sig": "CIPHER", + "project_slug": "audiofingerprinting", + "project_authors": "Sai, Ayush, Rehan, Yash", + "github_url": "https://github.com/creativetimofficial/soft-ui-design-system", + "project_img_url": "https://images.unsplash.com/photo-1577401159468-3bbc7ee440b5?q=80&w=2070&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D", + "project_description": "Recognizing a song from a large cluster of audio can't be achieved by using brute force to compare an audio sample to every song in the database. In this project we use hashing,a process in which reproducible hash tokens are extracted to save the effort, this method compares the hash values instead of the whole files so that it will be more efficient, Audio fingerprinting is the process of representing an audio signal in a compact way by extracting relevant features of the audio content.The fingerprints from the unknown sample are matched against a large set of fingerprints stored in the database. In this our model we are using mysql as the database.Companies like shazam, phillips, intrasonics and many more use audio fingerprinting for various implementations.", + "project_tags": "python, webdev, html, css", + "project_body": "# Audio Fingerprinting\r\n\r\n\r\n## ABSTRACT\r\nRecognizing a song from a large cluster of audio can't be achieved by using brute force to compare an audio sample to every song in the database. In this project we use hashing,a process in which reproducible hash tokens are extracted to save the effort, this method compares the hash values instead of the whole files so that it will be more efficient, Audio fingerprinting is the process of representing an audio signal in a compact way by extracting relevant features of the audio content.The fingerprints from the unknown sample are matched against a large set of fingerprints stored in the database. In this our model we are using mysql as the database.Companies like shazam, phillips, intrasonics and many more use audio fingerprinting for various implementations.\r\n\r\n## AUDIO RECOGNITION\r\nRead the audio file recorded and store it into a 2-D array of amplitude against time.The recording can be done using the microphone or the input file can be read from the system itself and saved as an audio file.This process is same for both , adding the audio files to the database as well as for recognising the audio files i.e both training and testing phase.\r\n\r\n\r\n## Fast Fourier Transform (FFT)\r\nNow we use Fast Fourier Transform (FFT) to change the waveform to frequency domain from time domain.\r\n\r\n\r\n## Spectrogram\r\nNext step is to perform Short-Term Fourier Transform (STFT) of the audio signal by breaking down the signal into small chunks and performing the Fourier Transform on each of them to generate the spectrogram, which is a visual plot of all three variables amplitude against time and frequency.\r\n\r\n\r\n## Mapping peaks\r\nThe processing is usually carried out on a 2-D array , which stores the STFT coefficients of the file and the peaks, local maxima points of the file, which are mapped by masking.A set of the peak and its neighbour are passed to a hash function to generate a hash. A hash is an encoded string which is unique for each input. An audio fingerprint is generated which is a set of hash values and the offset value(time component of the peak).This value is stored in the database with a unique song_id. After we perform these steps on the known file we can match the audio file.\r\n\r\n## Recognise the song\r\nWe recognise the song by comparing the hash value from the database.A pair of key-value is appended into an empty dictionary created for each song. Where key is the difference between the database offset and the sample offset and value if the number of repetitions of the matches we get while comparing the hash values. A score is calculated for each song which is the maximum value of ‘value’ in that particular dictionary. The song with maximum score is the best match for the input file and the model returns the song name with the score value.\r\n\r\n## Conclusion\r\nThe model has been successful in recognizing the song by finding the fingerprints. The further improvements for this model would be to use noise filter techniques, get accurate fingerprints and improve the database.\r\n\r\n## RESOURCES\r\n- [https://medium.com/swlh/understanding-audio-fingerprinting-b39682aa3b5f](https://medium.com/swlh/understanding-audio-fingerprinting-b39682aa3b5f)\r\n- [https://ourcodeworld.com/articles/read/973/creating-your-own-shazam-identify-songs-with-python-through-audio-fingerprinting-in-ubuntu-18-04](https://ourcodeworld.com/articles/read/973/creating-your-own-shazam-identify-songs-with-python-through-audio-fingerprinting-in-ubuntu-18-04)" + }, + { + "id": 13, + "meta": { + "type": "projects.ProjectsPage", + "detail_url": "http://localhost/api/v2/pages/13/", + "html_url": "http://localhost/projects/audio-to-sign-language-translator/", + "slug": "audio-to-sign-language-translator", + "show_in_menus": false, + "seo_title": "", + "search_description": "", + "first_published_at": "2024-01-29T15:28:26.615757Z", + "alias_of": null, + "locale": "en" + }, + "title": "Audio to Sign Language Translator", + "project_title": "Audio to Sign Language Translator", + "project_sig": "CIPHER", + "project_slug": "audiotosignlanguagetranslator", + "project_authors": "Sai, Ayush, Rehan, Yash", + "github_url": "https://github.com/creativetimofficial/soft-ui-design-system", + "project_img_url": "https://images.unsplash.com/photo-1577401159468-3bbc7ee440b5?q=80&w=2070&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D", + "project_description": "Sign languages are visual languages that use hand, facial and body movements as a means of communication. There are over 135 different sign languages all around the world including American Sign Language (ASL), Indian Sign Language (ISL) and British Sign Language (BSL). Sign languages are an extremely important communication tool for many deaf and hard-of-hearing people. Sign languages are the native languages of the Deaf community and provide full access to communication. Although sign languages are used primarily by people who are deaf, they are also used by others, such as people who can hear but can’t speak. Conversion of audio to ISL helps the common folks to interact with people with such disabilities without the language barrier, enriching both of their lives.", + "project_tags": "python, css, html", + "project_body": "## Methodology\r\n- Audio input on the platform using Python Speech Recognition module.\r\n- Conversion of audio to text using Google Speech API.\r\n- Dependency parser for analysing grammatical structure of the sentence and establishing relationship between words.\r\n- ISL Generator: ISL of input sentence using ISL grammar rules.\r\n- Generation of Sign language with concatenating videos\r\n\r\n## Libraries used\r\n- streamlit\r\n- speech_recognition\r\n- cv2\r\n- numpy\r\n- moviepy\r\n- nltk\r\n\r\n## Timeline\r\n\r\n| **STEP** | **TIME NEEDED** |\r\n| --- | ----------- |\r\n| Learning process | 35 days |\r\n| Working on theory to design | 15 days |\r\n| Designing the model/Coding | 25 days |\r\n| Working on changes and simulations\t | 10 days |\r\n| Analysis | 2 days |\r\n\r\n## Challenges\r\n- Compiling a quality repository of words and alphabets for output video.\r\n- Time required in processing video." + } + ] +} \ No newline at end of file diff --git a/script.js b/script.js new file mode 100644 index 0000000..5ea69a2 --- /dev/null +++ b/script.js @@ -0,0 +1,22 @@ +const fs = require('fs'); + +async function fetchDataAndSave() { + try { + const blogresponse = await fetch('https://tetragram.codered.cloud/api/v2/pages/?type=blog.BlogPage&fields=*'); + const blogdata = await blogresponse.json(); + fs.writeFileSync('./public/blog-response.json', JSON.stringify(blogdata, null, 2)); + + const eventesponse = await fetch('https://tetragram.codered.cloud/api/v2/pages/?type=events.EventsPage&fields=*'); + const eventdata = await eventesponse.json(); + fs.writeFileSync('./public/event-response.json', JSON.stringify(eventdata, null, 2)); + + const projectresponse = await fetch('https://tetragram.codered.cloud/api/v2/pages/?type=projects.ProjectsPage&fields=*'); + const projectdata = await projectresponse.json(); + fs.writeFileSync('./public/project-response.json', JSON.stringify(projectdata, null, 2)); + console.log('API response saved to api-response.json'); + } catch (error) { + console.error('Error fetching data:', error); + } +} + +fetchDataAndSave(); diff --git a/src/app/blogs/[blogid]/page.js b/src/app/blogs/[blogid]/page.js index 988fb4c..fd4e3d1 100644 --- a/src/app/blogs/[blogid]/page.js +++ b/src/app/blogs/[blogid]/page.js @@ -7,7 +7,7 @@ export default function BlogDetail({ params }){ } export async function generateStaticParams() { - const posts = await fetch('https://tetragram.codered.cloud/api/v2/pages/?type=blog.BlogPage&fields=*').then((res) => res.json()) + const posts = await fetch('/blog-response.json').then((res) => res.json()) return posts.items.map((post) => ({ blogid: post.blog_slug, diff --git a/src/app/events/[eventid]/page.js b/src/app/events/[eventid]/page.js index eb2e87d..b142176 100644 --- a/src/app/events/[eventid]/page.js +++ b/src/app/events/[eventid]/page.js @@ -7,7 +7,7 @@ export default function EventDetail({ params }){ } export async function generateStaticParams() { - const posts = await fetch('https://tetragram.codered.cloud/api/v2/pages/?type=events.EventsPage&fields=*').then((res) => res.json()) + const posts = await fetch('/event-response.json').then((res) => res.json()) return posts.items.map((post) => ({ eventid: post.event_slug, diff --git a/src/app/projects/[projectid]/page.jsx b/src/app/projects/[projectid]/page.jsx index 828efd4..932413d 100644 --- a/src/app/projects/[projectid]/page.jsx +++ b/src/app/projects/[projectid]/page.jsx @@ -7,7 +7,7 @@ export default function ProjectDetail({ params }){ } export async function generateStaticParams() { - const posts = await fetch('https://tetragram.codered.cloud/api/v2/pages/?type=projects.ProjectsPage&fields=*').then((res) => res.json()) + const posts = await fetch('/project-response.json').then((res) => res.json()) return posts.items.map((post) => ({ projectid: post.project_slug, diff --git a/src/components/api.js b/src/components/api.js index bad44fe..85b2aa3 100644 --- a/src/components/api.js +++ b/src/components/api.js @@ -1,6 +1,6 @@ export const fetchProjects = async () => { try { - const response = await fetch('https://tetragram.codered.cloud/api/v2/pages/?type=projects.ProjectsPage&fields=*'); + const response = await fetch('/project-response.json'); console.log(response); if (!response.ok) { diff --git a/src/components/blog/blogDetail.jsx b/src/components/blog/blogDetail.jsx index ed36839..b7d0945 100644 --- a/src/components/blog/blogDetail.jsx +++ b/src/components/blog/blogDetail.jsx @@ -18,7 +18,7 @@ const BlogId = ({ params }) => { const fetchData = async () => { try { // Fetch data from the API - const response = await fetch('https://tetragram.codered.cloud/api/v2/pages/?type=blog.BlogPage&fields=*'); + const response = await fetch('/blog-response.json'); const data = await response.json(); console.log("check", data); // Find the blog post with the matching id diff --git a/src/components/blog/blogList.jsx b/src/components/blog/blogList.jsx index d38a366..be0fb9f 100644 --- a/src/components/blog/blogList.jsx +++ b/src/components/blog/blogList.jsx @@ -10,7 +10,7 @@ const BlogList = () => { useEffect(() => { const fetchData = async () => { try { - const response = await fetch('https://tetragram.codered.cloud/api/v2/pages/?type=blog.BlogPage&fields=*'); + const response = await fetch('/blog-response.json'); const data = await response.json(); setBlogs(data.items); } catch (error) { diff --git a/src/components/event/eventDetail.jsx b/src/components/event/eventDetail.jsx index 08ec4e9..783e577 100644 --- a/src/components/event/eventDetail.jsx +++ b/src/components/event/eventDetail.jsx @@ -18,7 +18,7 @@ const EventId = ({ params }) => { const fetchData = async () => { try { // Fetch data from the API - const response = await fetch('https://tetragram.codered.cloud/api/v2/pages/?type=events.EventsPage&fields=*'); + const response = await fetch('/event-response.json'); const data = await response.json(); // Find the blog post with the matching id const matchingBlog = data.items.find(blog => blog?.event_slug === params.eventid); diff --git a/src/components/event/eventList.jsx b/src/components/event/eventList.jsx index d2d79de..ba3ae15 100644 --- a/src/components/event/eventList.jsx +++ b/src/components/event/eventList.jsx @@ -10,7 +10,7 @@ const EventList = () => { useEffect(() => { const fetchData = async () => { try { - const response = await fetch('https://tetragram.codered.cloud/api/v2/pages/?type=events.EventsPage&fields=*'); + const response = await fetch('/event-response.json'); const data = await response.json(); setBlogs(data.items); } catch (error) { diff --git a/src/components/project/projectDetail.jsx b/src/components/project/projectDetail.jsx index 30be31e..5cc288a 100644 --- a/src/components/project/projectDetail.jsx +++ b/src/components/project/projectDetail.jsx @@ -18,7 +18,7 @@ const ProjectId = ({ params }) => { const fetchData = async () => { try { // Fetch data from the API - const response = await fetch('https://tetragram.codered.cloud/api/v2/pages/?type=projects.ProjectsPage&fields=*'); + const response = await fetch('/project-response.json'); const data = await response.json(); console.log("check", data); // Find the blog post with the matching id