kamiazya/ngx-speech-recognition

View on GitHub

Showing 35 of 40 total issues

Similar blocks of code found in 6 locations. Consider refactoring.
Open

  set grammars(grammars: SpeechGrammarListType) {
    this._grammars = grammars;
    if (this._grammars !== undefined && this._grammars != null && this.internal) {
      this.internal.grammars = this._grammars;
    }
projects/ngx-speech-recognition/src/lib/service/speech-recognition.common.ts on lines 57..62
projects/ngx-speech-recognition/src/lib/service/speech-recognition.common.ts on lines 73..78
projects/ngx-speech-recognition/src/lib/service/speech-recognition.common.ts on lines 91..96
projects/ngx-speech-recognition/src/lib/service/speech-recognition.common.ts on lines 108..113
projects/ngx-speech-recognition/src/lib/service/speech-recognition.common.ts on lines 128..133

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 69.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 6 locations. Consider refactoring.
Open

  set serviceURI(serviceURI: string) {
    this._serviceURI = serviceURI;
    if (this._serviceURI !== undefined && this._serviceURI != null && this.internal) {
      this.internal.serviceURI = this._serviceURI;
    }
projects/ngx-speech-recognition/src/lib/service/speech-recognition.common.ts on lines 36..41
projects/ngx-speech-recognition/src/lib/service/speech-recognition.common.ts on lines 57..62
projects/ngx-speech-recognition/src/lib/service/speech-recognition.common.ts on lines 73..78
projects/ngx-speech-recognition/src/lib/service/speech-recognition.common.ts on lines 91..96
projects/ngx-speech-recognition/src/lib/service/speech-recognition.common.ts on lines 108..113

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 69.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 6 locations. Consider refactoring.
Open

  set maxAlternatives(maxAlternatives: number) {
    this._maxAlternatives = maxAlternatives;
    if (this._maxAlternatives !== undefined && this._maxAlternatives != null && this.internal) {
      this.internal.maxAlternatives = this._maxAlternatives;
    }
projects/ngx-speech-recognition/src/lib/service/speech-recognition.common.ts on lines 36..41
projects/ngx-speech-recognition/src/lib/service/speech-recognition.common.ts on lines 57..62
projects/ngx-speech-recognition/src/lib/service/speech-recognition.common.ts on lines 73..78
projects/ngx-speech-recognition/src/lib/service/speech-recognition.common.ts on lines 91..96
projects/ngx-speech-recognition/src/lib/service/speech-recognition.common.ts on lines 128..133

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 69.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 6 locations. Consider refactoring.
Open

  set lang(lang: string) {
    this._lang = lang;
    if (this._lang !== undefined && this._lang != null && this.internal) {
      this.internal.lang = this._lang;
    }
projects/ngx-speech-recognition/src/lib/service/speech-recognition.common.ts on lines 36..41
projects/ngx-speech-recognition/src/lib/service/speech-recognition.common.ts on lines 73..78
projects/ngx-speech-recognition/src/lib/service/speech-recognition.common.ts on lines 91..96
projects/ngx-speech-recognition/src/lib/service/speech-recognition.common.ts on lines 108..113
projects/ngx-speech-recognition/src/lib/service/speech-recognition.common.ts on lines 128..133

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 69.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 6 locations. Consider refactoring.
Open

  set interimResults(interimResults: boolean) {
    this._interimResults = interimResults;
    if (this._interimResults !== undefined && this._interimResults != null && this.internal) {
      this.internal.interimResults = this._interimResults;
    }
projects/ngx-speech-recognition/src/lib/service/speech-recognition.common.ts on lines 36..41
projects/ngx-speech-recognition/src/lib/service/speech-recognition.common.ts on lines 57..62
projects/ngx-speech-recognition/src/lib/service/speech-recognition.common.ts on lines 73..78
projects/ngx-speech-recognition/src/lib/service/speech-recognition.common.ts on lines 108..113
projects/ngx-speech-recognition/src/lib/service/speech-recognition.common.ts on lines 128..133

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 69.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 6 locations. Consider refactoring.
Open

  set continuous(continuous: boolean) {
    this._continuous = continuous;
    if (this._continuous !== undefined && this._continuous != null && this.internal) {
      this.internal.continuous = this._continuous;
    }
projects/ngx-speech-recognition/src/lib/service/speech-recognition.common.ts on lines 36..41
projects/ngx-speech-recognition/src/lib/service/speech-recognition.common.ts on lines 57..62
projects/ngx-speech-recognition/src/lib/service/speech-recognition.common.ts on lines 91..96
projects/ngx-speech-recognition/src/lib/service/speech-recognition.common.ts on lines 108..113
projects/ngx-speech-recognition/src/lib/service/speech-recognition.common.ts on lines 128..133

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 69.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    this.service.onresult = (e) => {
      this.message = e.results[0].item(0).transcript;
      console.log('SubComponent:onresult', this.message, e);
    };
Severity: Major
Found in src/demo/sub/components/sub/sub.component.ts and 1 other location - About 1 hr to fix
src/demo/components/main/main.component.ts on lines 31..34

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 69.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    this.service.onresult = (e) => {
      this.message = e.results[0].item(0).transcript;
      console.log('MainComponent:onresult', this.message, e);
    };
Severity: Major
Found in src/demo/components/main/main.component.ts and 1 other location - About 1 hr to fix
src/demo/sub/components/sub/sub.component.ts on lines 55..58

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 69.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

  set onsoundend(handler: (ev: Event) => any) {
    this.soundendHandler = handler;
  }
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 199..201
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 211..213
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 223..225

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 54.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

  set onspeechstart(handler: (ev: Event) => any) {
    this.speechstartHandler = handler;
  }
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 199..201
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 223..225
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 235..237

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 54.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

  set onspeechend(handler: (ev: Event) => any) {
    this.speechendHandler = handler;
  }
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 199..201
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 211..213
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 235..237

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 54.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

  set onsoundstart(handler: (ev: Event) => any) {
    this.soundstartHandler = handler;
  }
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 211..213
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 223..225
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 235..237

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 54.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 11 locations. Consider refactoring.
Open

    this.internal.onaudioend = (e: Event) => {
      this.audioendHandler(e);
      this.ref.tick();
    };
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 69..72
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 73..76
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 77..80
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 81..84
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 85..88
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 93..96
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 97..100
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 101..104
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 105..108
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 109..112

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 52.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 11 locations. Consider refactoring.
Open

    this.internal.onend = (e: Event) => {
      this.endHandler(e);
      this.ref.tick();
    };
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 69..72
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 73..76
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 77..80
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 81..84
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 85..88
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 89..92
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 93..96
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 97..100
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 101..104
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 105..108

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 52.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 11 locations. Consider refactoring.
Open

    this.internal.onsoundstart = (e: Event) => {
      this.soundstartHandler(e);
      this.ref.tick();
    };
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 69..72
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 77..80
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 81..84
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 85..88
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 89..92
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 93..96
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 97..100
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 101..104
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 105..108
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 109..112

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 52.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 11 locations. Consider refactoring.
Open

    this.internal.onspeechend = (e: Event) => {
      this.speechendHandler(e);
      this.ref.tick();
    };
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 69..72
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 73..76
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 77..80
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 85..88
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 89..92
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 93..96
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 97..100
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 101..104
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 105..108
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 109..112

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 52.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 11 locations. Consider refactoring.
Open

    this.internal.onstart = (e: Event) => {
      this.startHandler(e);
      this.ref.tick();
    };
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 69..72
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 73..76
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 77..80
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 81..84
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 85..88
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 89..92
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 93..96
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 97..100
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 101..104
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 109..112

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 52.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 11 locations. Consider refactoring.
Open

    this.internal.onspeechstart = (e: Event) => {
      this.speechstartHandler(e);
      this.ref.tick();
    };
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 69..72
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 73..76
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 81..84
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 85..88
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 89..92
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 93..96
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 97..100
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 101..104
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 105..108
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 109..112

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 52.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 11 locations. Consider refactoring.
Open

    this.internal.onaudiostart = (e: Event) => {
      this.audiostartHandler(e);
      this.ref.tick();
    };
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 73..76
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 77..80
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 81..84
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 85..88
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 89..92
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 93..96
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 97..100
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 101..104
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 105..108
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 109..112

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 52.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 11 locations. Consider refactoring.
Open

    this.internal.onresult = (e: SpeechRecognitionEvent) => {
      this.resultHandler(e);
      this.ref.tick();
    };
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 69..72
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 73..76
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 77..80
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 81..84
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 85..88
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 89..92
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 97..100
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 101..104
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 105..108
projects/ngx-speech-recognition/src/lib/service/speech-recognition.service.ts on lines 109..112

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 52.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Severity
Category
Status
Source
Language