Comments (6)
I was able to make it running by changing my podfile as that:
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '4.2'
config.build_settings['ENABLE_BITCODE'] = 'NO'
end
end
end
from speech_recognition.
Just to follow up... my errors above were because I wasn't using Swift 4.2 (which requires XCode 10). The syntax used in this package is specific to Swift 4.2.... compiling with 4.1 won't work. Also, the Podfile requires:
config.build_settings['SWIFT_VERSION'] = '4.2'
just below the 'ENABLE_BITCODE' line, and also:
use_frameworks!
just below
target 'Runner' do
This was all very painful to figure out for myself... perhaps the readme should make it clear?
from speech_recognition.
ok.... Here's how i fixed this:
- remove the dependency and get flutter app to compile as was before installing
speech_recognition
- In XCode, update the target to latest Swift Syntax (apparently, needs to be 4.2?)
- add back the dependency to
pubspec.yml
in flutter app - in the
SwiftSpeechRecognitionPlugin.swift
file, change line 111 (see old commented line)
let audioSession = AVAudioSession.sharedInstance()
try audioSession.setCategory(AVAudioSession.Category.record, mode: .default)
try audioSession.setMode(AVAudioSession.Mode.measurement)
// try audioSession.setActive(true, with: .notifyOthersOnDeactivation)
try audioSession.setActive(true, options: .notifyOthersOnDeactivation)
i'd PR this, but don't have the time right now. Just making a note here.
from speech_recognition.
sorry I did not realized that 4.2 was available for XCode10 only. I updated the README.
from speech_recognition.
I'm having a similar issue... @mcconkiee 's fix didn't work for me.
`Launching lib/main.dart on iPhone 7 in debug mode...
Xcode build done. 1.3s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
=== BUILD TARGET speech_recognition OF PROJECT Pods WITH CONFIGURATION Debug ===
/Users/Downloads/speech_recognition-master/ios/Classes/SwiftSpeechRecognitionPlugin.swift:186:76: error: 'Category' is not a member type of 'AVAudioSession'
fileprivate func convertFromAVAudioSessionCategory(_ input: AVAudioSession.Category) -> String {
try audioSession.setCategory(AVAudioSession.Category.record, mode: .default)
^~~~~~~~~~~~~~ ~~~~~~~~
AVFoundation.AVAudioSession:23:14: note: did you mean 'category'?
open var category: String { get }
^
/Users/Downloads/speech_recognition-master/ios/Classes/SwiftSpeechRecognitionPlugin.swift:112:30: error: type 'AVAudioSession' has no member 'Mode'
try audioSession.setMode(AVAudioSession.Mode.measurement)
^~~~~~~~~~~~~~ ~~~~
AVFoundation.AVAudioSession:33:14: note: did you mean 'mode'?
open var mode: String { get }
^
ObjectiveC.NSObject:160:15: note: did you mean 'zone'?
open func zone() -> NSZone!
^
ObjectiveC.NSObject:162:21: note: did you mean 'zone'?
open class func zone() -> NSZone!
^
/Users/Downloads/speech_recognition-master/ios/Classes/SwiftSpeechRecognitionPlugin.swift:114:48: error: extra argument 'options' in call
try audioSession.setActive(true, options: .notifyOthersOnDeactivation)
~^~~~~~~~~~~~~~~~~~~~~~~~~~
Could not build the application for the simulator.
Error launching application on iPhone 7.
Exited (sigterm)
`
from speech_recognition.
sorry I did not realized that 4.2 was available for XCode10 only. I updated the README.
I still dont see the config on the README man. Still struggle on this one, fix follow @ROTGP & @shinayser but no luck.
When I ran debug, this is showing:
Installing speech_recognition (0.3.0)
- Running pre install hooks
[!] Unable to determine Swift version for the following pods:
-speech_recognition
does not specify a Swift version and none of the targets (Runner
) integrating it have theSWIFT_VERSION
attribute set. Please contact the author or set theSWIFT_VERSION
attribute in at least one of the targets that integrate this pod.
from speech_recognition.
Related Issues (20)
- Flutter web? HOT 3
- I/flutter (11568): Unknowm method speech.onError on unclear voice
- Auto detect language HOT 1
- How to implement this plugin with a text field and enable user to modify the text?
- Stop when voice end
- Unknowm method speech.onError HOT 1
- new problem on flutter > iOS build (from android studio) HOT 1
- does not work for Android while is working with iOS
- Is it possible to get the .mp3 file?
- Listen unless user finishes
- Can this be used offline?
- speech_recognition ios build target change HOT 2
- use 2 different SpeechRecognition in one class is not working !! HOT 1
- The stop button does not work
- 2 Bips
- onErrorHandler
- Availability for Mandarin Chinese
- Android local language speech detect and text in local language HOT 1
- Problem after adding AndroidX Compatability HOT 1
- Old SDK required? 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 speech_recognition.