All Downloads are FREE. Search and download functionalities are using the official Maven repository.

js.web.webspeech.SpeechRecognition Maven / Gradle / Ivy

package js.web.webspeech;

import js.web.dom.*;
import org.teavm.jso.JSBody;
import org.teavm.jso.JSProperty;

import javax.annotation.Nullable;

/**
 * Created by Artem Godin on 1/23/2020.
 */
public interface SpeechRecognition extends EventTarget {
    @JSBody(script = "return SpeechRecognition.prototype")
    static SpeechRecognition prototype() {
        throw new UnsupportedOperationException("Available only in JavaScript");
    }

    @JSBody(script = "return new SpeechRecognition()")
    static SpeechRecognition create() {
        throw new UnsupportedOperationException("Available only in JavaScript");
    }

    @JSProperty
    boolean isContinuous();

    @JSProperty
    void setContinuous(boolean continuous);

    @JSProperty
    SpeechGrammarList getGrammars();

    @JSProperty
    void setGrammars(SpeechGrammarList grammars);

    @JSProperty
    boolean isInterimResults();

    @JSProperty
    void setInterimResults(boolean interimResults);

    @JSProperty
    String getLang();

    @JSProperty
    void setLang(String lang);

    @JSProperty
    double getMaxAlternatives();

    @JSProperty
    void setMaxAlternatives(double maxAlternatives);

    @JSProperty
    @Nullable
    EventListener getOnaudioend();

    @JSProperty
    void setOnaudioend(EventListener onaudioend);

    default void addAudioEndEventListener(EventListener listener, AddEventListenerOptions options) {
        addEventListener("audioend", listener, options);
    }

    default void addAudioEndEventListener(EventListener listener, boolean options) {
        addEventListener("audioend", listener, options);
    }

    default void addAudioEndEventListener(EventListener listener) {
        addEventListener("audioend", listener);
    }

    default void removeAudioEndEventListener(EventListener listener, EventListenerOptions options) {
        removeEventListener("audioend", listener, options);
    }

    default void removeAudioEndEventListener(EventListener listener, boolean options) {
        removeEventListener("audioend", listener, options);
    }

    default void removeAudioEndEventListener(EventListener listener) {
        removeEventListener("audioend", listener);
    }

    @JSProperty
    @Nullable
    EventListener getOnaudiostart();

    @JSProperty
    void setOnaudiostart(EventListener onaudiostart);

    default void addAudioStartEventListener(EventListener listener, AddEventListenerOptions options) {
        addEventListener("audiostart", listener, options);
    }

    default void addAudioStartEventListener(EventListener listener, boolean options) {
        addEventListener("audiostart", listener, options);
    }

    default void addAudioStartEventListener(EventListener listener) {
        addEventListener("audiostart", listener);
    }

    default void removeAudioStartEventListener(EventListener listener, EventListenerOptions options) {
        removeEventListener("audiostart", listener, options);
    }

    default void removeAudioStartEventListener(EventListener listener, boolean options) {
        removeEventListener("audiostart", listener, options);
    }

    default void removeAudioStartEventListener(EventListener listener) {
        removeEventListener("audiostart", listener);
    }

    @JSProperty
    @Nullable
    EventListener getOnend();

    @JSProperty
    void setOnend(EventListener onend);

    default void addEndEventListener(EventListener listener, AddEventListenerOptions options) {
        addEventListener("end", listener, options);
    }

    default void addEndEventListener(EventListener listener, boolean options) {
        addEventListener("end", listener, options);
    }

    default void addEndEventListener(EventListener listener) {
        addEventListener("end", listener);
    }

    default void removeEndEventListener(EventListener listener, EventListenerOptions options) {
        removeEventListener("end", listener, options);
    }

    default void removeEndEventListener(EventListener listener, boolean options) {
        removeEventListener("end", listener, options);
    }

    default void removeEndEventListener(EventListener listener) {
        removeEventListener("end", listener);
    }

    @JSProperty
    @Nullable
    EventListener getOnerror();

    @JSProperty
    void setOnerror(EventListener onerror);

    default void addErrorEventListener(EventListener listener, AddEventListenerOptions options) {
        addEventListener("error", listener, options);
    }

    default void addErrorEventListener(EventListener listener, boolean options) {
        addEventListener("error", listener, options);
    }

    default void addErrorEventListener(EventListener listener) {
        addEventListener("error", listener);
    }

    default void removeErrorEventListener(EventListener listener, EventListenerOptions options) {
        removeEventListener("error", listener, options);
    }

    default void removeErrorEventListener(EventListener listener, boolean options) {
        removeEventListener("error", listener, options);
    }

    default void removeErrorEventListener(EventListener listener) {
        removeEventListener("error", listener);
    }

    @JSProperty
    @Nullable
    EventListener getOnresult();

    @JSProperty
    void setOnresult(EventListener onresult);

    default void addResultEventListener(EventListener listener, AddEventListenerOptions options) {
        addEventListener("result", listener, options);
    }

    default void addResultEventListener(EventListener listener, boolean options) {
        addEventListener("result", listener, options);
    }

    default void addResultEventListener(EventListener listener) {
        addEventListener("result", listener);
    }

    default void removeResultEventListener(EventListener listener, EventListenerOptions options) {
        removeEventListener("result", listener, options);
    }

    default void removeResultEventListener(EventListener listener, boolean options) {
        removeEventListener("result", listener, options);
    }

    default void removeResultEventListener(EventListener listener) {
        removeEventListener("result", listener);
    }

