Skip to content

Commit

Permalink
fix setup
Browse files Browse the repository at this point in the history
  • Loading branch information
believethehype committed Dec 17, 2023
1 parent 278e7f4 commit 62ccbc0
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 1 deletion.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
author_email="[email protected]",
description=DESCRIPTION,
long_description=LONG_DESCRIPTION,
packages=find_packages(include=['nostr_dvm']),
packages=find_packages(include=['nostr_dvm', 'nostr_dvm.backends', 'nostr_dvm.interfaces', 'nostr_dvm.tasks', 'nostr_dvm.utils']),
install_requires=["nostr-sdk==0.0.5",
"bech32==1.2.0",
"pycryptodome==3.19.0",
Expand Down
44 changes: 44 additions & 0 deletions test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import json

import nostr_dvm
from nostr_dvm.tasks.texttospeech import TextToSpeech
from nostr_dvm.utils.admin_utils import AdminConfig
from nostr_dvm.utils.dvmconfig import build_default_config
from nostr_dvm.utils.nip89_utils import NIP89Config, check_and_set_d_tag

identifier = "tts"
name = "Guy Swann Clone"

dvm_config = build_default_config(identifier)
admin_config = AdminConfig()
admin_config.REBROADCAST_NIP89 = False
admin_config.UPDATE_PROFILE = False
admin_config.LUD16 = dvm_config.LN_ADDRESS

#Use default file if paramter is empty, else overwrite with any local wav file
options = {'input_file': ""}

nip89info = {
"name": name,
"image": "https://image.nostr.build/c33ca6fc4cc038ca4adb46fdfdfda34951656f87ee364ef59095bae1495ce669.jpg",
"about": "I Generate Speech from Text",
"encryptionSupported": True,
"cashuAccepted": True,
"nip90Params": {
"language": {
"required": False,
"values": []
}
}
}

nip89config = NIP89Config()
nip89config.DTAG = check_and_set_d_tag(identifier, name, dvm_config.PRIVATE_KEY, nip89info["image"])
nip89config.CONTENT = json.dumps(nip89info)

tts = TextToSpeech(name=name,
dvm_config=dvm_config,
nip89config=nip89config,
admin_config=admin_config,
options=options)
tts.run()

0 comments on commit 62ccbc0

Please sign in to comment.