generated voice files using ios api
commit
d2c28fc63f
|
|
@ -0,0 +1,140 @@
|
||||||
|
|
||||||
|
# Created by https://www.gitignore.io/api/python
|
||||||
|
|
||||||
|
### Python ###
|
||||||
|
# Byte-compiled / optimized / DLL files
|
||||||
|
__pycache__/
|
||||||
|
*.py[cod]
|
||||||
|
*$py.class
|
||||||
|
|
||||||
|
# C extensions
|
||||||
|
*.so
|
||||||
|
|
||||||
|
# Distribution / packaging
|
||||||
|
.Python
|
||||||
|
build/
|
||||||
|
develop-eggs/
|
||||||
|
dist/
|
||||||
|
downloads/
|
||||||
|
eggs/
|
||||||
|
.eggs/
|
||||||
|
lib/
|
||||||
|
lib64/
|
||||||
|
parts/
|
||||||
|
sdist/
|
||||||
|
var/
|
||||||
|
wheels/
|
||||||
|
*.egg-info/
|
||||||
|
.installed.cfg
|
||||||
|
*.egg
|
||||||
|
|
||||||
|
# PyInstaller
|
||||||
|
# Usually these files are written by a python script from a template
|
||||||
|
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
||||||
|
*.manifest
|
||||||
|
*.spec
|
||||||
|
|
||||||
|
# Installer logs
|
||||||
|
pip-log.txt
|
||||||
|
pip-delete-this-directory.txt
|
||||||
|
|
||||||
|
# Unit test / coverage reports
|
||||||
|
htmlcov/
|
||||||
|
.tox/
|
||||||
|
.coverage
|
||||||
|
.coverage.*
|
||||||
|
.cache
|
||||||
|
nosetests.xml
|
||||||
|
coverage.xml
|
||||||
|
*.cover
|
||||||
|
.hypothesis/
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
*.mo
|
||||||
|
*.pot
|
||||||
|
|
||||||
|
# Django stuff:
|
||||||
|
*.log
|
||||||
|
local_settings.py
|
||||||
|
|
||||||
|
# Flask stuff:
|
||||||
|
instance/
|
||||||
|
.webassets-cache
|
||||||
|
|
||||||
|
# Scrapy stuff:
|
||||||
|
.scrapy
|
||||||
|
|
||||||
|
# Sphinx documentation
|
||||||
|
docs/_build/
|
||||||
|
|
||||||
|
# PyBuilder
|
||||||
|
target/
|
||||||
|
|
||||||
|
# Jupyter Notebook
|
||||||
|
.ipynb_checkpoints
|
||||||
|
|
||||||
|
# pyenv
|
||||||
|
.python-version
|
||||||
|
|
||||||
|
# celery beat schedule file
|
||||||
|
celerybeat-schedule
|
||||||
|
|
||||||
|
# SageMath parsed files
|
||||||
|
*.sage.py
|
||||||
|
|
||||||
|
# Environments
|
||||||
|
.env
|
||||||
|
.venv
|
||||||
|
env/
|
||||||
|
venv/
|
||||||
|
ENV/
|
||||||
|
env.bak/
|
||||||
|
venv.bak/
|
||||||
|
|
||||||
|
# Spyder project settings
|
||||||
|
.spyderproject
|
||||||
|
.spyproject
|
||||||
|
|
||||||
|
# Rope project settings
|
||||||
|
.ropeproject
|
||||||
|
|
||||||
|
# mkdocs documentation
|
||||||
|
/site
|
||||||
|
|
||||||
|
# mypy
|
||||||
|
.mypy_cache/
|
||||||
|
|
||||||
|
# End of https://www.gitignore.io/api/python
|
||||||
|
|
||||||
|
# Created by https://www.gitignore.io/api/macos
|
||||||
|
|
||||||
|
### macOS ###
|
||||||
|
*.DS_Store
|
||||||
|
.AppleDouble
|
||||||
|
.LSOverride
|
||||||
|
|
||||||
|
# Icon must end with two \r
|
||||||
|
Icon
|
||||||
|
|
||||||
|
# Thumbnails
|
||||||
|
._*
|
||||||
|
|
||||||
|
# Files that might appear in the root of a volume
|
||||||
|
.DocumentRevisions-V100
|
||||||
|
.fseventsd
|
||||||
|
.Spotlight-V100
|
||||||
|
.TemporaryItems
|
||||||
|
.Trashes
|
||||||
|
.VolumeIcon.icns
|
||||||
|
.com.apple.timemachine.donotpresent
|
||||||
|
|
||||||
|
# Directories potentially created on remote AFP share
|
||||||
|
.AppleDB
|
||||||
|
.AppleDesktop
|
||||||
|
Network Trash Folder
|
||||||
|
Temporary Items
|
||||||
|
.apdisk
|
||||||
|
|
||||||
|
# End of https://www.gitignore.io/api/macos
|
||||||
|
|
||||||
|
outputs/*
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,94 @@
|
||||||
|
appnope==0.1.0
|
||||||
|
decorator==4.1.2
|
||||||
|
ipykernel==4.6.1
|
||||||
|
ipython==6.2.1
|
||||||
|
ipython-genutils==0.2.0
|
||||||
|
jedi==0.11.0
|
||||||
|
jupyter-client==5.1.0
|
||||||
|
jupyter-core==4.3.0
|
||||||
|
parso==0.1.0
|
||||||
|
pexpect==4.2.1
|
||||||
|
pickleshare==0.7.4
|
||||||
|
prompt-toolkit==1.0.15
|
||||||
|
ptyprocess==0.5.2
|
||||||
|
Pygments==2.2.0
|
||||||
|
pyobjc==4.0
|
||||||
|
pyobjc-core==4.0
|
||||||
|
pyobjc-framework-Accounts==4.0
|
||||||
|
pyobjc-framework-AddressBook==4.0
|
||||||
|
pyobjc-framework-AppleScriptKit==4.0
|
||||||
|
pyobjc-framework-AppleScriptObjC==4.0
|
||||||
|
pyobjc-framework-ApplicationServices==4.0
|
||||||
|
pyobjc-framework-Automator==4.0
|
||||||
|
pyobjc-framework-AVFoundation==4.0
|
||||||
|
pyobjc-framework-AVKit==4.0
|
||||||
|
pyobjc-framework-CalendarStore==4.0
|
||||||
|
pyobjc-framework-CFNetwork==4.0
|
||||||
|
pyobjc-framework-CloudKit==4.0
|
||||||
|
pyobjc-framework-Cocoa==4.0
|
||||||
|
pyobjc-framework-Collaboration==4.0
|
||||||
|
pyobjc-framework-Contacts==4.0
|
||||||
|
pyobjc-framework-ContactsUI==4.0
|
||||||
|
pyobjc-framework-CoreBluetooth==4.0
|
||||||
|
pyobjc-framework-CoreData==4.0
|
||||||
|
pyobjc-framework-CoreLocation==4.0
|
||||||
|
pyobjc-framework-CoreServices==4.0
|
||||||
|
pyobjc-framework-CoreText==4.0
|
||||||
|
pyobjc-framework-CoreWLAN==4.0
|
||||||
|
pyobjc-framework-CryptoTokenKit==4.0
|
||||||
|
pyobjc-framework-DictionaryServices==4.0
|
||||||
|
pyobjc-framework-DiskArbitration==4.0
|
||||||
|
pyobjc-framework-EventKit==4.0
|
||||||
|
pyobjc-framework-ExceptionHandling==4.0
|
||||||
|
pyobjc-framework-FinderSync==4.0
|
||||||
|
pyobjc-framework-FSEvents==4.0
|
||||||
|
pyobjc-framework-GameCenter==4.0
|
||||||
|
pyobjc-framework-GameController==4.0
|
||||||
|
pyobjc-framework-GameKit==4.0
|
||||||
|
pyobjc-framework-GameplayKit==4.0
|
||||||
|
pyobjc-framework-ImageCaptureCore==4.0
|
||||||
|
pyobjc-framework-IMServicePlugIn==4.0
|
||||||
|
pyobjc-framework-InputMethodKit==4.0
|
||||||
|
pyobjc-framework-InstallerPlugins==4.0
|
||||||
|
pyobjc-framework-InstantMessage==4.0
|
||||||
|
pyobjc-framework-Intents==4.0
|
||||||
|
pyobjc-framework-IOSurface==4.0
|
||||||
|
pyobjc-framework-iTunesLibrary==4.0
|
||||||
|
pyobjc-framework-LatentSemanticMapping==4.0
|
||||||
|
pyobjc-framework-LaunchServices==4.0
|
||||||
|
pyobjc-framework-LocalAuthentication==4.0
|
||||||
|
pyobjc-framework-MapKit==4.0
|
||||||
|
pyobjc-framework-MediaAccessibility==4.0
|
||||||
|
pyobjc-framework-MediaLibrary==4.0
|
||||||
|
pyobjc-framework-MediaPlayer==4.0
|
||||||
|
pyobjc-framework-ModelIO==4.0
|
||||||
|
pyobjc-framework-MultipeerConnectivity==4.0
|
||||||
|
pyobjc-framework-NetFS==4.0
|
||||||
|
pyobjc-framework-NetworkExtension==4.0
|
||||||
|
pyobjc-framework-NotificationCenter==4.0
|
||||||
|
pyobjc-framework-OpenDirectory==4.0
|
||||||
|
pyobjc-framework-Photos==4.0
|
||||||
|
pyobjc-framework-PhotosUI==4.0
|
||||||
|
pyobjc-framework-PreferencePanes==4.0
|
||||||
|
pyobjc-framework-PubSub==4.0
|
||||||
|
pyobjc-framework-QTKit==4.0
|
||||||
|
pyobjc-framework-Quartz==4.0
|
||||||
|
pyobjc-framework-SafariServices==4.0
|
||||||
|
pyobjc-framework-SceneKit==4.0
|
||||||
|
pyobjc-framework-ScreenSaver==4.0
|
||||||
|
pyobjc-framework-ScriptingBridge==4.0
|
||||||
|
pyobjc-framework-SearchKit==4.0
|
||||||
|
pyobjc-framework-ServiceManagement==4.0
|
||||||
|
pyobjc-framework-Social==4.0
|
||||||
|
pyobjc-framework-SpriteKit==4.0
|
||||||
|
pyobjc-framework-StoreKit==4.0
|
||||||
|
pyobjc-framework-SyncServices==4.0
|
||||||
|
pyobjc-framework-SystemConfiguration==4.0
|
||||||
|
pyobjc-framework-WebKit==4.0
|
||||||
|
python-dateutil==2.6.1
|
||||||
|
pyzmq==16.0.2
|
||||||
|
simplegeneric==0.8.1
|
||||||
|
six==1.11.0
|
||||||
|
tornado==4.5.2
|
||||||
|
traitlets==4.3.2
|
||||||
|
wcwidth==0.1.7
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
import objc
|
||||||
|
from AppKit import NSSpeechSynthesizer
|
||||||
|
from Foundation import NSURL
|
||||||
|
import json
|
||||||
|
import os
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
sp = NSSpeechSynthesizer.alloc().init()
|
||||||
|
sp.setVolume_(100)
|
||||||
|
|
||||||
|
dest_path = os.path.abspath('.')+'/outputs/'
|
||||||
|
dest_url = lambda p: NSURL.fileURLWithPath_(dest_path+p+'.aiff')
|
||||||
|
def generate_aiff_word(word):
|
||||||
|
sp.startSpeakingString_toURL_(word,dest_url(word))
|
||||||
|
|
||||||
|
def generate_audio_for_stories():
|
||||||
|
stories_data = json.load(open('./input/all_stories_hs.json'))
|
||||||
|
word_list = [t[0] for i in stories_data.values() for t in i]
|
||||||
|
for word in word_list:
|
||||||
|
generate_aiff_word(word)
|
||||||
|
|
||||||
|
generate_audio_for_stories()
|
||||||
Loading…
Reference in New Issue