Skip to content

Commit

Permalink
Merge pull request #131 from lucascicco/fix-typos
Browse files Browse the repository at this point in the history
Fixes typos in actions and speech recognition files
  • Loading branch information
JamesBrill authored Dec 4, 2021
2 parents 2641a87 + 4f71bf1 commit 8ecb605
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions src/SpeechRecognition.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
compareTwoStringsUsingDiceCoefficient,
browserSupportsPolyfills
} from './utils'
import { clearTrancript, appendTrancript } from './actions'
import { clearTranscript, appendTranscript } from './actions'
import { transcriptReducer } from './reducers'
import RecognitionManager from './RecognitionManager'
import isAndroid from './isAndroid'
Expand Down Expand Up @@ -35,13 +35,13 @@ const useSpeechRecognition = ({
const commandsRef = useRef(commands)
commandsRef.current = commands

const clearTranscript = () => {
dispatch(clearTrancript())
const dispatchClearTranscript = () => {
dispatch(clearTranscript())
}

const resetTranscript = useCallback(() => {
recognitionManager.resetTranscript()
clearTranscript()
dispatchClearTranscript()
}, [recognitionManager])

const testFuzzyMatch = (command, input, fuzzyMatchingThreshold) => {
Expand Down Expand Up @@ -116,7 +116,7 @@ const useSpeechRecognition = ({
const handleTranscriptChange = useCallback(
(newInterimTranscript, newFinalTranscript) => {
if (transcribing) {
dispatch(appendTrancript(newInterimTranscript, newFinalTranscript))
dispatch(appendTranscript(newInterimTranscript, newFinalTranscript))
}
matchCommands(newInterimTranscript, newFinalTranscript)
}, [matchCommands, transcribing]
Expand All @@ -125,7 +125,7 @@ const useSpeechRecognition = ({
const handleClearTranscript = useCallback(
() => {
if (clearTranscriptOnListen) {
clearTranscript()
dispatchClearTranscript()
}
}, [clearTranscriptOnListen]
)
Expand Down
4 changes: 2 additions & 2 deletions src/actions.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { CLEAR_TRANSCRIPT, APPEND_TRANSCRIPT } from './constants'

export const clearTrancript = () => {
export const clearTranscript = () => {
return { type: CLEAR_TRANSCRIPT }
}

export const appendTrancript = (interimTranscript, finalTranscript) => {
export const appendTranscript = (interimTranscript, finalTranscript) => {
return {
type: APPEND_TRANSCRIPT,
payload: {
Expand Down

0 comments on commit 8ecb605

Please sign in to comment.