Skip to content

A React + TypeScript application that delivers random quotes sourced from an API, enhancing the experience by enabling users to both read and listen to the quotes. With a simple interface, it offers a "Generate Quote" button to retrieve diverse quotes and a "Listen" feature utilizing browser text-to-speech functionality. Easy to set up and use.

Notifications You must be signed in to change notification settings

Gagan20-vis/Random-Quote-Generator-with-Speech

Repository files navigation

Random Quote Generator with Speech (React + TypeScript)

This is a simple web application built using React and TypeScript that fetches random quotes from an API and allows users to hear the quote spoken aloud.

Features

  • Random Quotes: Fetches quotes from [API_NAME] to display on the app.
  • Text-to-Speech: Provides a button to hear the quote read aloud using browser text-to-speech functionality.
  • React and TypeScript: Built with React framework using TypeScript for strict typing.

Installation

  1. Clone the repository:

    git clone https://github.com/your-username/quote-generator.git
  2. Navigate to the project directory:

    cd quote-generator
  3. Install dependencies:

    npm install

Usage

  1. Obtain an API key from [API_PROVIDER] and replace [YOUR_API_KEY] in src/api.ts with your actual API key.

  2. Start the development server:

    npm start
  3. Open your browser and navigate to http://localhost:3000 to view the app.

  4. Click the "Generate Quote" button to fetch a random quote. Press the "Listen" button to hear the quote spoken aloud.

Technologies Used

  • React: JavaScript library for building user interfaces.
  • TypeScript: Typed superset of JavaScript for enhanced code quality.

API Reference

This app uses the (https://api.adviceslip.com/advice) API to fetch random quotes. For more information.

About

A React + TypeScript application that delivers random quotes sourced from an API, enhancing the experience by enabling users to both read and listen to the quotes. With a simple interface, it offers a "Generate Quote" button to retrieve diverse quotes and a "Listen" feature utilizing browser text-to-speech functionality. Easy to set up and use.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published