Skip to content

Commit 551aeca

Browse files
authored
1 parent c6a1c7e commit 551aeca

File tree

2 files changed

+87
-2
lines changed

2 files changed

+87
-2
lines changed

packages/inference/test/HfInference.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -943,7 +943,7 @@ describe.concurrent("HfInference", () => {
943943
const res = await client.textToSpeech({
944944
model: "OuteAI/OuteTTS-0.3-500M",
945945
provider: "replicate",
946-
text: "OuteTTS is a frontier TTS model for its size of 1 Billion parameters",
946+
inputs: "OuteTTS is a frontier TTS model for its size of 1 Billion parameters",
947947
});
948948

949949
expect(res).toBeInstanceOf(Blob);
@@ -953,7 +953,7 @@ describe.concurrent("HfInference", () => {
953953
const res = await client.textToSpeech({
954954
model: "hexgrad/Kokoro-82M",
955955
provider: "replicate",
956-
text: "Kokoro is a frontier TTS model for its size of 1 Billion parameters",
956+
inputs: "Kokoro is a frontier TTS model for its size of 1 Billion parameters",
957957
});
958958

959959
expect(res).toBeInstanceOf(Blob);

packages/inference/test/tapes.json

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6704,5 +6704,90 @@
67046704
"vary": "Origin, Access-Control-Request-Method, Access-Control-Request-Headers, origin, access-control-request-method, access-control-request-headers"
67056705
}
67066706
}
6707+
},
6708+
"53a03fdaf09d15dc3aa0cb176c23953cb4272717a45aa2af72cd765074dd8307": {
6709+
"url": "https://api.replicate.com/v1/predictions",
6710+
"init": {
6711+
"headers": {
6712+
"Content-Type": "application/json",
6713+
"Prefer": "wait"
6714+
},
6715+
"method": "POST",
6716+
"body": "{\"input\":{},\"version\":\"dfdf537ba482b029e0a761699e6f55e9162cfd159270bfe0e44857caa5f275a6\"}"
6717+
},
6718+
"response": {
6719+
"body": "{\"detail\":\"- input: text is required\\n\",\"status\":422,\"title\":\"Input validation failed\",\"invalid_fields\":[{\"type\":\"required\",\"field\":\"input\",\"description\":\"text is required\"}]}",
6720+
"status": 422,
6721+
"statusText": "Unprocessable Entity",
6722+
"headers": {
6723+
"alt-svc": "h3=\":443\"; ma=86400",
6724+
"cf-cache-status": "DYNAMIC",
6725+
"cf-ray": "90cbb24fdb639efc-CDG",
6726+
"connection": "keep-alive",
6727+
"content-type": "application/problem+json",
6728+
"nel": "{\"success_fraction\":0,\"report_to\":\"cf-nel\",\"max_age\":604800}",
6729+
"preference-applied": "wait=60",
6730+
"ratelimit-remaining": "599",
6731+
"ratelimit-reset": "1",
6732+
"report-to": "{\"endpoints\":[{\"url\":\"https:\\/\\/a.nel.cloudflare.com\\/report\\/v4?s=%2BHmQD3krBculotRlBfBNCOqe1fZv1q1xIGFcai2MgNGaHbsvf7WgsJB%2Bjo%2FsKKvuTDY%2B4jJJZDNL6wmqk7q5zkX6%2BwXvBMBV0R5JMvBoacf73wLlPh%2FrRDKy7SABmZsa%2Boy9T%2B44GEwxyWSt%2F7kA\"}],\"group\":\"cf-nel\",\"max_age\":604800}",
6733+
"server": "cloudflare",
6734+
"server-timing": "cfL4;desc=\"?proto=TCP&rtt=5448&min_rtt=5445&rtt_var=2044&sent=5&recv=5&lost=0&retrans=0&sent_bytes=2846&recv_bytes=934&delivery_rate=742699&cwnd=252&unsent_bytes=0&cid=3f4b267ce20e25a5&ts=287&x=0\"",
6735+
"strict-transport-security": "max-age=15552000",
6736+
"vary": "Accept-Encoding"
6737+
}
6738+
}
6739+
},
6740+
"0320313a3118d664b91484ca2de601db4b10e24f6da34091c3c27a354aead2d6": {
6741+
"url": "https://api.replicate.com/v1/predictions",
6742+
"init": {
6743+
"headers": {
6744+
"Content-Type": "application/json",
6745+
"Prefer": "wait"
6746+
},
6747+
"method": "POST",
6748+
"body": "{\"input\":{\"text\":\"Kokoro is a frontier TTS model for its size of 1 Billion parameters\"},\"version\":\"dfdf537ba482b029e0a761699e6f55e9162cfd159270bfe0e44857caa5f275a6\"}"
6749+
},
6750+
"response": {
6751+
"body": "{\"id\":\"j9092etjmxrge0cmt6atga3h9c\",\"model\":\"jaaari/kokoro-82m\",\"version\":\"dfdf537ba482b029e0a761699e6f55e9162cfd159270bfe0e44857caa5f275a6\",\"input\":{\"text\":\"Kokoro is a frontier TTS model for its size of 1 Billion parameters\"},\"logs\":\"\",\"output\":\"https://replicate.delivery/czjl/jdiXdCIYKRp1L16FEzVzzeIU68neGs6ksVRLfiUW5Intl8XoA/output.wav\",\"data_removed\":false,\"error\":null,\"status\":\"processing\",\"created_at\":\"2025-02-04T15:30:11.751Z\",\"urls\":{\"cancel\":\"https://api.replicate.com/v1/predictions/j9092etjmxrge0cmt6atga3h9c/cancel\",\"get\":\"https://api.replicate.com/v1/predictions/j9092etjmxrge0cmt6atga3h9c\",\"stream\":\"https://stream.replicate.com/v1/files/fddq-bkkoai3wems6tlkt2nz74bz42gfgpkwmrqje3gjwzmwntbbxhmnq\"}}",
6752+
"status": 201,
6753+
"statusText": "Created",
6754+
"headers": {
6755+
"alt-svc": "h3=\":443\"; ma=86400",
6756+
"cf-cache-status": "DYNAMIC",
6757+
"cf-ray": "90cbb355c98d3cb0-CDG",
6758+
"connection": "keep-alive",
6759+
"content-type": "application/json; charset=UTF-8",
6760+
"nel": "{\"success_fraction\":0,\"report_to\":\"cf-nel\",\"max_age\":604800}",
6761+
"preference-applied": "wait=60",
6762+
"ratelimit-remaining": "599",
6763+
"ratelimit-reset": "1",
6764+
"report-to": "{\"endpoints\":[{\"url\":\"https:\\/\\/a.nel.cloudflare.com\\/report\\/v4?s=oZpu2RT9ZeCKT4skQeoJfYxjRdjQ5%2BIHO7dbg8d%2FSF7oKn%2BQnKevVIlAy1kDCFWm29%2BFMcI0pUh4lCne0xpd2UMeunyb8rDojMHu%2B64g5O4TEhhwXYCD6U7Jtn9sdPkj5ui2dVJANyJNoNbVEMbS\"}],\"group\":\"cf-nel\",\"max_age\":604800}",
6765+
"server": "cloudflare",
6766+
"server-timing": "cfL4;desc=\"?proto=TCP&rtt=7078&min_rtt=5485&rtt_var=3195&sent=5&recv=5&lost=0&retrans=0&sent_bytes=2847&recv_bytes=1011&delivery_rate=737283&cwnd=252&unsent_bytes=0&cid=af23c66a04a91d95&ts=51330&x=0\"",
6767+
"strict-transport-security": "max-age=15552000",
6768+
"vary": "Accept-Encoding"
6769+
}
6770+
}
6771+
},
6772+
"257dcdb986bca986b9549147d46765318828a716d699a8766853798ecc49f4f9": {
6773+
"url": "https://replicate.delivery/czjl/jdiXdCIYKRp1L16FEzVzzeIU68neGs6ksVRLfiUW5Intl8XoA/output.wav",
6774+
"init": {},
6775+
"response": {
6776+
"body": "",
6777+
"status": 200,
6778+
"statusText": "OK",
6779+
"headers": {
6780+
"accept-ranges": "bytes",
6781+
"access-control-allow-origin": "*",
6782+
"alt-svc": "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000",
6783+
"cache-control": "public,max-age=3600",
6784+
"cache-id": "PAR-8ec5b013",
6785+
"cache-status": "miss",
6786+
"content-type": "audio/x-wav",
6787+
"etag": "\"242683fd0194f7f98aa5337b5c97d0c1\"",
6788+
"last-modified": "Tue, 04 Feb 2025 15:31:02 GMT",
6789+
"server": "UploadServer"
6790+
}
6791+
}
67076792
}
67086793
}

0 commit comments

Comments
 (0)