npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

ngp-talkify

v2.4.0

Published

`NgpTalkify` is an Angular library that provides speech recognition, text-to-speech functionality, and persistent settings management. It offers an intuitive UI component and service utilities for seamless integration with your Angular applications.

Readme

NgpTalkify Library

NgpTalkify is an Angular library that provides speech recognition, text-to-speech functionality, and persistent settings management. It offers an intuitive UI component and service utilities for seamless integration with your Angular applications.

ngpTalkify


Features

  • Speech Recognition: Convert spoken words to text using the browser's microphone.
  • Text-to-Speech: Synthesize speech from text with configurable pitch, rate, and volume.
  • Persistent Settings: Store and retrieve user configurations using Local Storage, Session Storage, or Cookies.
  • Multilingual Support: Support for various languages in both recognition and synthesis.

Installation

To install the library, use npm:

npm install ngp-talkify

Usage

1. Import the Module

In your Angular application, import the NgpTalkifyModule in the desired module:

import { NgpTalkifyModule } from 'ngp-talkify';

@NgModule({
  declarations: [...],
  imports: [
    NgpTalkifyModule,
    ...
  ],
})
export class AppModule {}

2. Add the Component in HTML

Include the NgpTalkifyComponent in your template:

<lib-ngp-talkify (textProcessed)="onTextProcessed($event)"></lib-ngp-talkify>

Handle the textProcessed event in your component:

onTextProcessed(text: string | null): void {
  console.log('Processed Text:', text);
}

3. Service Usage

Inject NgpTalkifyService to utilize its functionalities:

import { NgpTalkifyService } from 'ngp-talkify';

constructor(private ngpTalkifyService: NgpTalkifyService) {}

ngOnInit() {
  this.ngpTalkifyService.getLanguages().subscribe(languages => {
    console.log('Available Languages:', languages);
  });
}

API Documentation

NgpTalkifyComponent

  • Inputs: None.

  • Outputs:

    • textProcessed: Emits processed text when recognition is complete.
  • Methods:

    • toggleRecognition(): Starts or stops speech recognition.
    • speakText(): Converts input text to speech.
    • togglePopup(): Shows or hides additional settings.
    • processText(): Processes the current input text.

NgpTalkifyService

  • Methods:
    • startRecognition(callback: (text: string) => void): Start speech recognition.
    • stopRecognition(): Stop speech recognition.
    • getLanguages(): Fetch supported languages for speech recognition.
    • getSpeechSettings(type: string): Fetch pitch, rate, and volume settings.
    • speakText(text: string): Speak the provided text.
    • loadSettings(): Load user settings from storage.

NgpWebStorageService

  • Methods:
    • setLocalStorage(key: string, value: ISettings | null): Save settings to Local Storage.
    • getLocalStorage(key: string): Retrieve settings from Local Storage.
    • setCookie(key: string, value: ISettings | null, expirationDays: number): Save settings in Cookies.
    • getCookie(key: string): Retrieve settings from Cookies.

Interfaces

ISettings

  • speechRecognitionLanguage: string: Selected recognition language.
  • speechSynthesisLanguage: string: Selected synthesis language.
  • speechSynthesisPitch: number: Pitch for speech synthesis.
  • speechSynthesisRate: number: Rate for speech synthesis.
  • speechSynthesisVolume: number: Volume for speech synthesis.

ISettingOption

  • key: string: Setting key.
  • value: number: Setting value.

Example

Here's a basic usage example:

import { Component } from '@angular/core';

@Component({
  selector: 'app-root',
  template: `
    <lib-ngp-talkify (textProcessed)="onTextProcessed($event)"></lib-ngp-talkify>
  `,
})
export class AppComponent {
  onTextProcessed(text: string | null): void {
    console.log('User Input:', text);
  }
}

License

This library is licensed under the MIT License.