Comments (13)
@KarHack Will do that, next time. Thank you.
@dlutton Thanks a ton for the Library, I am Closing the Issue.
from flutter_tts.
@dlutton I copy main.dart
from example too, not clone full project, sorry for misleading in my first comment.
@KarHack maybe we meet the same problem that device can't play sounds without AVAudioSessionCategoryPlayback
, you can try to edit AppDelegare.swift
in my comment above as a temporary workaround if it works for you.
from flutter_tts.
@dlutton sorry that I made a stupid mistake that tested on the silent mode you mentioned above, the library works in iOS.
I've created a PR #24 to enable playback in silent mode, thanks.
from flutter_tts.
@IvanBean I have merged the PR. I'll have to refactor it once I upgrade the code to swift 4.2 since there appears to be issues. I'm hoping the ios/swift team can correct it without having to apply a bandaid.
from flutter_tts.
@KarHack Are you testing on an emulator or real device? I have tested the example on an iphone XR 12.1 emulator and a real device (iphone XS max) running iOS 12.1.2 and it's working.
from flutter_tts.
Similar issue here, clone the example and testing on real device iPhone 7 running iOS 12.1.2. Many languages shows duplicate item: https://i.imgur.com/B69Cfgx.png, select the duplicated one leads to an error: https://i.imgur.com/1ejQp7v.png.
Other selectable language dosen't play sound when hit the button, tested on plugin version 0.1.2 and 0.2.0.
Android works well include the voices options which just added in 0.2.0.
Thanks for your effort, any reply will be appreciated.
Edit: sorry it's copy .dart
from example, not clone full project.
from flutter_tts.
@KarHack @IvanBean can one of you test the latest 0.2.1 package I just published? Thank you
from flutter_tts.
I just cleaned and checked 0.2.1 package, on Iphone 6s running iOS 12.1.2. It is still not working.
Thanks for your quick reply and effort, really great project.
from flutter_tts.
Hi @dlutton
Thanks for the quick reply, the duplicate language is fixed now.
About the voice, after some investigating I found one solution is to modify AppDelegare.swift
under my flutter project's ios/Runner directory, full code:
import UIKit
import Flutter
import AVFoundation // Add this line.
@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?
) -> Bool {
// Add below.
do {
try AVAudioSession.sharedInstance().setCategory(AVAudioSessionCategoryPlayback)
do {
try AVAudioSession.sharedInstance().setActive(true)
} catch {
}
} catch {
}
// Add above.
GeneratedPluginRegistrant.register(with: self)
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
In this way the voice can play successfully, however, I'm an Android developer and new to Flutter so I don't know whether this is a correct approach. Thanks.
from flutter_tts.
Unfortunately i don't have a 6s phone to test it on @KarHack. I did test a 6s emulator and it's working. The voice is also working when I test on my physical device (iphone Xs). Are there any error logs you can provide from your device?
from flutter_tts.
and sorry for the dumb question, but did you make sure to turn off your silent mode (the physical switch)?
from flutter_tts.
I cloned the project, and its working on the Iphone 6s iOS 12.1.2.
Yes, I did make sure that the phone was out of silent mode (physical switch), but yes now it's working once I cloned the project.
Probably I missed something when copying from the example. Thanks a ton.
I am not an iOS developer, so what should I do if I have to implement this into an existing application?
from flutter_tts.
@IvanBean thanks for the PR. I'll test it out and merge if everything works.
from flutter_tts.
Related Issues (20)
- flutter_tts requires exactly kotlin-gradle-plugin/1.7.1 ?? HOT 7
- Since 4.0.2 version on Samsung phones default engine is com.samsung.SMT. As result we have endless pause on speak command.
- Add more language on platform desktop not only en-US HOT 1
- Fluttertts not working in ios HOT 1
- Question intonation for Spanish does not work for Android. HOT 3
- How to keep progress after pausing? setProgressHandler resest start and end values everytime. HOT 1
- synthesizeToFile Issue: type 'int' is not a subtype of type 'String' HOT 3
- Version 4.0.2 doesn't build HOT 7
- [iOS] New language added to device is not available to flutter_tts getLanguages
- synthesizeToFile Saving to External Storage HOT 3
- Asked to disconnect from ComponentInfo{com.google.android.tts/... HOT 2
- Any method to retrieve engine names
- flutter_tts getVoices result added to listview text doesn't show on iOS devices HOT 1
- Unhandled Exception: MissingPluginException(No implementation found for method setEngine on channel flutter_tts) HOT 1
- Android crash when i use tts in preload_page_view library
- Different results for getVoices on Windows browser vs iOS Safari
- Crash on iOS Version below 16
- Flutter Web : speak does not works in init state
- getDefaultVoice method throws an Exception HOT 1
- Voice speech not working on iOS
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 flutter_tts.