React Native TTS - Set default Voice
I have some trouble using React Native library for Text To Speech. https://www.npmjs.com/package/react-native-tts
I was not able to choice Italian Voices different than Alice. On the iPhone (iOS 14+) were listed : Alice, Federica, Luca, but on the library is present only Alice.
How can I solve this problem and select the other voices ?
do you know?
how many words do you know
See also questions close to this topic
-
Command failed: xcrun instruments -s
I want to run my react native app on a real ios device with this line :
npx react-native run-ios --udid SOME-UDID
but i got this error :
xcrun: error: sh -c '/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -find instruments 2> /dev/null' failed with exit code 17664: (null) (errno=No such file or directory) xcrun: error: unable to find utility "instruments", not a developer tool or in PATH error Command failed: xcrun instruments -s xcrun: error: sh -c '/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -find instruments 2> /dev/null' failed with exit code 17664: (null) (errno=No such file or directory) xcrun: error: unable to find utility "instruments", not a developer tool or in PATH
everything is ok on simulator
I'm using XCODE 13
-
IOS Launcher in android studio
I'm trying to change the whole Android OS installed app icons into IOS icons, please help me with the proper code or library for android kotlin
-
Debugging undefined is not an object (evaluating 'Object.keys(routeConfigs)')
I'm using Expo and React Native to create a simple iOS app. I am currently getting this error and have no idea how to fix it. I've tried various other solutions on Stack Overflow to no avail.
My code is:
import 'react-native-gesture-handler'; import React from 'react'; import { createStackNavigator } from 'react-navigation-stack'; import { NavigationContainer } from '@react-navigation/native'; import HomeScreen from './src/screens/HomeScreen'; const Stack = createStackNavigator(); export default function App() { return ( <NavigationContainer> <Stack.Navigator> <Stack.Screen name="Home" component={HomeScreen} /> </Stack.Navigator> </NavigationContainer> ); }
Here is my
HomeScreen.js
import React from 'react'; import { Text, View } from 'react-native'; export default function HomeScreen () { return ( <View> <Text>Welcome Home!</Text> </View> ) }
My packages:
"packages": { "": { "name": "safey", "version": "1.0.0", "dependencies": { "@react-native-community/masked-view": "^0.1.11", "@react-navigation/native": "^6.0.10", "@react-navigation/stack": "^6.0.10", "expo": "~45.0.0", "expo-splash-screen": "~0.15.1", "expo-status-bar": "~1.3.0", "react": "17.0.2", "react-dom": "17.0.2", "react-native": "0.68.1", "react-native-gesture-handler": "^2.4.2", "react-native-reanimated": "^2.8.0", "react-native-safe-area-context": "^4.2.5", "react-native-screens": "^3.13.1", "react-native-web": "0.17.7", "react-navigation": "^4.4.4", "react-navigation-stack": "^2.10.4" },
-
how to change prettier format for react native
my code formatting prettier didn't works well for react native, i don't understand where to config it but it works well with flutter
from this code
import { View, Text } from 'react-native' import React from 'react' export default function App() { return ( <View> <Text>Apps</Text> </View> ) }
it's formatted to this
import { View, Text } from 'react-native' import React from 'react' export default function App() { return ( < View > < Text > Apps < /Text> < /View> ) }
-
How to maintain global states created dynamically
I am trying to Display list of items with then name and button to download its respective file Same list are available in different other screens. When I click on download
State info sharing: It should start download and the state/progress of the download should be visible to same item available in different other screens.unique identifier is item id
There can be parallel downloads
Problem statement:
- Unable to share the information for same item if we use state within the same item
- On use of redux its solving problem 1 however Parallel download information is getting overwritten as its writing to same reducer state
Any idea or approach is appreciated. Thanks
-
Avoid using deprecated API for UtteranceProgressListener
I am using android.speech.tts.TextToSpeech and would like to have an UtteranceProgressListener that does not override the deprecated onError but rather uses the recommended onError instead. Does anyone know how to do that? I want to avoid using a deprecated API in my app.
Building using Android Studio and without overriding the deprecated onError tells me that my Fragment "is not abstract and does not override abstract method onError(String) in UtteranceProgressListener". My current solution looks like this:
private final UtteranceProgressListener utteranceProgressListener = new UtteranceProgressListener() { /** * Called when an utterance "starts" as perceived by the caller. This will * be soon before audio is played back in the case of a {@link TextToSpeech#speak} * or before the first bytes of a file are written to the file system in the case * of {@link TextToSpeech#synthesizeToFile}. * * @param utteranceId The utterance ID of the utterance. */ @Override public void onStart(String utteranceId) { } /** * Called when an utterance has successfully completed processing. * All audio will have been played back by this point for audible output, and all * output will have been written to disk for file synthesis requests. * <p> * This request is guaranteed to be called after {@link #onStart(String)}. * * @param utteranceId The utterance ID of the utterance. */ @Override public void onDone(String utteranceId) { } /** * Called when an error has occurred during processing. This can be called * at any point in the synthesis process. Note that there might be calls * to {@link #onStart(String)} for specified utteranceId but there will never * be a call to both {@link #onDone(String)} and {@link #onError(String)} for * the same utterance. * * @param utteranceId The utterance ID of the utterance. * @deprecated Use {@link #onError(String, int)} instead */ @Override public void onError(String utteranceId) { } @Override public void onError(String utteranceId, final int errorCode) { } };
I looked here but was unable to see an improvement to my current solution.
-
MS Azure cognitive services Text-to-Speech: unable to delete more than 200 files at once
I am using the online tool for audio content creation (MS Azure cognitive services; text-to-speech). I can sucessufully upload huge batches of txt files, create and download the MP3 files, but I find no way to delete more than 200 files at once. There is no way to delete a folder containing more than 200 files either. No settings to change that limit, no FAQs from Microsoft. Seems like nobody else ever created thousands of speech files with that tool. Any ideas how to bypass that limit? Thanks a lot in advance
-
SpeechSynthesisUtterance detect onend when only speaking completes once not on cancel
I am using
window.SpeechSynthesisUtterance
API and I found out when you callwindow.speechSynthesis.cancel()
it immediately also callsonend
event. I want to do something specific only when the speaking ends but not when the utterance is canceled while it is being spoken.How do I detect if speaking ended due to a cancel method call?
The
onend
event gives and event object:
onend = event => { }
But in both cases when the speech ends or is canceled the
event.type
is'end'
.