-
Notifications
You must be signed in to change notification settings - Fork 216
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix kokoro batch issue * code * fix batch size --------- Co-authored-by: Freddy Boulton <[email protected]>
- Loading branch information
1 parent
6517a93
commit df0706e
Showing
2 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
from fastrtc.text_to_speech.tts import get_tts_model | ||
|
||
|
||
def test_tts_long_prompt(): | ||
model = get_tts_model() | ||
prompt = "It may be that this communication will be considered as a madman's freak but at any rate it must be admitted that in its clearness and frankness it left nothing to be desired The serious part of it was that the Federal Government had undertaken to treat a sale by auction as a valid concession of these undiscovered territories Opinions on the matter were many Some readers saw in it only one of those prodigious outbursts of American humbug which would exceed the limits of puffism if the depths of human credulity were not unfathomable" | ||
|
||
for i, chunk in enumerate(model.stream_tts_sync(prompt)): | ||
print(f"Chunk {i}: {chunk[1].shape}") | ||
|
||
|
||
if __name__ == "__main__": | ||
test_tts_long_prompt() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters