Skip to content

A web application built with react js that converts all your texts to speech 🤭

Notifications You must be signed in to change notification settings

Wisdom-Ahuzi/text-to-speech

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Speechify - A Web Application that turns your texts to speech.

Table of contents

Overview

Tsks...a web application that is used to keep track of daily tasks in life.

Screenshot

BBB629D5-7BE3-4186-A65C-EF2ABEDB4965_1_201_a 458DFAF5-7AFD-48F4-B6AB-52B256D6CE56_1_201_a

Links

My process

Built with

  • CSS custom properties
  • Flexbox
  • CSS Grid
  • Mobile-first workflow
  • React js - JS library
  • Sass - CSS Preprocessor
  • Speech Synthesis

Some Nice Stuffs

     const handlePlay = () => {
    const text = textArea.current.value;
    let utterance;

    if (speechSynthesis.current.paused && speechSynthesis.current.speaking) {
      return speechSynthesis.current.resume();
    }
    if (selectedVoice) {
      const msg = new SpeechSynthesisUtterance(text);
      msg.rate = speedRef.current.value || 1;
      console.log(msg.rate);
      msg.voice = window.speechSynthesis
        .getVoices()
        .find((voice) => voice.name === selectedVoice);
      window.speechSynthesis.speak(msg);
    } else {
      utterance = new SpeechSynthesisUtterance(text);
      utterance.rate = speedRef.current.value || 1;
      console.log(utterance.rate);
      speechSynthesis.current.speak(utterance);
    }

    setDisabledTextArea("disabled");
  };
    #section-one {
      @include utils.flex-display($direction: column, $justify: unset);
      gap: 5px;
      h1 {
        font-size: 2rem;
        color: utils.$text-primary;
        text-align: center;
      }

      h4 {
        text-align: center;
        font-size: 12px;
        color: #17172dad;
      }
    }
     <aside ref={sideBar}>
        <h3>Don't Like current Voice? </h3>
        {voices.map((voice) => (
          <span
            key={uuidv4()}
            onClick={(e) => {
              handleChangeVoice(voice, e);
            }}
          >
            {voice.name}
          </span>
        ))}
      </aside>

Continued development

  • Css Grid
  • Sass functions
  • React js
  • Sass
  • Node js
  • Express js

Useful resources

Author

Acknowledgments

My Laptop I guess😅

About

A web application built with react js that converts all your texts to speech 🤭

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published