Comments (14)
@EmilAlipiev try 3.3.1 here in a few mins
from texttospeechplugin.
Could you add following details to the bug report?
Bug Information
Version Number of Plugin:
Device Tested On:
Simulator Tested On:
Version of VS:
Version of Xamarin:
Versions of other things you are using:
Steps to reproduce the Behavior
Expected Behavior
Actual Behavior
Code snippet
Screenshotst
from texttospeechplugin.
I have fixed UWP, however as documented the volume has no impact on Android as there is No API to do it.
from texttospeechplugin.
I actually got something working now for Android :)
from texttospeechplugin.
Can you help me correct this Android C# syntax? The following has the same problem on android. It plays at full volume even though the volume is set to zero:
Bundle b = new Bundle();
b.PutFloat(key: "KEY_PARAM_VOLUME", value: 0);
speaker = new TextToSpeech(Android.App.Application.Context, this);
speaker.Speak("hello", QueueMode.Flush, b, null);
from texttospeechplugin.
on Uwp desktop I am not getting any sound although it says IsSupported=true, is there something special need to be done. it was working before with old version of the package. i updated without code change and it works on android but uwp, no sound.
I simply do
await Plugin.TextToSpeech.CrossTextToSpeech.Current.Speak(textToSpeech, crossLocale: Helpers.Settings.CurrentLocale, cancelToken: ct);
from texttospeechplugin.
@EmilAlipiev good one. fixed it now in 3.2.1
from texttospeechplugin.
kudos ... the following is working on windows phone and android now:
await CrossTextToSpeech.Current.Speak(text:s, volume: 0.2f);
from texttospeechplugin.
You are changing the master volume of the phone, and not restoring it to what it was prior to the call. I cannot use the plugin as it stands.
from texttospeechplugin.
I am setting the Music volume, not the phone volume: am.GetStreamMaxVolume(Stream.Music);
Would also appreciate if you wrote literally anything constructive here at all and not attempt to write in a way that puts down contributors.
What is your "work around" to setting audio and what is the proposed way that you would like for it to work. Android works very different then iOS/Windows as you can't set the volume of the specific stream.
from texttospeechplugin.
I was hoping your plugin would enable me to adjust the volume the way I do in Android Studio. Here is the code:
private TextToSpeech tts;
public void speakthetext2(String s) {
final String msg = s;
tts = new TextToSpeech(getApplicationContext(), new TextToSpeech.OnInitListener() {
@Override
public void onInit(int status) {
if (status != TextToSpeech.ERROR) {
Bundle b = new Bundle();
b.putFloat(KEY_PARAM_VOLUME, 0.2f);
tts.speak(msg, TextToSpeech.QUEUE_ADD, b, "1");
} else {
Toast.makeText(getApplicationContext(), "tts error!", Toast.LENGTH_LONG).show();
}
}
});
}
I was hoping for a cross plaform plugin that would enable me to adjust the volume as above for the text message being spoken in my app.
from texttospeechplugin.
Got it, see that wasn't too hard to explain what you actually wanted it to do and how you were able to accomplish this in java.
So, I have adjust the functionality. If you pass in "null" or don't set the volume it will use the system defaults for whatever the OS decides, which is probably 100%. If you do pass it in then I will set the specific stream's audio on all OS's to use the volume that you pass in.
Since this is a tweak and I need to test a bit more I have a pre-release nuget that you can use: 3.3.0.X-beta
from texttospeechplugin.
@jamesmontemagno I am not sure if that is related to what @pollaris is telling but latest stable version restores my phones volume to highest volume when I use it as below without setting any volume parameter. earlier versions didnt have that behavior
await Plugin.TextToSpeech.CrossTextToSpeech.Current.Speak(textToSpeech, crossLocale: Helpers.Settings.CurrentLocale, cancelToken: ct);
from texttospeechplugin.
3.3.2 is working on android and windows phone now. Thanks for your help.
from texttospeechplugin.
Related Issues (20)
- Cancellation Throws exception HOT 1
- Calling CrossTextToSpeech.Current.Dispose() prevents it from reinitialzing HOT 1
- Crashes sometimes occur in case of cancellation when several requests are pending HOT 1
- TextToSpeechPlugin not working on Android HOT 1
- The plugin always detects that TextToSpeech has not been initialized yet when calling GetInstalledLanguages() for the first time HOT 3
- The speech speed is same
- Crash after upgrade to 3.1.1 and later with android HOT 2
- Error with TTS engine on progress listener HOT 1
- Text with exaclty MaxSpeechInputLength characters will fail silently
- Text with exaclty MaxSpeechInputLength characters will fail silently
- No sound when passed a string. Android Live Player. HOT 3
- After Dispose, TextToSpeech doesnt work HOT 5
- Pause, Play, Rewind Functions?
- iOS background Speak not speaking HOT 1
- This functionality is not implemented in the portable version of this assembly. You should reference the NuGet package from your main application project in order to reference the platform-specific implementation HOT 1
- No sound on actual iOS devices, but working on simulators
- This functionality is not implemented in the portable version of this assembly
- CallBack if Text-to-Speech finished reading HOT 1
- Voices doesn't work if we change the voice option from device option HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from texttospeechplugin.