    @JSProperty
    @Nullable
    EventListener getOnnomatch();

    @JSProperty
    void setOnnomatch(EventListener onnomatch);

    default void addNoMatchEventListener(EventListener listener, AddEventListenerOptions options) {
        addEventListener("nomatch", listener, options);
    }

    default void addNoMatchEventListener(EventListener listener, boolean options) {
        addEventListener("nomatch", listener, options);
    }

    default void addNoMatchEventListener(EventListener listener) {
        addEventListener("nomatch", listener);
    }

    default void removeNoMatchEventListener(EventListener listener, EventListenerOptions options) {
        removeEventListener("nomatch", listener, options);
    }

    default void removeNoMatchEventListener(EventListener listener, boolean options) {
        removeEventListener("nomatch", listener, options);
    }

    default void removeNoMatchEventListener(EventListener listener) {
        removeEventListener("nomatch", listener);
    }

    @JSProperty
    @Nullable
    EventListener getOnsoundend();

    @JSProperty
    void setOnsoundend(EventListener onsoundend);

    default void addSoundEndEventListener(EventListener listener, AddEventListenerOptions options) {
        addEventListener("soundend", listener, options);
    }

    default void addSoundEndEventListener(EventListener listener, boolean options) {
        addEventListener("soundend", listener, options);
    }

    default void addSoundEndEventListener(EventListener listener) {
        addEventListener("soundend", listener);
    }

    default void removeSoundEndEventListener(EventListener listener, EventListenerOptions options) {
        removeEventListener("soundend", listener, options);
    }

    default void removeSoundEndEventListener(EventListener listener, boolean options) {
        removeEventListener("soundend", listener, options);
    }

    default void removeSoundEndEventListener(EventListener listener) {
        removeEventListener("soundend", listener);
    }

    @JSProperty
    @Nullable
    EventListener getOnsoundstart();

    @JSProperty
    void setOnsoundstart(EventListener onsoundstart);

    default void addSoundStartEventListener(EventListener listener, AddEventListenerOptions options) {
        addEventListener("soundstart", listener, options);
    }

    default void addSoundStartEventListener(EventListener listener, boolean options) {
        addEventListener("soundstart", listener, options);
    }

    default void addSoundStartEventListener(EventListener listener) {
        addEventListener("soundstart", listener);
    }

    default void removeSoundStartEventListener(EventListener listener, EventListenerOptions options) {
        removeEventListener("soundstart", listener, options);
    }

    default void removeSoundStartEventListener(EventListener listener, boolean options) {
        removeEventListener("soundstart", listener, options);
    }

    default void removeSoundStartEventListener(EventListener listener) {
        removeEventListener("soundstart", listener);
    }

    @JSProperty
    @Nullable
    EventListener getOnspeechend();

    @JSProperty
    void setOnspeechend(EventListener onspeechend);

    default void addSpeechEndEventListener(EventListener listener, AddEventListenerOptions options) {
        addEventListener("speechend", listener, options);
    }

    default void addSpeechEndEventListener(EventListener listener, boolean options) {
        addEventListener("speechend", listener, options);
    }

    default void addSpeechEndEventListener(EventListener listener) {
        addEventListener("speechend", listener);
    }

    default void removeSpeechEndEventListener(EventListener listener, EventListenerOptions options) {
        removeEventListener("speechend", listener, options);
    }

    default void removeSpeechEndEventListener(EventListener listener, boolean options) {
        removeEventListener("speechend", listener, options);
    }

    default void removeSpeechEndEventListener(EventListener listener) {
        removeEventListener("speechend", listener);
    }

    @JSProperty
    @Nullable
    EventListener getOnspeechstart();

    @JSProperty
    void setOnspeechstart(EventListener onspeechstart);

    default void addSpeechStartEventListener(EventListener listener, AddEventListenerOptions options) {
        addEventListener("speechstart", listener, options);
    }

    default void addSpeechStartEventListener(EventListener listener, boolean options) {
        addEventListener("speechstart", listener, options);
    }

    default void addSpeechStartEventListener(EventListener listener) {
        addEventListener("speechstart", listener);
    }

    default void removeSpeechStartEventListener(EventListener listener, EventListenerOptions options) {
        removeEventListener("speechstart", listener, options);
    }

    default void removeSpeechStartEventListener(EventListener listener, boolean options) {
        removeEventListener("speechstart", listener, options);
    }

    default void removeSpeechStartEventListener(EventListener listener) {
        removeEventListener("speechstart", listener);
    }

    @JSProperty
    @Nullable
    EventListener getOnstart();

    @JSProperty
    void setOnstart(EventListener onstart);

    default void addStartEventListener(EventListener listener, AddEventListenerOptions options) {
        addEventListener("start", listener, options);
    }

    default void addStartEventListener(EventListener listener, boolean options) {
        addEventListener("start", listener, options);
    }

    default void addStartEventListener(EventListener listener) {
        addEventListener("start", listener);
    }

    default void removeStartEventListener(EventListener listener, EventListenerOptions options) {
        removeEventListener("start", listener, options);
    }

    default void removeStartEventListener(EventListener listener, boolean options) {
        removeEventListener("start", listener, options);
    }

    default void removeStartEventListener(EventListener listener) {
        removeEventListener("start", listener);
    }

    @JSProperty
    String getServiceURI();

    @JSProperty
    void setServiceURI(String serviceURI);

    void abort();

    void start();

    void stop();

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy