Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

punjabi-voice-search

Package Overview
Dependencies
Maintainers
0
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

punjabi-voice-search

This package will provide a microphone component that developer can simply import and use in their react apps. This component will return punjabi language transcript in two ways. Either full trancription or first letter of every word only.

  • 1.0.3
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
0
Weekly downloads
 
Created
Source

Returns punjabi language transcript using google speech-to-text api.

Install

Install with npm:

$ npm install punjabi-voice-search

Usage

Works with audioData in base64 string format.

import PunjabiVoiceSearch from 'punjabi-voice-search'; 

const [transcript, setTranscript] = useState<string | null>(null);

// Function to handle the transcript received from the API
const handleTranscript = (transcript: string) => {
  setTranscript(transcript);
  console.log("Transcript received:", transcript);
};

<PunjabiVoiceSearch
  initials={false} // Set to false for transcript-only mode
  onTranscript={handleTranscript} // Callback to get the transcript from API
/>

<PunjabiVoiceSearch
  initials={true} // Set to true for Gurbani search mode
  micSize={40} // Optional: Size of the microphone icon
  onTranscript={handleTranscript} // Callback to get the transcript from API
/>

Customization Of Component

interface Props {
    Mic?: React.ElementType;
    activeMicColor?: string;
    micDefaultColor?: string;
    micDefaultBGColor?: string;
    micActiveBGColor?: string;
    micSize?: number;
    borderRadius?: string;
    initials: boolean;
}

Input Parameters

Variable NameValue
audioDatastring: Audio Data in base64 format
initialsboolean: true or false

Return Value Based On "initials"

initialsReturn Value
truetranscript(string) First letter of each word in a variable called "transcript"
falsetranscript(string) Proper transcript in a variable called "transcript"

Authors

Dilraj Singh , Simarjot Singh

FAQs

Package last updated on 14 Oct 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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