Text To Speech (TTS) and Audio file with NativeScript
In my game - My first game (game for children), that created with NativeScript, I use audio and speak services. The NativeScript is platform that use to develop an android (or IOS) app with angular and TypeScript. Here is the class the use for Audio and Speak with NativeScript. The speak if Text To Speech (TTS) from google. The audio is mp3 file import { TNSTextToSpeech , SpeakOptions } from "nativescript-texttospeech" ; import { TNSPlayer , AudioPlayerOptions } from "nativescript-audio-player" ; import * as timer from "tns-core-modules/timer" ; import { Injectable } from "@angular/core" ; import * as firebase from "nativescript-plugin-firebase" ; @ Injectable ({ providedIn : "root" , }) export class AudioAndSpeak { public audioTrackDuration : ...