added speaker_id conversions to Amazon and Google

This commit is contained in:
2019-03-08 10:23:01 -05:00
parent 3fc6dacfde
commit 0301b3be23
6 changed files with 130 additions and 55 deletions

39
tests/test_google.py Normal file
View File

@@ -0,0 +1,39 @@
import json
import os
import pytest
from transcript_processing.converters.google import (
make_json_friendly,
GoogleConverter,
)
@pytest.fixture
def transcript_data():
with open(os.getenv('GOOGLE_TRANSCRIPT_TEST_FILE'), 'r') as fin:
return fin.read()
@pytest.fixture
def converter(transcript_data):
return GoogleConverter(transcript_data)
def test_get_word_objects(converter):
word_objects = converter.get_word_objects(converter.json_data)
assert word_objects
def test_make_json_friendly(transcript_data):
friendly = make_json_friendly(transcript_data)
assert json.loads(friendly)
def test_pre_process(converter):
assert converter.json_data
def test_convert(converter):
converter.convert()
print(converter.converted_words)