New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-text-to-speech

Package Overview
Dependencies
Maintainers
1
Versions
120
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-text-to-speech - npm Package Compare versions

Comparing version 0.14.4 to 0.14.5

4

dist/hooks.js

@@ -9,3 +9,3 @@ import React, { cloneElement, isValidElement, useEffect, useMemo, useRef, useState } from "react";

}
export function useSpeech({ text, pitch = 1, rate = 1, volume = 1, lang, voiceURI, highlightText = false, highlightProps = { style: { backgroundColor: "yellow" } }, preserveUtteranceQueue = false, onError = console.error, onStart, onResume, onPause, onStop, onBoundary, onQueueChange, }) {
export function useSpeech({ text, pitch = 1, rate = 1, volume = 1, lang, voiceURI, highlightText = false, highlightProps, preserveUtteranceQueue = false, onError = console.error, onStart, onResume, onPause, onStop, onBoundary, onQueueChange, }) {
const [speechStatus, speechStatusRef, setSpeechStatus] = useStateRef("stopped");

@@ -122,3 +122,3 @@ const [speakingWord, setSpeakingWord] = useState();

element.slice(0, before),
React.createElement("span", Object.assign({}, highlightProps), element.slice(before, before + length)),
React.createElement("mark", Object.assign({}, highlightProps), element.slice(before, before + length)),
element.slice(before + length)));

@@ -125,0 +125,0 @@ }

{
"name": "react-text-to-speech",
"version": "0.14.4",
"version": "0.14.5",
"description": "An easy to use react component for the Web Speech API.",

@@ -5,0 +5,0 @@ "type": "module",

@@ -370,3 +370,3 @@ # react-text-to-speech

| `highlightText` | `boolean` | No | `false` | Whether the words in the text should be highlighted as they are read or not. |
| `highlightProps` | `React.DetailedHTMLProps` | No | `{ style: { backgroundColor: "yellow" } }` | Props to customise the highlighted word. |
| `highlightProps` | `React.DetailedHTMLProps` | No | - | Props to customize the highlighted word, typically applied to the `<mark>` tag. |
| `preserveUtteranceQueue` | `boolean` | No | `false` | Whether to maintain a queue of speech utterances (true) or clear previous utterances (false). |

@@ -373,0 +373,0 @@ | `onError` | [`SpeechSynthesisErrorHandler`](#speechsynthesiserrorhandler) | No | `console.error` | Function to be executed if browser doesn't support `Web Speech API`. |

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc