GithubHelp home page GithubHelp logo

abogabogi / ayo-masak Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nahansans/ayo-masak

0.0 1.0 0.0 4.46 MB

JavaScript 0.82% TypeScript 89.09% Starlark 0.50% Java 5.21% Objective-C 3.69% Ruby 0.69%

ayo-masak's Introduction

ayo-masak

Known Library Issues

  1. jika mengalami problems Could not find a declaration file for module 'react-native-tts'. 'ayo-masak/node_modules/react-native-tts/index.js' implicitly has an 'any' type. Try `npm install @types/react-native-tts` if it exists or add a new declaration (.d.ts) file containing `declare module 'react-native-tts';`
  2. silahkan buat file index.d.ts di folder node_modules/react-native-tts/
  3. silahkan copy script di bawah ini di file index.d.ts
declare module 'react-native-tts' {
  type SupportedEventsT =
    | 'tts-start'
    | 'tts-finish'
    | 'tts-pause'
    | 'tts-resume'
    | 'tts-progress'
    | 'tts-cancel';

  export class ReactNativeTTS {
    /**
     * getInitStatus
     * Android only, stubbed for iOS
     */
    getInitStatus: () => Promise<boolean>;

    /**
     * requestInstallEngine
     * Android only, stubbed for iOS
     */
    requestInstallEngine: () => Promise<boolean>;

    /**
     * requestInstallData
     * Android only, stubbed for iOS
     */
    requestInstallData: () => Promise<boolean>;

    /**
     * setDucking
     */
    setDucking: (enabled: boolean) => Promise<'success'>;
    // setDucking(enabled) {
    //   return TextToSpeech.setDucking(enabled);
    // }

    /**
     * setDefaultEngine
     * Android only, stubbed for iOS
     */
    setDefaultEngine: (engineName: string) => Promise<boolean>;

    /**
     * setDefaultVoice
     */
    setDefaultVoice: (
      voiceId: string,
    ) => Promise<
      'success' | 'lang_country_available' | 'lang_country_var_available'
    >;

    /**
     * setDefaultRate
     */
    setDefaultRate: (rate: number, skipTransform: boolean) => Promise<null>;

    /**
     * setDefaultPitch
     */
    setDefaultPitch: (pitch: number) => Promise<null>;

    /**
     * setDefaultLanguage
     */
    setDefaultLanguage: (
      language: string,
    ) => Promise<
      'success' | 'lang_country_available' | 'lang_country_var_available'
    >;

    /**
     * setIgnoreSilentSwitch
     * iOS only, stubbed for Android
     */
    setIgnoreSilentSwitch: (
      ignoreSilentSwitch: 'ignore' | 'obey',
    ) => Promise<'success'>;

    /**
     * voices
     */
    voices: () => Promise<
      Array<{
        id: string;
        name: string; // ios only
        language: string;
        quality: number;
      }>
    >;

    /**
     * engines
     * Android only, stubbed for iOS
     */
    engines: () => Promise<
      Array<{
        name: string;
        label: string;
        default: boolean;
        icon: number;
      }>
    >;

    /**
     * speak
     */
    speak: (
      utterance: string,
      options?: Partial<{
        rate: number;
        voiceId: string;
        androidParams: Partial<{
          KEY_PARAM_PAN: number;
          KEY_PARAM_VOLUME: number;
          KEY_PARAM_STREAM: string;
        }>;
      }>,
    ) => Promise<string>;

    /**
     * resume
     */
    stop: (onWordBoundary?: boolean) => Promise<boolean>;

    /**
     * pause
     * iOS only, stubbed for Android
     */
    pause: (onWordBoundary?: boolean) => Promise<boolean>;

    /**
     * resume
     * iOS only, stubbed for Android
     */
    resume: () => Promise<boolean>;

    addEventListener: (type: SupportedEventsT, handler: () => void) => void;

    removeEventListener: (type: SupportedEventsT, handler: () => void) => void;
  }

  const tts: ReactNativeTTS;
  export default tts;
}

ayo-masak's People

Contributors

nahansans avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.