6293
GO_EMC_100914_Interview_first_minute_phone_call_model.mp3.txt
Normal file
6293
GO_EMC_100914_Interview_first_minute_phone_call_model.mp3.txt
Normal file
File diff suppressed because it is too large
Load Diff
@@ -90,15 +90,22 @@ def status(job_name):
|
|||||||
@cli.command()
|
@cli.command()
|
||||||
@click.option('--punctuation', is_flag=True, default=True,
|
@click.option('--punctuation', is_flag=True, default=True,
|
||||||
help='only for Google Speech, defaults to True')
|
help='only for Google Speech, defaults to True')
|
||||||
@click.option('--speaker-id', is_flag=True, default=True,
|
@click.option('--speaker-id/--no-speaker-id', is_flag=True, default=True,
|
||||||
help='only for Google Speech, defaults to True')
|
help='only for google and amazon, defaults to True')
|
||||||
|
@click.option('--num_speakers', default=2, type=int,
|
||||||
|
help='only for google and amazon, defaults to 2')
|
||||||
@click.option('--model', default='phone_call',
|
@click.option('--model', default='phone_call',
|
||||||
help='only for Google Speech, defaults to "phone_call"')
|
help='only for Google Speech, defaults to "phone_call"')
|
||||||
@click.option('--use-enhanced', is_flag=True, default=True,
|
@click.option('--use-enhanced', is_flag=True, default=True,
|
||||||
help='only for Google Speech, defaults to True')
|
help='only for Google Speech, defaults to True')
|
||||||
@click.argument('media_filepath', type=str)
|
@click.argument('media_filepath', type=str)
|
||||||
@click.argument('service_name', type=str)
|
@click.argument('service_name', type=str)
|
||||||
def this(media_filepath, service_name, punctuation, speaker_id, model,
|
def this(media_filepath,
|
||||||
|
service_name,
|
||||||
|
punctuation,
|
||||||
|
speaker_id,
|
||||||
|
num_speakers,
|
||||||
|
model,
|
||||||
use_enhanced):
|
use_enhanced):
|
||||||
"""Sends a media file to be transcribed."""
|
"""Sends a media file to be transcribed."""
|
||||||
if service_name == 'google':
|
if service_name == 'google':
|
||||||
@@ -107,7 +114,13 @@ def this(media_filepath, service_name, punctuation, speaker_id, model,
|
|||||||
enable_speaker_diarization=speaker_id,
|
enable_speaker_diarization=speaker_id,
|
||||||
model=model,
|
model=model,
|
||||||
use_enhanced=use_enhanced,
|
use_enhanced=use_enhanced,
|
||||||
|
num_speakers=num_speakers,
|
||||||
)
|
)
|
||||||
|
elif service_name == 'amazon':
|
||||||
|
transcribe_kwargs = dict(
|
||||||
|
enable_speaker_diarization=speaker_id,
|
||||||
|
num_speakers=num_speakers,
|
||||||
|
)
|
||||||
else:
|
else:
|
||||||
transcribe_kwargs = {}
|
transcribe_kwargs = {}
|
||||||
try:
|
try:
|
||||||
|
|||||||
2
tatt/vendors/google.py
vendored
2
tatt/vendors/google.py
vendored
@@ -100,6 +100,7 @@ class Transcriber(TranscriberBaseClass):
|
|||||||
language_code='en-US',
|
language_code='en-US',
|
||||||
enable_automatic_punctuation=True,
|
enable_automatic_punctuation=True,
|
||||||
enable_speaker_diarization=True,
|
enable_speaker_diarization=True,
|
||||||
|
num_speakers=2,
|
||||||
model='phone_call',
|
model='phone_call',
|
||||||
use_enhanced=True,
|
use_enhanced=True,
|
||||||
) -> str:
|
) -> str:
|
||||||
@@ -124,6 +125,7 @@ class Transcriber(TranscriberBaseClass):
|
|||||||
language_code=language_code,
|
language_code=language_code,
|
||||||
enable_automatic_punctuation=enable_automatic_punctuation,
|
enable_automatic_punctuation=enable_automatic_punctuation,
|
||||||
enable_speaker_diarization=enable_speaker_diarization,
|
enable_speaker_diarization=enable_speaker_diarization,
|
||||||
|
diarization_speaker_count=num_speakers,
|
||||||
model=model,
|
model=model,
|
||||||
use_enhanced=use_enhanced,
|
use_enhanced=use_enhanced,
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user