nateshmbhat / pyttsx3

Offline Text To Speech synthesis for python
Mozilla Public License 2.0
2.09k stars 330 forks source link

NSSpeechDriver is overriding existing Objective-C class exception with pyttsx4 #281

Open nouran-abdalazim opened 1 year ago

nouran-abdalazim commented 1 year ago

I'm running the following simple code on Mac laptop M1 and python 3.8.8 using virtual environment

import pyttsx4

engine = pyttsx4.init()
engine.say('How are you today?')
engine.runAndWait()

I receive the following error " NSSpeechDriver is overriding existing Objective-C class". I can not resolve this exception

Thanks in advance

Jiangshan00001 commented 1 year ago

run:pip freeze and paste the output here. it maybe the objc version and pyttsx4 version conflict.

nouran-abdalazim commented 1 year ago

Here it is: aiohttp==3.8.4 aiosignal==1.3.1 altair==5.0.1 antlr4-python3-runtime==4.9.3 appnope==0.1.3 asttokens==2.2.1 async-timeout==4.0.2 attrs==23.1.0 backcall==0.2.0 backports.zoneinfo==0.2.1 beautifulsoup4==4.12.2 blinker==1.6.2 cachetools==5.3.1 certifi==2023.5.7 cffi==1.15.1 charset-normalizer==3.1.0 click==8.1.3 comm==0.1.3 cryptography==41.0.1 dataclasses-json==0.5.8 debugpy==1.6.7 decorator==5.1.1 diskcache==5.6.1 docopt==0.6.2 executing==1.2.0 faiss-cpu==1.7.4 filelock==3.12.2 frozenlist==1.3.3 fsspec==2023.6.0 generativeAgents-LLM==0.0.0 gitdb==4.0.10 GitPython==3.1.31 google-api-core==2.11.1 google-auth==2.20.0 google-cloud-texttospeech==2.14.1 google-search-results==2.4.2 googleapis-common-protos==1.59.1 gptcache==0.1.32 greenlet==2.0.2 grpcio==1.56.0 grpcio-status==1.56.0 gTTS==2.3.2 guidance @ git+https://github.com/microsoft/guidance.git@5f7fa7f6eef6455e6940fe743c5bfdb557330d0b helper==0.0.0 huggingface-hub==0.15.1 idna==3.4 importlib-metadata==6.6.0 importlib-resources==5.12.0 ipykernel==6.23.2 ipython==8.12.2 jedi==0.18.2 Jinja2==3.1.2 joblib==1.2.0 Js2Py==0.74 jsonschema==4.17.3 jupyter_client==8.2.0 jupyter_core==5.3.1 langchain==0.0.201 langchainplus-sdk==0.0.10 main==0.0.0 markdown-it-py==3.0.0 MarkupSafe==2.1.3 marshmallow==3.19.0 marshmallow-enum==1.5.1 matplotlib-inline==0.1.6 mdurl==0.1.2 mpmath==1.3.0 msal==1.22.0 multidict==6.0.4 myPackage2==0.0.0 mypy-extensions==1.0.0 nest-asyncio==1.5.6 networkx==3.1 nltk==3.8.1 numexpr==2.8.4 numpy==1.24.3 omegaconf==2.3.0 openai==0.27.8 openapi-schema-pydantic==1.2.4 packaging==23.1 pandas==2.0.2 parso==0.8.3 pexpect==4.8.0 pickleshare==0.7.5 Pillow==9.5.0 pipwin==0.5.2 pkgutil_resolve_name==1.3.10 platformdirs==3.5.3 prompt-toolkit==3.0.38 proto-plus==1.22.3 protobuf==4.23.3 psutil==5.9.5 ptyprocess==0.7.0 pure-eval==0.2.2 pyarrow==12.0.1 pyasn1==0.5.0 pyasn1-modules==0.3.0 PyAudio==0.2.12 pycparser==2.21 pydantic==1.10.9 pydeck==0.8.1b0 pydub==0.25.1 pygame==2.5.0 Pygments==2.15.1 pygtrie==2.5.0 pyjsparser==2.7.1 PyJWT==2.7.0 Pympler==1.0.1 pyobjc==9.2 pyobjc-core==9.2 pyobjc-framework-Accessibility==9.2 pyobjc-framework-Accounts==9.2 pyobjc-framework-AddressBook==9.2 pyobjc-framework-AdServices==9.2 pyobjc-framework-AdSupport==9.2 pyobjc-framework-AppleScriptKit==9.2 pyobjc-framework-AppleScriptObjC==9.2 pyobjc-framework-ApplicationServices==9.2 pyobjc-framework-AppTrackingTransparency==9.2 pyobjc-framework-AudioVideoBridging==9.2 pyobjc-framework-AuthenticationServices==9.2 pyobjc-framework-AutomaticAssessmentConfiguration==9.2 pyobjc-framework-Automator==9.2 pyobjc-framework-AVFoundation==9.2 pyobjc-framework-AVKit==9.2 pyobjc-framework-BusinessChat==9.2 pyobjc-framework-CalendarStore==9.2 pyobjc-framework-CallKit==9.2 pyobjc-framework-CFNetwork==9.2 pyobjc-framework-ClassKit==9.2 pyobjc-framework-CloudKit==9.2 pyobjc-framework-Cocoa==9.2 pyobjc-framework-Collaboration==9.2 pyobjc-framework-ColorSync==9.2 pyobjc-framework-Contacts==9.2 pyobjc-framework-ContactsUI==9.2 pyobjc-framework-CoreAudio==9.2 pyobjc-framework-CoreAudioKit==9.2 pyobjc-framework-CoreBluetooth==9.2 pyobjc-framework-CoreData==9.2 pyobjc-framework-CoreHaptics==9.2 pyobjc-framework-CoreLocation==9.2 pyobjc-framework-CoreMedia==9.2 pyobjc-framework-CoreMediaIO==9.2 pyobjc-framework-CoreMIDI==9.2 pyobjc-framework-CoreML==9.2 pyobjc-framework-CoreMotion==9.2 pyobjc-framework-CoreServices==9.2 pyobjc-framework-CoreSpotlight==9.2 pyobjc-framework-CoreText==9.2 pyobjc-framework-CoreWLAN==9.2 pyobjc-framework-CryptoTokenKit==9.2 pyobjc-framework-DeviceCheck==9.2 pyobjc-framework-DictionaryServices==9.2 pyobjc-framework-DiscRecording==9.2 pyobjc-framework-DiscRecordingUI==9.2 pyobjc-framework-DiskArbitration==9.2 pyobjc-framework-DVDPlayback==9.2 pyobjc-framework-EventKit==9.2 pyobjc-framework-ExceptionHandling==9.2 pyobjc-framework-ExecutionPolicy==9.2 pyobjc-framework-ExternalAccessory==9.2 pyobjc-framework-FileProvider==9.2 pyobjc-framework-FileProviderUI==9.2 pyobjc-framework-FinderSync==9.2 pyobjc-framework-FSEvents==9.2 pyobjc-framework-GameCenter==9.2 pyobjc-framework-GameController==9.2 pyobjc-framework-GameKit==9.2 pyobjc-framework-GameplayKit==9.2 pyobjc-framework-ImageCaptureCore==9.2 pyobjc-framework-IMServicePlugIn==9.2 pyobjc-framework-InputMethodKit==9.2 pyobjc-framework-InstallerPlugins==9.2 pyobjc-framework-InstantMessage==9.2 pyobjc-framework-Intents==9.2 pyobjc-framework-IOBluetooth==9.2 pyobjc-framework-IOBluetoothUI==9.2 pyobjc-framework-IOSurface==9.2 pyobjc-framework-iTunesLibrary==9.2 pyobjc-framework-KernelManagement==9.2 pyobjc-framework-LatentSemanticMapping==9.2 pyobjc-framework-LaunchServices==9.2 pyobjc-framework-libdispatch==9.2 pyobjc-framework-libxpc==9.2 pyobjc-framework-LinkPresentation==9.2 pyobjc-framework-LocalAuthentication==9.2 pyobjc-framework-MapKit==9.2 pyobjc-framework-MediaAccessibility==9.2 pyobjc-framework-MediaLibrary==9.2 pyobjc-framework-MediaPlayer==9.2 pyobjc-framework-MediaToolbox==9.2 pyobjc-framework-Metal==9.2 pyobjc-framework-MetalKit==9.2 pyobjc-framework-MetalPerformanceShaders==9.2 pyobjc-framework-MetalPerformanceShadersGraph==9.2 pyobjc-framework-MLCompute==9.2 pyobjc-framework-ModelIO==9.2 pyobjc-framework-MultipeerConnectivity==9.2 pyobjc-framework-NaturalLanguage==9.2 pyobjc-framework-NetFS==9.2 pyobjc-framework-Network==9.2 pyobjc-framework-NetworkExtension==9.2 pyobjc-framework-NotificationCenter==9.2 pyobjc-framework-OpenDirectory==9.2 pyobjc-framework-OSAKit==9.2 pyobjc-framework-OSLog==9.2 pyobjc-framework-PassKit==9.2 pyobjc-framework-PencilKit==9.2 pyobjc-framework-Photos==9.2 pyobjc-framework-PhotosUI==9.2 pyobjc-framework-PreferencePanes==9.2 pyobjc-framework-PushKit==9.2 pyobjc-framework-Quartz==9.2 pyobjc-framework-QuickLookThumbnailing==9.2 pyobjc-framework-ReplayKit==9.2 pyobjc-framework-SafariServices==9.2 pyobjc-framework-SceneKit==9.2 pyobjc-framework-ScreenSaver==9.2 pyobjc-framework-ScreenTime==9.2 pyobjc-framework-ScriptingBridge==9.2 pyobjc-framework-SearchKit==9.2 pyobjc-framework-Security==9.2 pyobjc-framework-SecurityFoundation==9.2 pyobjc-framework-SecurityInterface==9.2 pyobjc-framework-ServiceManagement==9.2 pyobjc-framework-Social==9.2 pyobjc-framework-SoundAnalysis==9.2 pyobjc-framework-Speech==9.2 pyobjc-framework-SpriteKit==9.2 pyobjc-framework-StoreKit==9.2 pyobjc-framework-SyncServices==9.2 pyobjc-framework-SystemConfiguration==9.2 pyobjc-framework-SystemExtensions==9.2 pyobjc-framework-UniformTypeIdentifiers==9.2 pyobjc-framework-UserNotifications==9.2 pyobjc-framework-UserNotificationsUI==9.2 pyobjc-framework-VideoSubscriberAccount==9.2 pyobjc-framework-VideoToolbox==9.2 pyobjc-framework-Virtualization==9.2 pyobjc-framework-Vision==9.2 pyobjc-framework-WebKit==9.2 pyparsing==3.1.0 PyPrind==2.11.3 pyrsistent==0.19.3 pySmartDL==1.3.4 python-dateutil==2.8.2 pyttsx3==2.86 pyttsx4==3.0.15 pytz==2023.3 pytz-deprecation-shim==0.1.0.post0 PyYAML==6.0 pyzmq==25.1.0 regex==2023.6.3 requests==2.31.0 rich==13.4.2 rouge==1.0.1 rsa==4.9 safetensors==0.3.1 scikit-learn==1.2.2 scipy==1.10.1 sentence-transformers==2.2.2 sentencepiece==0.1.99 six==1.16.0 smmap==5.0.0 soundfile==0.12.1 soupsieve==2.4.1 SpeechRecognition==3.10.0 SQLAlchemy==2.0.16 src==0.0.0 stack-data==0.6.2 sympy==1.12 tenacity==8.2.2 threadpoolctl==3.1.0 tiktoken==0.4.0 tokenizers==0.13.3 toml==0.10.2 toolz==0.12.0 torch==2.0.1 torchaudio==2.0.2 torchvision==0.15.2 tornado==6.3.2 tqdm==4.65.0 traitlets==5.9.0 transformers==4.30.2 typing-inspect==0.9.0 typing_extensions==4.6.3 tzdata==2023.3 tzlocal==4.3.1 urllib3==1.26.16 validators==0.20.0 wcwidth==0.2.6 yarl==1.9.2 zipp==3.15.0

Jiangshan00001 commented 1 year ago

the easiest way to do is run: pip install pyobjc==9.0.1