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 - npm Package Compare versions

Comparing version 2.0.2 to 2.0.4

0

dist/index.js
import PunjabiVoiceSearch from './PunjabiVoiceSearch';
export { PunjabiVoiceSearch };

@@ -0,0 +0,0 @@ import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";

import PunjabiVoiceSearch from './PunjabiVoiceSearch';
export { PunjabiVoiceSearch };

@@ -0,0 +0,0 @@ import React from "react";

declare const _default: import("vite").UserConfig;
export default _default;

@@ -0,0 +0,0 @@ import { defineConfig } from "vite";

3

package.json
{
"name": "punjabi-voice-search",
"version": "2.0.2",
"version": "2.0.4",
"description": "Returns punjabi language transcript using google speech-to-text api.",

@@ -29,2 +29,3 @@ "main": "dist/punjabi-voice-search.cjs.js",

"devDependencies": {
"@types/node": "^22.7.5",
"@types/react": "^18.0.27",

@@ -31,0 +32,0 @@ "@types/react-dom": "^18.0.10",

@@ -17,25 +17,44 @@ # Punjabi Voice Search

Works with audioData in base64 string format.
```js
import PunjabiVoiceSearch from 'punjabi-voice-search';
import React, { useState } from 'react';
import PunjabiVoiceSearch from 'punjabi-voice-search'; // Import from your package
const [transcript, setTranscript] = useState<string | null>(null);
const App: React.FC = () => {
const [transcript, setTranscript] = useState<string>(''); // For managing transcript state
// Function to handle the transcript received from the API
const handleTranscript = (transcript: string) => {
setTranscript(transcript);
console.log("Transcript received:", transcript);
return (
<div>
<h1>Punjabi Voice Search Example</h1>
{/* Using PunjabiVoiceSearch with initials as false */}
<h2>Transcript Mode</h2>
<PunjabiVoiceSearch
initials={false} // Transcript mode
micSize={40}
state={transcript} // Pass transcript state
setState={setTranscript} // Set transcript state
/>
{/* Using PunjabiVoiceSearch with initials as true */}
<h2>Gurbani Mode</h2>
<PunjabiVoiceSearch
initials={true} // Gurbani search mode
micSize={40}
state={transcript} // Pass transcript state
setState={setTranscript} // Set transcript state
/>
{/* Displaying the transcript */}
{transcript && (
<div>
<h3>Transcript Output:</h3>
<p>{transcript}</p>
</div>
)}
</div>
);
};
<PunjabiVoiceSearch
initials={false} // Set to false for transcript-only mode
onTranscript={handleTranscript} // Callback to get the transcript from API
/>
export default App;
<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
/>
```

@@ -42,0 +61,0 @@

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