Initial frame commit
This commit is contained in:
commit
936229bd6e
8
.gitignore
vendored
Normal file
8
.gitignore
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
/.env/
|
||||||
|
|
||||||
|
*.egg-info/
|
||||||
|
__pycache__/
|
||||||
|
|
||||||
|
*.swp
|
||||||
|
*.swo
|
||||||
|
*.log
|
11
README.md
Normal file
11
README.md
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# DND Transcribe
|
||||||
|
|
||||||
|
The goal of this project is to create a tool to transcribe audio recordings of
|
||||||
|
DND games and transcribe them.
|
||||||
|
|
||||||
|
Our initial approach is rather naive, using wav2vec 2.0 pre-trained models to
|
||||||
|
perform automated speach recognition
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
TODO
|
0
dnd_transcribe/__init__.py
Normal file
0
dnd_transcribe/__init__.py
Normal file
19
dnd_transcribe/argparse.py
Normal file
19
dnd_transcribe/argparse.py
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
import argparse
|
||||||
|
|
||||||
|
|
||||||
|
def build_argument_parser() -> argparse.ArgumentParser:
|
||||||
|
parser = argparse.ArgumentParser(
|
||||||
|
description="Utility to transcribe DND audio recordings."
|
||||||
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"-v", "--verbose", action="store_true", help="Enable verbose logging"
|
||||||
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"-q", "--quiet", action="store_true", help="Only display errors"
|
||||||
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"audio_file",
|
||||||
|
type=argparse.FileType(mode="r"),
|
||||||
|
help="Audio file to process",
|
||||||
|
)
|
||||||
|
return parser
|
15
dnd_transcribe/main.py
Normal file
15
dnd_transcribe/main.py
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
import dnd_transcribe.argparse
|
||||||
|
import logging
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
parser = dnd_transcribe.argparse.build_argument_parser()
|
||||||
|
args = parser.parse_args()
|
||||||
|
logging_format = "%(asctime)s %(levelname)s:%(name)s %(message)s"
|
||||||
|
if args.verbose:
|
||||||
|
logging.basicConfig(level=logging.DEBUG, format=logging_format)
|
||||||
|
elif args.quiet:
|
||||||
|
logging.basicConfig(level=logging.ERROR, format=logging_format)
|
||||||
|
else:
|
||||||
|
logging.basicConfig(level=logging.INFO, format=logging_format)
|
||||||
|
print("WIP")
|
3
requirements.txt
Normal file
3
requirements.txt
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
soundfile>=0.13.1
|
||||||
|
torch>=2.6.0
|
||||||
|
transformers>=4.51.3
|
30
setup.py
Normal file
30
setup.py
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
import os
|
||||||
|
import codecs
|
||||||
|
from setuptools import setup
|
||||||
|
from setuptools import find_packages
|
||||||
|
|
||||||
|
|
||||||
|
def read(filename):
|
||||||
|
"""Read and return `filename` in root dir of project and return string"""
|
||||||
|
here = os.path.abspath(os.path.dirname(__file__))
|
||||||
|
return codecs.open(os.path.join(here, filename), "r").read()
|
||||||
|
|
||||||
|
|
||||||
|
install_requires = read("requirements.txt").split()
|
||||||
|
long_description = read("README.md")
|
||||||
|
|
||||||
|
|
||||||
|
setup(
|
||||||
|
name="dnd_transcribe",
|
||||||
|
version="1.0.0",
|
||||||
|
url="https://krugerlabs.us",
|
||||||
|
author="David Kruger <david@krugerlabs.us>",
|
||||||
|
description="Script to convert D&D game audio recordings to transcripts",
|
||||||
|
long_description=long_description,
|
||||||
|
python_requires=">=3.6",
|
||||||
|
packages=find_packages(exclude=["tests"]),
|
||||||
|
install_requires=install_requires,
|
||||||
|
entry_points={"console_scripts": ["dnd_transcribe = dnd_transcribe.main:main"]},
|
||||||
|
test_suite="nose.collector",
|
||||||
|
tests_require=["nose", "mock"],
|
||||||
|
)
|
Loading…
x
Reference in New Issue
Block a user