Shenava Rizeh v1.5 coreml_ios15
Browse filesFiles changed (14)
- .gitattributes+1
- LICENSEAdded+674
- README.mdAdded+67
- export_coreml_stream.pyAdded+29
- export_onnx_streaming.pyAdded+52
- icefall_export/export-onnx-streaming.pyAdded+1192
- reference/chunks.f32Added+3
- reference/expected.jsonAdded+65
- run_coreml_stream.pyAdded+18
- shenava_rizeh_v1_5_decoder_ios15_fp16.mlmodelAdded+3
- shenava_rizeh_v1_5_encoder_streaming_c16_l128_ios15_fp16.mlmodelAdded+3
- shenava_rizeh_v1_5_encoder_streaming_c16_l128_ios15_fp16_manifest.jsonAdded+588
- shenava_rizeh_v1_5_joiner_ios15_fp16.mlmodelAdded+3
- tokens.txtAdded+2080
32 unmodified lines3334353632 unmodified lines*.zip filter=lfs diff=lfs merge=lfs -text*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -textreference/chunks.f32 filter=lfs diff=lfs merge=lfs -text123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674 GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/> Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license forsoftware and other kinds of works.
The licenses for most software and other practical works are designedto take away your freedom to share and change the works. By contrast,the GNU General Public License is intended to guarantee your freedom toshare and change all versions of a program--to make sure it remains freesoftware for all its users. We, the Free Software Foundation, use theGNU General Public License for most of our software; it applies also toany other work released this way by its authors. You can apply it toyour programs, too.
When we speak of free software, we are referring to freedom, notprice. Our General Public Licenses are designed to make sure that youhave the freedom to distribute copies of free software (and charge forthem if you wish), that you receive source code or can get it if youwant it, that you can change the software or use pieces of it in newfree programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying youthese rights or asking you to surrender the rights. Therefore, you havecertain responsibilities if you distribute copies of the software, or ifyou modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whethergratis or for a fee, you must pass on to the recipients the samefreedoms that you received. You must make sure that they, too, receiveor can get the source code. And you must show them these terms so theyknow their rights.
Developers that use the GNU GPL protect your rights with two steps:(1) assert copyright on the software, and (2) offer you this Licensegiving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explainsthat there is no warranty for this free software. For both users' andauthors' sake, the GPL requires that modified versions be marked aschanged, so that their problems will not be attributed erroneously toauthors of previous versions.
Some devices are designed to deny users access to install or runmodified versions of the software inside them, although the manufacturercan do so. This is fundamentally incompatible with the aim ofprotecting users' freedom to change the software. The systematicpattern of such abuse occurs in the area of products for individuals touse, which is precisely where it is most unacceptable. Therefore, wehave designed this version of the GPL to prohibit the practice for thoseproducts. If such problems arise substantially in other domains, westand ready to extend this provision to those domains in future versionsof the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.States should not allow patents to restrict development and use ofsoftware on general-purpose computers, but in those that do, we wish toavoid the special danger that patents applied to a free program couldmake it effectively proprietary. To prevent this, the GPL assures thatpatents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution andmodification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds ofworks, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under thisLicense. Each licensee is addressed as "you". "Licensees" and"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the workin a fashion requiring copyright permission, other than the making of anexact copy. The resulting work is called a "modified version" of theearlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work basedon the Program.
To "propagate" a work means to do anything with it that, withoutpermission, would make you directly or secondarily liable forinfringement under applicable copyright law, except executing it on acomputer or modifying a private copy. Propagation includes copying,distribution (with or without modification), making available to thepublic, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables otherparties to make or receive copies. Mere interaction with a user througha computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"to the extent that it includes a convenient and prominently visiblefeature that (1) displays an appropriate copyright notice, and (2)tells the user that there is no warranty for the work (except to theextent that warranties are provided), that licensees may convey thework under this License, and how to view a copy of this License. Ifthe interface presents a list of user commands or options, such as amenu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the workfor making modifications to it. "Object code" means any non-sourceform of a work.
A "Standard Interface" means an interface that either is an officialstandard defined by a recognized standards body, or, in the case ofinterfaces specified for a particular programming language, one thatis widely used among developers working in that language.
The "System Libraries" of an executable work include anything, otherthan the work as a whole, that (a) is included in the normal form ofpackaging a Major Component, but which is not part of that MajorComponent, and (b) serves only to enable use of the work with thatMajor Component, or to implement a Standard Interface for which animplementation is available to the public in source code form. A"Major Component", in this context, means a major essential component(kernel, window system, and so on) of the specific operating system(if any) on which the executable work runs, or a compiler used toproduce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means allthe source code needed to generate, install, and (for an executablework) run the object code and to modify the work, including scripts tocontrol those activities. However, it does not include the work'sSystem Libraries, or general-purpose tools or generally available freeprograms which are used unmodified in performing those activities butwhich are not part of the work. For example, Corresponding Sourceincludes interface definition files associated with source files forthe work, and the source code for shared libraries and dynamicallylinked subprograms that the work is specifically designed to require,such as by intimate data communication or control flow between thosesubprograms and other parts of the work.
The Corresponding Source need not include anything that userscan regenerate automatically from other parts of the CorrespondingSource.
The Corresponding Source for a work in source code form is thatsame work.
2. Basic Permissions.
All rights granted under this License are granted for the term ofcopyright on the Program, and are irrevocable provided the statedconditions are met. This License explicitly affirms your unlimitedpermission to run the unmodified Program. The output from running acovered work is covered by this License only if the output, given itscontent, constitutes a covered work. This License acknowledges yourrights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do notconvey, without conditions so long as your license otherwise remainsin force. You may convey covered works to others for the sole purposeof having them make modifications exclusively for you, or provide youwith facilities for running those works, provided that you comply withthe terms of this License in conveying all material for which you donot control copyright. Those thus making or running the covered worksfor you must do so exclusively on your behalf, under your directionand control, on terms that prohibit them from making any copies ofyour copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely underthe conditions stated below. Sublicensing is not allowed; section 10makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technologicalmeasure under any applicable law fulfilling obligations under article11 of the WIPO copyright treaty adopted on 20 December 1996, orsimilar laws prohibiting or restricting circumvention of suchmeasures.
When you convey a covered work, you waive any legal power to forbidcircumvention of technological measures to the extent such circumventionis effected by exercising rights under this License with respect tothe covered work, and you disclaim any intention to limit operation ormodification of the work as a means of enforcing, against the work'susers, your or third parties' legal rights to forbid circumvention oftechnological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as youreceive it, in any medium, provided that you conspicuously andappropriately publish on each copy an appropriate copyright notice;keep intact all notices stating that this License and anynon-permissive terms added in accord with section 7 apply to the code;keep intact all notices of the absence of any warranty; and give allrecipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications toproduce it from the Program, in the form of source code under theterms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified it, and giving a relevant date.
b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices".
c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so.
A compilation of a covered work with other separate and independentworks, which are not by their nature extensions of the covered work,and which are not combined with it such as to form a larger program,in or on a volume of a storage or distribution medium, is called an"aggregate" if the compilation and its resulting copyright are notused to limit the access or legal rights of the compilation's usersbeyond what the individual works permit. Inclusion of a covered workin an aggregate does not cause this License to apply to the otherparts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the termsof sections 4 and 5, provided that you also convey themachine-readable Corresponding Source under the terms of this License,in one of these ways:
a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b.
d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d.
A separable portion of the object code, whose source code is excludedfrom the Corresponding Source as a System Library, need not beincluded in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means anytangible personal property which is normally used for personal, family,or household purposes, or (2) anything designed or sold for incorporationinto a dwelling. In determining whether a product is a consumer product,doubtful cases shall be resolved in favor of coverage. For a particularproduct received by a particular user, "normally used" refers to atypical or common use of that class of product, regardless of the statusof the particular user or of the way in which the particular useractually uses, or expects or is expected to use, the product. A productis a consumer product regardless of whether the product has substantialcommercial, industrial or non-consumer uses, unless such uses representthe only significant mode of use of the product.
"Installation Information" for a User Product means any methods,procedures, authorization keys, or other information required to installand execute modified versions of a covered work in that User Product froma modified version of its Corresponding Source. The information mustsuffice to ensure that the continued functioning of the modified objectcode is in no case prevented or interfered with solely becausemodification has been made.
If you convey an object code work under this section in, or with, orspecifically for use in, a User Product, and the conveying occurs aspart of a transaction in which the right of possession and use of theUser Product is transferred to the recipient in perpetuity or for afixed term (regardless of how the transaction is characterized), theCorresponding Source conveyed under this section must be accompaniedby the Installation Information. But this requirement does not applyif neither you nor any third party retains the ability to installmodified object code on the User Product (for example, the work hasbeen installed in ROM).
The requirement to provide Installation Information does not include arequirement to continue to provide support service, warranty, or updatesfor a work that has been modified or installed by the recipient, or forthe User Product in which it has been modified or installed. Access to anetwork may be denied when the modification itself materially andadversely affects the operation of the network or violates the rules andprotocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,in accord with this section must be in a format that is publiclydocumented (and with an implementation available to the public insource code form), and must require no special password or key forunpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of thisLicense by making exceptions from one or more of its conditions.Additional permissions that are applicable to the entire Program shallbe treated as though they were included in this License, to the extentthat they are valid under applicable law. If additional permissionsapply only to part of the Program, that part may be used separatelyunder those permissions, but the entire Program remains governed bythis License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your optionremove any additional permissions from that copy, or from any part ofit. (Additional permissions may be written to require their ownremoval in certain cases when you modify the work.) You may placeadditional permissions on material, added by you to a covered work,for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material youadd to a covered work, you may (if authorized by the copyright holders ofthat material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or authors of the material; or
e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors.
All other non-permissive additional terms are considered "furtherrestrictions" within the meaning of section 10. If the Program as youreceived it, or any part of it, contains a notice stating that it isgoverned by this License along with a term that is a furtherrestriction, you may remove that term. If a license document containsa further restriction but permits relicensing or conveying under thisLicense, you may add to a covered work material governed by the termsof that license document, provided that the further restriction doesnot survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, youmust place, in the relevant source files, a statement of theadditional terms that apply to those files, or a notice indicatingwhere to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in theform of a separately written license, or stated as exceptions;the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expresslyprovided under this License. Any attempt otherwise to propagate ormodify it is void, and will automatically terminate your rights underthis License (including any patent licenses granted under the thirdparagraph of section 11).
However, if you cease all violation of this License, then yourlicense from a particular copyright holder is reinstated (a)provisionally, unless and until the copyright holder explicitly andfinally terminates your license, and (b) permanently, if the copyrightholder fails to notify you of the violation by some reasonable meansprior to 60 days after the cessation.
Moreover, your license from a particular copyright holder isreinstated permanently if the copyright holder notifies you of theviolation by some reasonable means, this is the first time you havereceived notice of violation of this License (for any work) from thatcopyright holder, and you cure the violation prior to 30 days afteryour receipt of the notice.
Termination of your rights under this section does not terminate thelicenses of parties who have received copies or rights from you underthis License. If your rights have been terminated and not permanentlyreinstated, you do not qualify to receive new licenses for the samematerial under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive orrun a copy of the Program. Ancillary propagation of a covered workoccurring solely as a consequence of using peer-to-peer transmissionto receive a copy likewise does not require acceptance. However,nothing other than this License grants you permission to propagate ormodify any covered work. These actions infringe copyright if you donot accept this License. Therefore, by modifying or propagating acovered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automaticallyreceives a license from the original licensors, to run, modify andpropagate that work, subject to this License. You are not responsiblefor enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of anorganization, or substantially all assets of one, or subdividing anorganization, or merging organizations. If propagation of a coveredwork results from an entity transaction, each party to thattransaction who receives a copy of the work also receives whateverlicenses to the work the party's predecessor in interest had or couldgive under the previous paragraph, plus a right to possession of theCorresponding Source of the work from the predecessor in interest, ifthe predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of therights granted or affirmed under this License. For example, you maynot impose a license fee, royalty, or other charge for exercise ofrights granted under this License, and you may not initiate litigation(including a cross-claim or counterclaim in a lawsuit) alleging thatany patent claim is infringed by making, using, selling, offering forsale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under thisLicense of the Program or a work on which the Program is based. Thework thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claimsowned or controlled by the contributor, whether already acquired orhereafter acquired, that would be infringed by some manner, permittedby this License, of making, using, or selling its contributor version,but do not include claims that would be infringed only as aconsequence of further modification of the contributor version. Forpurposes of this definition, "control" includes the right to grantpatent sublicenses in a manner consistent with the requirements ofthis License.
Each contributor grants you a non-exclusive, worldwide, royalty-freepatent license under the contributor's essential patent claims, tomake, use, sell, offer for sale, import and otherwise run, modify andpropagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any expressagreement or commitment, however denominated, not to enforce a patent(such as an express permission to practice a patent or covenant not tosue for patent infringement). To "grant" such a patent license to aparty means to make such an agreement or commitment not to enforce apatent against the party.
If you convey a covered work, knowingly relying on a patent license,and the Corresponding Source of the work is not available for anyoneto copy, free of charge and under the terms of this License, through apublicly available network server or other readily accessible means,then you must either (1) cause the Corresponding Source to be soavailable, or (2) arrange to deprive yourself of the benefit of thepatent license for this particular work, or (3) arrange, in a mannerconsistent with the requirements of this License, to extend the patentlicense to downstream recipients. "Knowingly relying" means you haveactual knowledge that, but for the patent license, your conveying thecovered work in a country, or your recipient's use of the covered workin a country, would infringe one or more identifiable patents in thatcountry that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction orarrangement, you convey, or propagate by procuring conveyance of, acovered work, and grant a patent license to some of the partiesreceiving the covered work authorizing them to use, propagate, modifyor convey a specific copy of the covered work, then the patent licenseyou grant is automatically extended to all recipients of the coveredwork and works based on it.
A patent license is "discriminatory" if it does not include withinthe scope of its coverage, prohibits the exercise of, or isconditioned on the non-exercise of one or more of the rights that arespecifically granted under this License. You may not convey a coveredwork if you are a party to an arrangement with a third party that isin the business of distributing software, under which you make paymentto the third party based on the extent of your activity of conveyingthe work, and under which the third party grants, to any of theparties who would receive the covered work from you, a discriminatorypatent license (a) in connection with copies of the covered workconveyed by you (or copies made from those copies), or (b) primarilyfor and in connection with specific products or compilations thatcontain the covered work, unless you entered into that arrangement,or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limitingany implied license or other defenses to infringement that mayotherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement orotherwise) that contradict the conditions of this License, they do notexcuse you from the conditions of this License. If you cannot convey acovered work so as to satisfy simultaneously your obligations under thisLicense and any other pertinent obligations, then as a consequence you maynot convey it at all. For example, if you agree to terms that obligate youto collect a royalty for further conveying from those to whom you conveythe Program, the only way you could satisfy both those terms and thisLicense would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you havepermission to link or combine any covered work with a work licensedunder version 3 of the GNU Affero General Public License into a singlecombined work, and to convey the resulting work. The terms of thisLicense will continue to apply to the part which is the covered work,but the special requirements of the GNU Affero General Public License,section 13, concerning interaction through a network will apply to thecombination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions ofthe GNU General Public License from time to time. Such new versions willbe similar in spirit to the present version, but may differ in detail toaddress new problems or concerns.
Each version is given a distinguishing version number. If theProgram specifies that a certain numbered version of the GNU GeneralPublic License "or any later version" applies to it, you have theoption of following the terms and conditions either of that numberedversion or of any later version published by the Free SoftwareFoundation. If the Program does not specify a version number of theGNU General Public License, you may choose any version ever publishedby the Free Software Foundation.
If the Program specifies that a proxy can decide which futureversions of the GNU General Public License can be used, that proxy'spublic statement of acceptance of a version permanently authorizes youto choose that version for the Program.
Later license versions may give you additional or differentpermissions. However, no additional obligations are imposed on anyauthor or copyright holder as a result of your choosing to follow alater version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BYAPPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHTHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTYOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULARPURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAMIS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OFALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITINGWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYSTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANYGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THEUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OFDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRDPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OFSUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability providedabove cannot be given local legal effect according to their terms,reviewing courts shall apply local law that most closely approximatesan absolute waiver of all civil liability in connection with theProgram, unless a warranty or assumption of liability accompanies acopy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatestpossible use to the public, the best way to achieve this is to make itfree software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safestto attach them to the start of each source file to most effectivelystate the exclusion of warranty; and each file should have at leastthe "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.> Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a shortnotice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author> This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriateparts of the General Public License. Of course, your program's commandsmight be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,if any, to sign a "copyright disclaimer" for the program, if necessary.For more information on this, and how to apply and follow the GNU GPL, see<https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your programinto proprietary programs. If your program is a subroutine library, youmay consider it more useful to permit linking proprietary applications withthe library. If this is what you want to do, use the GNU Lesser GeneralPublic License instead of this License. But first, please read<https://www.gnu.org/licenses/why-not-lgpl.html>.12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667---language:- fa- enlicense: gpl-3.0library_name: coremlpipeline_tag: automatic-speech-recognitionbase_model:- Reza2kn/Shenava-Rizeh-v1.5base_model_relation: quantizedtags:- automatic-speech-recognition- persian- farsi- zipformer- rnnt- transducer- streaming- on-device- shenava- coreml- fp16- ios---
# 🎙️ Shenava-Rizeh-v1.5-CoreML-iOS15-fp16 (streaming)
A cache-aware **streaming** Core ML export of [Shenava Rizeh v1.5](https://huggingface.co/Reza2kn/Shenava-Rizeh-v1.5) for live captions on iOS 15+ / macOS 12+. It uses the NeuralNetwork format with fp16 weights. Each encoder call consumes **320 ms** of audio and returns 8 encoder frames. Attention looks back up to 128 frames (2.56 s), and all caches are explicit inputs and outputs.
> **Not a drop-in for the v1.0 file.** v1.0 was CTC with 170 ms steps. v1.5 is an RNN-T transducer: the encoder step is followed by a decoder/joiner loop (see `run_coreml_stream.py`).
## Accuracy (EVEN half of golden-6669 + FLEURS, 2,758 clips, no LM, official TT, beam 4)
| Mode | TT ||---|---|| Offline (whole utterance) | 4.35 || **Streaming, 320 ms chunks (this export)** | **5.31** || Streaming, 640 ms chunks (re-export with `export_coreml_stream.py model.tzf out 32 128`) | 5.19 || Streaming, 320 ms chunks, int8 ONNX | 5.32 |
These streaming numbers come from the identical ONNX graph in sherpa-onnx. The traced PyTorch graph that was converted here reproduces the onnxruntime tokens exactly (`reference/`). **The Core ML fp16 runtime itself has not been run on Apple hardware yet.** Run `python run_coreml_stream.py` once on a Mac; it should print `token match: True`.
## Files
- `shenava_rizeh_v1_5_encoder_streaming_c16_l128_ios15_fp16.mlmodel`: encoder step. - Inputs: `x` (1, 45, 80) fbank plus 92 cache tensors. - Outputs: `encoder_out` (1, 8, 512) plus `new_<cache>` for each cache.- `..._manifest.json`: every input shape. Start all caches at zero; `processed_lens` is int32.- `shenava_rizeh_v1_5_decoder_ios15_fp16.mlmodel`: `y` int32 (1, 2) → `decoder_out` (1, 512).- `shenava_rizeh_v1_5_joiner_ios15_fp16.mlmodel`: (`encoder_out` (1, 512), `decoder_out` (1, 512)) → `logit` (1, 2080).- `tokens.txt`, `run_coreml_stream.py`, `reference/`, and the export scripts.
## Streaming loop
1. Compute 80-dim kaldi fbank on the incoming audio (same settings as the [fp16 package](https://huggingface.co/Reza2kn/Shenava-Rizeh-v1.5-CoreML-fp16#features-must-match-exactly)).2. Each step, take **45 frames** and advance by **32** (a 13-frame overlap is needed by the subsampling).3. Call the encoder with `x` and all caches, then replace each cache with its `new_` output.4. For each of the 8 output frames, run greedy RNN-T: - Blank is 0 and the decoder context is the last 2 tokens, starting `[0, 0]`. - **Mask ids 32–1055** (the English block).5. At end of speech, append about 0.8 s of silence so the final words come out.
Numbers come out as Persian digits, and punctuation is included (teacher-style text), so no ITN is needed.
## License
GPL-3.0, inherited from tinyasr.1234567891011121314151617181920212223242526272829"""CoreML streaming step (iOS15 NeuralNetwork, fp16 weights) of Shenava Rizeh v1.5: one 320 ms chunk in -> encoder frames + next caches out.Decoder/joiner: same as the fp16 package but converted to neuralnetwork too. usage: export_coreml_stream.py model.tzf outdir [chunk] [left]"""import sys,os,json,numpy as np,torch,torch.nn as nn,coremltools as cttzf,out=sys.argv[1],sys.argv[2];CH=int(sys.argv[3]) if len(sys.argv)>3 else 16;LC=int(sys.argv[4]) if len(sys.argv)>4 else 128OUTDIR=out;os.makedirs(out,exist_ok=True)src=open(os.path.join(os.path.dirname(os.path.abspath(__file__)),'export_onnx_streaming.py')).read().split("f=f'{out}/encoder.onnx'")[0]sys.argv=['x',tzf,'/tmp/_unused_stream',str(CH),str(LC)];exec(src)E.encoder.__class__.forward=E.encoder.__class__.streaming_forwardst=E.get_init_states();names=[]for i in range((len(st)-2)//6): names+= [f'{k}_{i}' for k in ['cached_key','cached_nonlin_attn','cached_val1','cached_val2','cached_conv1','cached_conv2']]names+=['embed_states','processed_lens']class Flat(nn.Module): def __init__(s,E): super().__init__();s.E=E def forward(s,x,*states): eo,ns=s.E(x,list(states));return (eo,*ns)F=Flat(E).eval();T=CH*2+13;x=torch.rand(1,T,80)st=[t.to(torch.int32) if t.dtype==torch.int64 else t for t in st]ref=F(x,*st);tr=torch.jit.trace(F,(x,*st))inputs=[ct.TensorType(name='x',shape=(1,T,80))]+[ct.TensorType(name=n,shape=tuple(t.shape),dtype=np.int32 if t.dtype==torch.int32 else np.float32) for n,t in zip(names,st)]outputs=[ct.TensorType(name='encoder_out')]+[ct.TensorType(name='new_'+n) for n in names]ml=ct.convert(tr,inputs=inputs,outputs=outputs,convert_to='neuralnetwork',minimum_deployment_target=ct.target.iOS14)from coremltools.models.neural_network import quantization_utilsml16=quantization_utils.quantize_weights(ml,nbits=16)fn=f'{OUTDIR}/shenava_rizeh_v1_5_encoder_streaming_c{CH}_l{LC}_ios15_fp16.mlmodel';ml16.save(fn)json.dump({'format':'CoreML NeuralNetwork (iOS14 target, runs on iOS15+) fp16-weight cache-aware streaming Zipformer2 encoder step','chunk_frames_after_subsampling':CH,'left_context_frames':LC, 'feature_frames_per_step':T,'feature_shift_per_step':CH*2,'ms_per_step':CH*2*10,'encoder_out':list(ref[0].shape), 'inputs':{n:list(t.shape) for n,t in zip(['x']+names,[x]+st)},'state_dtypes':{n:str(t.dtype) for n,t in zip(names,st)}},open(fn.replace('.mlmodel','_manifest.json'),'w'),indent=1)print('saved',fn,ref[0].shape)12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152"""Streaming (chunked, cache-aware) sherpa-onnx export of Shenava Rizeh v1.5: encoder with explicit state I/O (+int8).Decoder/joiner are identical to the offline export (reuse pub/sherpa). usage: export_onnx_streaming.py model.tzf outdir [chunk=16] [left=128]"""import sys,os,ast,logging,torch,torch.nn as nn,onnxfrom typing import Dict, List, Tuplefrom pathlib import PathH=os.path.dirname(os.path.abspath(__file__));sys.path.insert(0,H)from build_model import loadfrom scaling_converter import convert_scaled_to_non_scaledfrom onnxruntime.quantization import QuantType,quantize_dynamictzf,out=sys.argv[1],sys.argv[2];CH=int(sys.argv[3]) if len(sys.argv)>3 else 16;LC=int(sys.argv[4]) if len(sys.argv)>4 else 128os.makedirs(out,exist_ok=True)m,d,*_=load(tzf);m.eval();torch.set_grad_enabled(False)for x in m.modules(): if hasattr(x,'batch_count'): x.batch_count=1e6LANG=list(d['text'].values()).index('fa')_js=torch.jit.script;torch.jit.script=lambda q,*a,**k:qconvert_scaled_to_non_scaled(m,inplace=True,is_onnx=False)from scaling import SwooshL,SwooshR,SwooshLOnnx,SwooshROnnxfor _n,_q in list(m.named_modules()): for _c,_ch in list(_q.named_children()): if isinstance(_ch,SwooshR): setattr(_q,_c,SwooshROnnx()) elif isinstance(_ch,SwooshL): setattr(_q,_c,SwooshLOnnx())torch.jit.script=_jsm.encoder.chunk_size=(CH,);m.encoder.left_context_frames=(LC,)# pull OnnxEncoder / add_meta_data / export_encoder_model_onnx verbatim from icefall's export-onnx-streaming.pysrc=open(os.path.join(H,'icefall','export-onnx-streaming.py')).read();tree=ast.parse(src)keep=[n for n in tree.body if getattr(n,'name',None) in {'add_meta_data','OnnxEncoder','export_encoder_model_onnx'}]g={'torch':torch,'nn':nn,'onnx':onnx,'logging':logging,'Dict':Dict,'List':List,'Tuple':Tuple,'Path':Path, 'Zipformer2':object,'get_onnx_export_kwargs':lambda:{'dynamo':False}}exec(compile(ast.Module(keep,type_ignores=[]),'icefall_export_onnx_streaming','exec'),g)class EmbedLang(nn.Module): """encoder_embed + Persian language vector (tinyasr adds lang_embed[fa] right after the embed)""" def __init__(s,emb,lv): super().__init__();s.emb=emb;s.register_buffer('lv',lv.clone()) def streaming_forward(s,x,x_lens,cached_left_pad): y,yl,c=s.emb.streaming_forward(x=x,x_lens=x_lens,cached_left_pad=cached_left_pad);return y+s.lv,yl,c def get_init_states(s,*a,**k): return s.emb.get_init_states(*a,**k)E=g['OnnxEncoder'](m.encoder,EmbedLang(m.encoder_embed,m.lang_embed.weight[LANG]),m.joiner.encoder_proj).eval()f=f'{out}/encoder.onnx'STATIC=len(sys.argv)>5 and sys.argv[5]=='static'g['export_encoder_model_onnx'](E,f,opset_version=13,dynamic_batch=not STATIC)if STATIC: import onnxsim sm,ok=onnxsim.simplify(onnx.load(f));assert ok;onnx.save(sm,f);print('simplified (batch=1, all shapes static)')mo=onnx.load(f);meta={p.key:p.value for p in mo.metadata_props}for k,v in {'model_author':'Reza2kn (Shenava Rizeh v1.5, from dkaraush/tinyasr en-fa)','comment':'streaming zipformer2, Persian language vector baked in; mask English token block 32..1055 when decoding','language':'fa'}.items(): for p in mo.metadata_props: if p.key==k: p.value=v;break else: q=mo.metadata_props.add();q.key=k;q.value=vonnx.save(mo,f);print('meta',{p.key:p.value for p in mo.metadata_props})quantize_dynamic(model_input=f,model_output=f'{out}/encoder.int8.onnx',op_types_to_quantize=['MatMul'],weight_type=QuantType.QInt8)print('done')1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192#!/usr/bin/env python3## Copyright 2023 Xiaomi Corporation (Author: Fangjun Kuang, Wei Kang)# Copyright 2023 Danqing Fu (danqing.fu@gmail.com)
"""This script exports a transducer model from PyTorch to ONNX.
We use the pre-trained model fromhttps://huggingface.co/Zengwei/icefall-asr-librispeech-streaming-zipformer-2023-05-17as an example to show how to use this file.
1. Download the pre-trained model
cd egs/librispeech/ASR
repo_url=https://huggingface.co/Zengwei/icefall-asr-librispeech-streaming-zipformer-2023-05-17GIT_LFS_SKIP_SMUDGE=1 git clone $repo_urlrepo=$(basename $repo_url)
pushd $repogit lfs pull --include "exp/pretrained.pt"
cd expln -s pretrained.pt epoch-99.ptpopd
2. Export the model to ONNX
./zipformer/export-onnx-streaming.py \ --tokens $repo/data/lang_bpe_500/tokens.txt \ --use-averaged-model 0 \ --epoch 99 \ --avg 1 \ --exp-dir $repo/exp \ --num-encoder-layers "2,2,3,4,3,2" \ --downsampling-factor "1,2,4,8,4,2" \ --feedforward-dim "512,768,1024,1536,1024,768" \ --num-heads "4,4,4,8,4,4" \ --encoder-dim "192,256,384,512,384,256" \ --query-head-dim 32 \ --value-head-dim 12 \ --pos-head-dim 4 \ --pos-dim 48 \ --encoder-unmasked-dim "192,192,256,256,256,192" \ --cnn-module-kernel "31,31,15,15,15,31" \ --decoder-dim 512 \ --joiner-dim 512 \ --causal True \ --chunk-size 16 \ --left-context-frames 128 \ --fp16 True
The --chunk-size in training is "16,32,64,-1", so we select one of them(excluding -1) during streaming export. The same applies to `--left-context`,whose value is "64,128,256,-1".
It will generate the following 3 files inside $repo/exp:
- encoder-epoch-99-avg-1-chunk-16-left-128.onnx - decoder-epoch-99-avg-1-chunk-16-left-128.onnx - joiner-epoch-99-avg-1-chunk-16-left-128.onnx
See ./onnx_pretrained-streaming.py for how to use the exported ONNX models."""
import argparseimport copyimport loggingimport tempfilefrom pathlib import Pathfrom typing import Dict, List, Tuple
import k2import onnximport torchimport torch.nn as nnfrom decoder import ( Decoder, check_decoder_conv_as_matmul_onnx, replace_decoder_conv_with_matmul,)from onnxruntime.quantization import QuantType, quantize_dynamicfrom scaling_converter import convert_scaled_to_non_scaledfrom train import add_model_arguments, get_model, get_paramsfrom zipformer import Zipformer2
from icefall.checkpoint import ( average_checkpoints, average_checkpoints_with_averaged_model, find_checkpoints, load_checkpoint,)from icefall.utils import num_tokens, str2boolfrom icefall.utils import get_onnx_export_kwargs
def get_parser(): parser = argparse.ArgumentParser( formatter_class=argparse.ArgumentDefaultsHelpFormatter )
parser.add_argument( "--dynamic-batch", type=int, default=1, help="1 to support dynamic batch size. 0 to support only batch size == 1", )
parser.add_argument( "--enable-int8-quantization", type=int, default=1, help="1 to also export int8 onnx models.", )
parser.add_argument( "--use-int32-inputs", type=int, default=0, help="""1 to use int32_t as input types if applicable. 0 to use int64_t otherwise.""", )
parser.add_argument( "--is-rknn-export", type=int, default=0, help="""1 if the exported models will be converted by rknn-toolkit2. It keeps the padding masks as bool and avoids no-op Cast nodes, which rknn-toolkit2 cannot convert (it aborts with "Meet unsupported conv, input tensor name: ... input type: 6"). 0 to keep the previous behavior.""", )
parser.add_argument( "--epoch", type=int, default=28, help="""It specifies the checkpoint to use for averaging. Note: Epoch counts from 0. You can specify --avg to use more checkpoints for model averaging.""", )
parser.add_argument( "--iter", type=int, default=0, help="""If positive, --epoch is ignored and it will use the checkpoint exp_dir/checkpoint-iter.pt. You can specify --avg to use more checkpoints for model averaging. """, )
parser.add_argument( "--avg", type=int, default=15, help="Number of checkpoints to average. Automatically select " "consecutive checkpoints before the checkpoint specified by " "'--epoch' and '--iter'", )
parser.add_argument( "--use-averaged-model", type=str2bool, default=True, help="Whether to load averaged model. Currently it only supports " "using --epoch. If True, it would decode with the averaged model " "over the epoch range from `epoch-avg` (excluded) to `epoch`." "Actually only the models with epoch number of `epoch-avg` and " "`epoch` are loaded for averaging. ", )
parser.add_argument( "--exp-dir", type=str, default="zipformer/exp", help="""It specifies the directory where all training related files, e.g., checkpoints, log, etc, are saved """, )
parser.add_argument( "--tokens", type=str, default="data/lang_bpe_500/tokens.txt", help="Path to the tokens.txt", )
parser.add_argument( "--context-size", type=int, default=2, help="The context size in the decoder. 1 means bigram; 2 means tri-gram", )
parser.add_argument( "--fp16", type=str2bool, default=False, help="Whether to export models in fp16", )
parser.add_argument( "--use-whisper-features", type=str2bool, default=False, help="True to use whisper features. Must match the one used in training", )
parser.add_argument( "--decoder-conv-as-matmul", type=str2bool, default=False, help="""True to export the decoder's grouped Conv1d as an equivalent MatMul (same outputs up to float rounding). With ONNX Runtime's CUDA provider this removes the Conv kernel's per-node lock, which serializes a decoder session shared by several threads when the batch size changes between runs.""", )
parser.add_argument( "--use-external-data", type=str2bool, default=False, help="Set it to true for model file size > 2GB", )
add_model_arguments(parser)
return parser
def _load_float16_converter(): """Return the float16 conversion function.
onnxmltools <= 1.12 exposes it as onnxmltools.utils.float16_converter; newer versions removed that module in favor of onnxconverter-common, whose convert_float_to_float16() is the same implementation. """ try: from onnxmltools.utils.float16_converter import ( # noqa: F401 convert_float_to_float16, convert_float_to_float16_model_path, ) except ImportError: from onnxconverter_common.float16 import ( convert_float_to_float16, convert_float_to_float16_model_path, )
return convert_float_to_float16, convert_float_to_float16_model_path
def _fix_cast_nodes_after_fp16_conversion(model): """Fix Cast nodes left inconsistent by convert_float_to_float16().
The converter (onnxconverter-common, which also backs onnxmltools.utils.float16_converter) never updates the ``to`` attribute of Cast nodes, yet it rewrites the declared type of every float32 tensor in graph.value_info to float16. A Cast producing float32 is thus left with ``to`` == float while its output is declared float16, and onnxruntime (hence sherpa-onnx) refuses to load the exported model with
Type Error: Type (tensor(float16)) of output arg (/decoder/Cast_1_output_0) of node (/decoder/Cast_1) does not match expected type (tensor(float)).
Such Cast nodes are common: e.g. the bool->float cast generated for ``self.embedding(y.clamp(min=0)) * (y >= 0).unsqueeze(-1)`` in decoder.py. Note that a model *trained* in fp16 exports with ``Cast(to=float16)`` there, which is why natively-fp16 models load fine and fp32-trained ones converted by this script do not (see issue #2011).
The fix aligns ``to`` with the already-converted output type so the Cast produces float16 directly, matching all its (already fp16) consumers. Casts whose output is not declared float16 (e.g. ones the converter kept in fp32) are left untouched.
See https://github.com/k2-fsa/icefall/issues/2011. """ FLOAT = onnx.TensorProto.FLOAT FLOAT16 = onnx.TensorProto.FLOAT16
def fix_graph(graph): declared_fp16 = { value_info.name for value_info in list(graph.value_info) + list(graph.output) if value_info.type.tensor_type.elem_type == FLOAT16 } num_fixed = 0 for node in graph.node: if node.op_type != "Cast": continue for attr in node.attribute: if attr.name != "to" or attr.i != FLOAT: continue if any(name in declared_fp16 for name in node.output): attr.i = FLOAT16 num_fixed += 1 # recurse into sub-graphs, if any (If/Loop bodies) for node in graph.node: for attr in node.attribute: if attr.HasField("g"): num_fixed += fix_graph(attr.g) for sub_graph in attr.graphs: num_fixed += fix_graph(sub_graph) return num_fixed
num_fixed = fix_graph(model.graph) if num_fixed > 0: logging.info( f"Fixed {num_fixed} Cast node(s) whose 'to' attribute was left " "float32 by the fp16 converter" ) return model
def _remove_noop_cast_nodes(model: onnx.ModelProto) -> int: """Remove Cast nodes that don't change the element type.
PyTorch exports redundant Cast nodes in some cases, e.g. a bool->bool cast from ``mask.to(torch.bool)`` when the mask is already bool. rknn-toolkit2 cannot convert such nodes: it reports "E RKNN: dataconvert type -1 is unsupport in current!" and aborts (core dumped), so for --is-rknn-export 1 we drop them. Removing a no-op Cast does not change model semantics.
Returns the number of removed nodes. """ model_with_types = onnx.shape_inference.infer_shapes(model) elem_types = {} for vi in ( list(model_with_types.graph.input) + list(model_with_types.graph.value_info) + list(model_with_types.graph.output) ): if vi.type.HasField("tensor_type"): elem_types[vi.name] = vi.type.tensor_type.elem_type
graph = model.graph output_names = {o.name for o in graph.output}
# name of a no-op Cast output -> name of its input redirect = {} for node in graph.node: if node.op_type != "Cast": continue if len(node.input) != 1 or len(node.output) != 1: continue if node.output[0] in output_names: # keep the node so graph outputs are not renamed continue to = None for attr in node.attribute: if attr.name == "to": to = attr.i in_type = elem_types.get(node.input[0]) if to is not None and in_type is not None and to == in_type: redirect[node.output[0]] = node.input[0]
if not redirect: return 0
def resolve(name: str) -> str: """Follow chains of no-op casts and return the final tensor name.""" while name in redirect: name = redirect[name] return name
kept = [] for node in graph.node: if len(node.output) == 1 and node.output[0] in redirect: continue for i, name in enumerate(node.input): if name in redirect: node.input[i] = resolve(name) kept.append(node)
del graph.node[:] graph.node.extend(kept) return len(redirect)
def export_onnx_fp16(onnx_fp32_path, onnx_fp16_path): import onnxmltools
convert_float_to_float16, _ = _load_float16_converter()
onnx_fp32_model = onnxmltools.utils.load_model(onnx_fp32_path) onnx_fp16_model = convert_float_to_float16(onnx_fp32_model, keep_io_types=True) _fix_cast_nodes_after_fp16_conversion(onnx_fp16_model) onnxmltools.utils.save_model(onnx_fp16_model, onnx_fp16_path)
def export_onnx_fp16_large_2gb(onnx_fp32_path, onnx_fp16_path): import onnxmltools
_, convert_float_to_float16_model_path = _load_float16_converter()
onnx_fp16_model = convert_float_to_float16_model_path( onnx_fp32_path, keep_io_types=True ) _fix_cast_nodes_after_fp16_conversion(onnx_fp16_model) onnxmltools.utils.save_model(onnx_fp16_model, onnx_fp16_path)
def add_meta_data( filename: str, meta_data: Dict[str, str], use_external_data: bool = False): """Add meta data to an ONNX model. It is changed in-place.
Args: filename: Filename of the ONNX model to be changed. meta_data: Key-value pairs. """ model = onnx.load(filename) for key, value in meta_data.items(): meta = model.metadata_props.add() meta.key = key meta.value = value
if use_external_data: # For models file size > 2GB external_filename = Path(filename).stem
onnx.save( model, filename, save_as_external_data=True, all_tensors_to_one_file=True, location=external_filename + ".weights", ) else: onnx.save(model, filename)
class OnnxEncoder(nn.Module): """A wrapper for Zipformer and the encoder_proj from the joiner"""
def __init__( self, encoder: Zipformer2, encoder_embed: nn.Module, encoder_proj: nn.Linear, is_rknn_export: int = 0, ): """ Args: encoder: A Zipformer encoder. encoder_proj: The projection layer for encoder from the joiner. is_rknn_export: 1 to generate a graph that rknn-toolkit2 can convert; 0 otherwise. """ super().__init__() self.encoder = encoder self.encoder_embed = encoder_embed self.encoder_proj = encoder_proj self.chunk_size = encoder.chunk_size[0] self.left_context_len = encoder.left_context_frames[0] self.pad_length = 7 + 2 * 3 self.is_rknn_export = is_rknn_export
def forward( self, x: torch.Tensor, states: List[torch.Tensor], ) -> Tuple[torch.Tensor, torch.Tensor, List[torch.Tensor]]: """Encode a chunk of features given the current streaming states.
Args: x: A tensor of shape (N, T, feature_dim). states: The streaming states from the previous chunk.
Returns: Return a tuple containing the encoded output of shape (N, T, joiner_dim) and the updated streaming states. """ N = x.size(0) T = self.chunk_size * 2 + self.pad_length x_lens = torch.tensor([T] * N, device=x.device) left_context_len = self.left_context_len
cached_embed_left_pad = states[-2] x, x_lens, new_cached_embed_left_pad = self.encoder_embed.streaming_forward( x=x, x_lens=x_lens, cached_left_pad=cached_embed_left_pad, ) assert x.size(1) == self.chunk_size, (x.size(1), self.chunk_size)
# For rknn export, keep the masks bool: with int32 masks rknn-toolkit2 # fails to convert the encoder with # E RKNN: Meet unsupported conv, input tensor name: ... input type: 6 # and aborts (core dumped). Otherwise keep the historical int32 masks. if self.is_rknn_export: mask_dtype = torch.bool else: mask_dtype = torch.int32
src_key_padding_mask = torch.zeros(N, self.chunk_size, dtype=mask_dtype)
# processed_mask is used to mask out initial states processed_mask = torch.arange(left_context_len, device=x.device).expand( x.size(0), left_context_len ) processed_lens = states[-1] # (batch,) # (batch, left_context_size) processed_mask = processed_lens.unsqueeze(1) <= processed_mask if not self.is_rknn_export: processed_mask = processed_mask.to(torch.int32) processed_mask = processed_mask.flip(1) # Update processed lengths new_processed_lens = processed_lens + x_lens # (batch, left_context_size + chunk_size) src_key_padding_mask = torch.cat([processed_mask, src_key_padding_mask], dim=1)
x = x.permute(1, 0, 2) encoder_states = states[:-2] logging.info(f"len_encoder_states={len(encoder_states)}") ( encoder_out, encoder_out_lens, new_encoder_states, ) = self.encoder.streaming_forward( x=x, x_lens=x_lens, states=encoder_states, src_key_padding_mask=src_key_padding_mask, ) encoder_out = encoder_out.permute(1, 0, 2) encoder_out = self.encoder_proj(encoder_out) # Now encoder_out is of shape (N, T, joiner_dim)
if self.is_rknn_export and new_processed_lens.dtype == states[-1].dtype: # Skip the no-op cast: rknn-toolkit2 cannot convert it. new_processed_lens_out = new_processed_lens else: new_processed_lens_out = new_processed_lens.to(states[-1].dtype)
new_states = new_encoder_states + [ new_cached_embed_left_pad, new_processed_lens_out, ]
return encoder_out, new_states
def get_init_states( self, batch_size: int = 1, device: torch.device = torch.device("cpu"), ) -> List[torch.Tensor]: """ Returns a list of cached tensors of all encoder layers. For layer-i, states[i*6:(i+1)*6] is (cached_key, cached_nonlin_attn, cached_val1, cached_val2, cached_conv1, cached_conv2). states[-2] is the cached left padding for ConvNeXt module, of shape (batch_size, num_channels, left_pad, num_freqs) states[-1] is processed_lens of shape (batch,), which records the number of processed frames (at 50hz frame rate, after encoder_embed) for each sample in batch. """ states = self.encoder.get_init_states(batch_size, device)
embed_states = self.encoder_embed.get_init_states(batch_size, device)
states.append(embed_states)
processed_lens = torch.zeros(batch_size, dtype=torch.int64, device=device) states.append(processed_lens)
return states
class OnnxDecoder(nn.Module): """A wrapper for Decoder and the decoder_proj from the joiner"""
def __init__(self, decoder: Decoder, decoder_proj: nn.Linear): super().__init__() self.decoder = decoder self.decoder_proj = decoder_proj
def forward(self, y: torch.Tensor) -> torch.Tensor: """ Args: y: A 2-D tensor of shape (N, context_size). Returns Return a 2-D tensor of shape (N, joiner_dim) """ need_pad = False decoder_output = self.decoder(y, need_pad=need_pad) decoder_output = decoder_output.squeeze(1) output = self.decoder_proj(decoder_output)
return output
class OnnxJoiner(nn.Module): """A wrapper for the joiner"""
def __init__(self, output_linear: nn.Linear): super().__init__() self.output_linear = output_linear
def forward( self, encoder_out: torch.Tensor, decoder_out: torch.Tensor, ) -> torch.Tensor: """ Args: encoder_out: A 2-D tensor of shape (N, joiner_dim) decoder_out: A 2-D tensor of shape (N, joiner_dim) Returns: Return a 2-D tensor of shape (N, vocab_size) """ logit = encoder_out + decoder_out logit = self.output_linear(torch.tanh(logit)) return logit
def export_encoder_model_onnx( encoder_model: OnnxEncoder, encoder_filename: str, opset_version: int = 11, feature_dim: int = 80, dynamic_batch: bool = True, use_whisper_features: bool = False, use_external_data: bool = False, use_int32_inputs: int = 0,) -> None: encoder_model.encoder.__class__.forward = ( encoder_model.encoder.__class__.streaming_forward )
decode_chunk_len = encoder_model.chunk_size * 2 # The encoder_embed subsample features (T - 7) // 2 # The ConvNeXt module needs (7 - 1) // 2 = 3 frames of right padding after subsampling T = decode_chunk_len + encoder_model.pad_length
x = torch.rand(1, T, feature_dim, dtype=torch.float32) init_state = encoder_model.get_init_states()
if use_int32_inputs: init_state = [ s if s.dtype != torch.int64 else s.to(torch.int32) for s in init_state ]
num_encoders = len(encoder_model.encoder.encoder_dim) logging.info(f"num_encoders: {num_encoders}") logging.info(f"len(init_state): {len(init_state)}")
inputs = {} input_names = ["x"]
outputs = {} output_names = ["encoder_out"]
def build_inputs_outputs(tensors, i): assert len(tensors) == 6, len(tensors)
# (downsample_left, batch_size, key_dim) name = f"cached_key_{i}" logging.info(f"{name}.shape: {tensors[0].shape}") inputs[name] = {1: "N"} outputs[f"new_{name}"] = {1: "N"} input_names.append(name) output_names.append(f"new_{name}")
# (1, batch_size, downsample_left, nonlin_attn_head_dim) name = f"cached_nonlin_attn_{i}" logging.info(f"{name}.shape: {tensors[1].shape}") inputs[name] = {1: "N"} outputs[f"new_{name}"] = {1: "N"} input_names.append(name) output_names.append(f"new_{name}")
# (downsample_left, batch_size, value_dim) name = f"cached_val1_{i}" logging.info(f"{name}.shape: {tensors[2].shape}") inputs[name] = {1: "N"} outputs[f"new_{name}"] = {1: "N"} input_names.append(name) output_names.append(f"new_{name}")
# (downsample_left, batch_size, value_dim) name = f"cached_val2_{i}" logging.info(f"{name}.shape: {tensors[3].shape}") inputs[name] = {1: "N"} outputs[f"new_{name}"] = {1: "N"} input_names.append(name) output_names.append(f"new_{name}")
# (batch_size, embed_dim, conv_left_pad) name = f"cached_conv1_{i}" logging.info(f"{name}.shape: {tensors[4].shape}") inputs[name] = {0: "N"} outputs[f"new_{name}"] = {0: "N"} input_names.append(name) output_names.append(f"new_{name}")
# (batch_size, embed_dim, conv_left_pad) name = f"cached_conv2_{i}" logging.info(f"{name}.shape: {tensors[5].shape}") inputs[name] = {0: "N"} outputs[f"new_{name}"] = {0: "N"} input_names.append(name) output_names.append(f"new_{name}")
num_encoder_layers = ",".join(map(str, encoder_model.encoder.num_encoder_layers)) encoder_dims = ",".join(map(str, encoder_model.encoder.encoder_dim)) cnn_module_kernels = ",".join(map(str, encoder_model.encoder.cnn_module_kernel)) ds = encoder_model.encoder.downsampling_factor left_context_len = encoder_model.left_context_len left_context_len = [left_context_len // k for k in ds] left_context_len = ",".join(map(str, left_context_len)) query_head_dims = ",".join(map(str, encoder_model.encoder.query_head_dim)) value_head_dims = ",".join(map(str, encoder_model.encoder.value_head_dim)) num_heads = ",".join(map(str, encoder_model.encoder.num_heads))
meta_data = { "model_type": "zipformer2", "version": "1", "model_author": "k2-fsa", "comment": "streaming zipformer2", "decode_chunk_len": str(decode_chunk_len), # 32 "T": str(T), # 32+7+2*3=45 "num_encoder_layers": num_encoder_layers, "encoder_dims": encoder_dims, "cnn_module_kernels": cnn_module_kernels, "left_context_len": left_context_len, "query_head_dims": query_head_dims, "value_head_dims": value_head_dims, "num_heads": num_heads, } if use_whisper_features: meta_data["feature"] = "whisper"
logging.info(f"meta_data: {meta_data}")
for i in range(len(init_state[:-2]) // 6): build_inputs_outputs(init_state[i * 6 : (i + 1) * 6], i)
# (batch_size, channels, left_pad, freq) embed_states = init_state[-2] name = "embed_states" logging.info(f"{name}.shape: {embed_states.shape}") inputs[name] = {0: "N"} outputs[f"new_{name}"] = {0: "N"} input_names.append(name) output_names.append(f"new_{name}")
# (batch_size,) processed_lens = init_state[-1] name = "processed_lens" logging.info(f"{name}.shape: {processed_lens.shape}") inputs[name] = {0: "N"} outputs[f"new_{name}"] = {0: "N"} input_names.append(name) output_names.append(f"new_{name}")
logging.info(inputs) logging.info(outputs) logging.info(input_names) logging.info(output_names)
torch.onnx.export( encoder_model, (x, init_state), encoder_filename, verbose=False, opset_version=opset_version, input_names=input_names, output_names=output_names, dynamic_axes={ "x": {0: "N"}, "encoder_out": {0: "N"}, **inputs, **outputs, } if dynamic_batch else {}, **get_onnx_export_kwargs(),)
add_meta_data( filename=encoder_filename, meta_data=meta_data, use_external_data=use_external_data, )
def export_decoder_model_onnx( decoder_model: OnnxDecoder, decoder_filename: str, opset_version: int = 11, dynamic_batch: bool = True, use_int32_inputs: int = 0,) -> None: """Export the decoder model to ONNX format.
The exported model has one input:
- y: a torch.int64 tensor of shape (N, decoder_model.context_size)
and has one output:
- decoder_out: a torch.float32 tensor of shape (N, joiner_dim)
Args: decoder_model: The decoder model to be exported. decoder_filename: Filename to save the exported ONNX model. opset_version: The opset version to use. """ context_size = decoder_model.decoder.context_size vocab_size = decoder_model.decoder.vocab_size
if use_int32_inputs: y = torch.zeros(1, context_size, dtype=torch.int32) else: y = torch.zeros(1, context_size, dtype=torch.int64)
decoder_model = torch.jit.script(decoder_model) torch.onnx.export( decoder_model, y, decoder_filename, verbose=False, opset_version=opset_version, input_names=["y"], output_names=["decoder_out"], dynamic_axes={ "y": {0: "N"}, "decoder_out": {0: "N"}, } if dynamic_batch else {}, **get_onnx_export_kwargs(),)
meta_data = { "context_size": str(context_size), "vocab_size": str(vocab_size), } add_meta_data(filename=decoder_filename, meta_data=meta_data)
def export_joiner_model_onnx( joiner_model: nn.Module, joiner_filename: str, opset_version: int = 11, dynamic_batch: bool = True,) -> None: """Export the joiner model to ONNX format. The exported joiner model has two inputs:
- encoder_out: a tensor of shape (N, joiner_dim) - decoder_out: a tensor of shape (N, joiner_dim)
and produces one output:
- logit: a tensor of shape (N, vocab_size) """ joiner_dim = joiner_model.output_linear.weight.shape[1] logging.info(f"joiner dim: {joiner_dim}")
projected_encoder_out = torch.rand(1, joiner_dim, dtype=torch.float32) projected_decoder_out = torch.rand(1, joiner_dim, dtype=torch.float32)
torch.onnx.export( joiner_model, (projected_encoder_out, projected_decoder_out), joiner_filename, verbose=False, opset_version=opset_version, input_names=[ "encoder_out", "decoder_out", ], output_names=["logit"], dynamic_axes={ "encoder_out": {0: "N"}, "decoder_out": {0: "N"}, "logit": {0: "N"}, } if dynamic_batch else {}, **get_onnx_export_kwargs(),) meta_data = { "joiner_dim": str(joiner_dim), } add_meta_data(filename=joiner_filename, meta_data=meta_data)
@torch.no_grad()def main(): """Export a streaming zipformer transducer model to ONNX format.""" args = get_parser().parse_args() args.exp_dir = Path(args.exp_dir)
params = get_params() params.update(vars(args))
device = torch.device("cpu") if torch.cuda.is_available(): device = torch.device("cuda", 0)
logging.info(f"device: {device}")
token_table = k2.SymbolTable.from_file(params.tokens) params.blank_id = token_table["<blk>"] params.vocab_size = num_tokens(token_table) + 1
logging.info(params)
logging.info("About to create model") model = get_model(params)
model.to(device)
if not params.use_averaged_model: if params.iter > 0: filenames = find_checkpoints(params.exp_dir, iteration=-params.iter)[ : params.avg ] if len(filenames) == 0: raise ValueError( f"No checkpoints found for" f" --iter {params.iter}, --avg {params.avg}" ) elif len(filenames) < params.avg: raise ValueError( f"Not enough checkpoints ({len(filenames)}) found for" f" --iter {params.iter}, --avg {params.avg}" ) logging.info(f"averaging {filenames}") model.to(device) model.load_state_dict( average_checkpoints(filenames, device=device), strict=False ) elif params.avg == 1: load_checkpoint(f"{params.exp_dir}/epoch-{params.epoch}.pt", model) else: start = params.epoch - params.avg + 1 filenames = [] for i in range(start, params.epoch + 1): if i >= 1: filenames.append(f"{params.exp_dir}/epoch-{i}.pt") logging.info(f"averaging {filenames}") model.to(device) model.load_state_dict( average_checkpoints(filenames, device=device), strict=False ) else: if params.iter > 0: filenames = find_checkpoints(params.exp_dir, iteration=-params.iter)[ : params.avg + 1 ] if len(filenames) == 0: raise ValueError( f"No checkpoints found for" f" --iter {params.iter}, --avg {params.avg}" ) elif len(filenames) < params.avg + 1: raise ValueError( f"Not enough checkpoints ({len(filenames)}) found for" f" --iter {params.iter}, --avg {params.avg}" ) filename_start = filenames[-1] filename_end = filenames[0] logging.info( "Calculating the averaged model over iteration checkpoints" f" from {filename_start} (excluded) to {filename_end}" ) model.to(device) model.load_state_dict( average_checkpoints_with_averaged_model( filename_start=filename_start, filename_end=filename_end, device=device, ), strict=False, ) else: assert params.avg > 0, params.avg start = params.epoch - params.avg assert start >= 1, start filename_start = f"{params.exp_dir}/epoch-{start}.pt" filename_end = f"{params.exp_dir}/epoch-{params.epoch}.pt" logging.info( f"Calculating the averaged model over epoch range from " f"{start} (excluded) to {params.epoch}" ) model.to(device) model.load_state_dict( average_checkpoints_with_averaged_model( filename_start=filename_start, filename_end=filename_end, device=device, ), strict=False, )
model.to("cpu") model.eval()
convert_scaled_to_non_scaled(model, inplace=True)
encoder = OnnxEncoder( encoder=model.encoder, encoder_embed=model.encoder_embed, encoder_proj=model.joiner.encoder_proj, is_rknn_export=params.is_rknn_export, )
if params.decoder_conv_as_matmul: # keep the original decoder to check the exported model against it conv_decoder = OnnxDecoder( decoder=copy.deepcopy(model.decoder), decoder_proj=copy.deepcopy(model.joiner.decoder_proj), ) replace_decoder_conv_with_matmul(model.decoder) logging.info("Export the decoder conv as MatMul")
decoder = OnnxDecoder( decoder=model.decoder, decoder_proj=model.joiner.decoder_proj, )
joiner = OnnxJoiner(output_linear=model.joiner.output_linear)
encoder_num_param = sum([p.numel() for p in encoder.parameters()]) decoder_num_param = sum([p.numel() for p in decoder.parameters()]) joiner_num_param = sum([p.numel() for p in joiner.parameters()]) total_num_param = encoder_num_param + decoder_num_param + joiner_num_param logging.info(f"encoder parameters: {encoder_num_param}") logging.info(f"decoder parameters: {decoder_num_param}") logging.info(f"joiner parameters: {joiner_num_param}") logging.info(f"total parameters: {total_num_param}")
if params.iter > 0: suffix = f"iter-{params.iter}" else: suffix = f"epoch-{params.epoch}"
suffix += f"-avg-{params.avg}" suffix += f"-chunk-{params.chunk_size}" suffix += f"-left-{params.left_context_frames}"
opset_version = 13
logging.info("Exporting encoder") if params.use_external_data: encoder_filename = f"encoder-{suffix}.onnx" else: encoder_filename = params.exp_dir / f"encoder-{suffix}.onnx" export_encoder_model_onnx( encoder, str(encoder_filename), opset_version=opset_version, feature_dim=params.feature_dim, dynamic_batch=params.dynamic_batch == 1, use_int32_inputs=params.use_int32_inputs, use_whisper_features=params.use_whisper_features, use_external_data=params.use_external_data, ) logging.info(f"Exported encoder to {encoder_filename}")
logging.info("Exporting decoder") decoder_filename = params.exp_dir / f"decoder-{suffix}.onnx" export_decoder_model_onnx( decoder, decoder_filename, opset_version=opset_version, dynamic_batch=params.dynamic_batch == 1, use_int32_inputs=params.use_int32_inputs, ) logging.info(f"Exported decoder to {decoder_filename}")
if params.decoder_conv_as_matmul: with tempfile.TemporaryDirectory() as tmp_dir: conv_filename = f"{tmp_dir}/decoder-conv.onnx" export_decoder_model_onnx( conv_decoder, conv_filename, opset_version=opset_version, dynamic_batch=params.dynamic_batch == 1, use_int32_inputs=params.use_int32_inputs, ) max_diff, device = check_decoder_conv_as_matmul_onnx( conv_filename, str(decoder_filename), vocab_size=model.decoder.vocab_size, ) logging.info( "Checked the decoder with MatMul against the decoder with Conv " f"(onnxruntime on {device}): max abs diff {max_diff:.2e}" )
logging.info("Exporting joiner") joiner_filename = params.exp_dir / f"joiner-{suffix}.onnx" export_joiner_model_onnx( joiner, joiner_filename, opset_version=opset_version, dynamic_batch=params.dynamic_batch == 1, ) logging.info(f"Exported joiner to {joiner_filename}")
if params.is_rknn_export: if params.use_external_data: logging.warning( "--is-rknn-export 1: skip removing no-op Cast nodes since " "--use-external-data is used. Note its other effects (bool " "masks etc.) are still applied to the exported graph." ) else: for filename in (encoder_filename, decoder_filename, joiner_filename): model = onnx.load(str(filename)) num_removed = _remove_noop_cast_nodes(model) if num_removed > 0: onnx.save(model, str(filename)) logging.info( f"Removed {num_removed} no-op Cast node(s) from {filename}" )
if params.fp16: logging.info("Generate fp16 models")
if params.use_external_data: encoder_filename_fp16 = f"encoder-{suffix}.fp16.onnx" export_onnx_fp16_large_2gb(encoder_filename, encoder_filename_fp16) else: encoder_filename_fp16 = params.exp_dir / f"encoder-{suffix}.fp16.onnx" export_onnx_fp16(encoder_filename, encoder_filename_fp16)
decoder_filename_fp16 = params.exp_dir / f"decoder-{suffix}.fp16.onnx" export_onnx_fp16(decoder_filename, decoder_filename_fp16)
joiner_filename_fp16 = params.exp_dir / f"joiner-{suffix}.fp16.onnx" export_onnx_fp16(joiner_filename, joiner_filename_fp16)
# Generate int8 quantization models # See https://onnxruntime.ai/docs/performance/model-optimizations/quantization.html#data-type-selection
if params.enable_int8_quantization: logging.info("Generate int8 quantization models")
if params.use_external_data: encoder_filename_int8 = f"encoder-{suffix}.int8.onnx" else: encoder_filename_int8 = params.exp_dir / f"encoder-{suffix}.int8.onnx"
quantize_dynamic( model_input=encoder_filename, model_output=encoder_filename_int8, op_types_to_quantize=["MatMul"], weight_type=QuantType.QInt8, )
decoder_filename_int8 = params.exp_dir / f"decoder-{suffix}.int8.onnx" quantize_dynamic( model_input=decoder_filename, model_output=decoder_filename_int8, op_types_to_quantize=["MatMul", "Gather"], weight_type=QuantType.QInt8, )
joiner_filename_int8 = params.exp_dir / f"joiner-{suffix}.int8.onnx" quantize_dynamic( model_input=joiner_filename, model_output=joiner_filename_int8, op_types_to_quantize=["MatMul"], weight_type=QuantType.QInt8, )
if __name__ == "__main__": formatter = "%(asctime)s %(levelname)s [%(filename)s:%(lineno)d] %(message)s" logging.basicConfig(format=formatter, level=logging.INFO) main()123version https://git-lfs.github.com/spec/v1oid sha256:dbcb11d8127256ac81ddd396e0c9d85f8f1d46dcdf828bbf4c7678e843076a51size 7632001234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465{ "T": 45, "chunk": 32, "n": 53, "tokens": [ 1737, 2012, 1158, 1074, 1898, 1100, 1080, 1124, 1998, 2019, 1288, 1217, 1582, 2002, 1290, 1751, 1133, 1417, 1117, 1984, 2020, 1993, 1070, 1181, 1100, 1094, 2035, 1102, 1118, 1918, 1134, 1708, 1080, 1129, 1141, 1096, 1244, 1069, 1137, 2021, 1994, 1489, 1100, 1076, 1080, 1104, 1996, 1284, 2010, 1152, 1687, 1094, 1089, 2011, 1446, 1099, 1407 ], "text": "دانشجویان میتوانند در عوض اینکه تا جلسهای حضوری بعدیم منتظر بمانند سؤالاتشان را نیز در استانی از روز ارائه دهند و در حد معقول انتخاب سریع داشته باشد"}123456789101112131415161718"""macOS check / reference streaming decode for Shenava Rizeh v1.5 CoreML iOS15 (pip install coremltools numpy).Feeds the stored reference chunks (45 fbank frames each, hop 32 = 320 ms) through the encoder step, threading all caches,greedy RNN-T with the English block masked; prints whether tokens match the onnxruntime reference."""import json,glob,numpy as np,coremltools as ctenc=ct.models.MLModel(glob.glob('*encoder_streaming*.mlmodel')[0]);dec=ct.models.MLModel(glob.glob('*decoder*.mlmodel')[0]);joi=ct.models.MLModel(glob.glob('*joiner*.mlmodel')[0])man=json.load(open(glob.glob('*_manifest.json')[0]));exp=json.load(open('reference/expected.json',encoding='utf-8'))toks=[l.rstrip('\n').rsplit(' ',1)[0] for l in open('tokens.txt',encoding='utf-8')]names=[k for k in man['inputs'] if k!='x']state={k:np.zeros(man['inputs'][k],np.int32 if k=='processed_lens' else np.float32) for k in names}mask=np.full(2080,-1e9,np.float32);mask[np.r_[0:32,1056:2080]]=0ch=np.fromfile('reference/chunks.f32','<f4').reshape(exp['n'],exp['T'],80)ctx=[0,0];out=[];d=dec.predict({'y':np.array([ctx],np.int32)})['decoder_out']for c in range(exp['n']): o=enc.predict({'x':ch[c][None],**state});state={k:o['new_'+k].reshape(man['inputs'][k]).astype(state[k].dtype) for k in names} for e in o['encoder_out'][0]: k=int((joi.predict({'encoder_out':e[None].astype(np.float32),'decoder_out':d})['logit'][0]+mask).argmax()) if k: out.append(k);ctx=[ctx[-1],k];d=dec.predict({'y':np.array([ctx],np.int32)})['decoder_out']print('text :',''.join(toks[i] for i in out).replace('▁',' ').strip());print('expected:',exp['text']);print('token match:',out==exp['tokens'])123version https://git-lfs.github.com/spec/v1oid sha256:3d4aaa58ec76cf4806f3bc99ccf3ccb5c9291ae37f25212d8409c987c3ee54f7size 2664625123version https://git-lfs.github.com/spec/v1oid sha256:b01eaab5d9fe1129946151c21290fe0cd8e9cbd7e86ee1af1070b22f4bfb4e79size 113863282123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588{ "format": "CoreML NeuralNetwork (iOS14 target, runs on iOS15+) fp16-weight cache-aware streaming Zipformer2 encoder step", "chunk_frames_after_subsampling": 16, "left_context_frames": 128, "feature_frames_per_step": 45, "feature_shift_per_step": 32, "ms_per_step": 320, "encoder_out": [ 1, 8, 512 ], "inputs": { "x": [ 1, 45, 80 ], "cached_key_0": [ 128, 1, 128 ], "cached_nonlin_attn_0": [ 1, 1, 128, 144 ], "cached_val1_0": [ 128, 1, 48 ], "cached_val2_0": [ 128, 1, 48 ], "cached_conv1_0": [ 1, 192, 15 ], "cached_conv2_0": [ 1, 192, 15 ], "cached_key_1": [ 128, 1, 128 ], "cached_nonlin_attn_1": [ 1, 1, 128, 144 ], "cached_val1_1": [ 128, 1, 48 ], "cached_val2_1": [ 128, 1, 48 ], "cached_conv1_1": [ 1, 192, 15 ], "cached_conv2_1": [ 1, 192, 15 ], "cached_key_2": [ 64, 1, 128 ], "cached_nonlin_attn_2": [ 1, 1, 64, 192 ], "cached_val1_2": [ 64, 1, 48 ], "cached_val2_2": [ 64, 1, 48 ], "cached_conv1_2": [ 1, 256, 15 ], "cached_conv2_2": [ 1, 256, 15 ], "cached_key_3": [ 64, 1, 128 ], "cached_nonlin_attn_3": [ 1, 1, 64, 192 ], "cached_val1_3": [ 64, 1, 48 ], "cached_val2_3": [ 64, 1, 48 ], "cached_conv1_3": [ 1, 256, 15 ], "cached_conv2_3": [ 1, 256, 15 ], "cached_key_4": [ 32, 1, 128 ], "cached_nonlin_attn_4": [ 1, 1, 32, 288 ], "cached_val1_4": [ 32, 1, 48 ], "cached_val2_4": [ 32, 1, 48 ], "cached_conv1_4": [ 1, 384, 7 ], "cached_conv2_4": [ 1, 384, 7 ], "cached_key_5": [ 32, 1, 128 ], "cached_nonlin_attn_5": [ 1, 1, 32, 288 ], "cached_val1_5": [ 32, 1, 48 ], "cached_val2_5": [ 32, 1, 48 ], "cached_conv1_5": [ 1, 384, 7 ], "cached_conv2_5": [ 1, 384, 7 ], "cached_key_6": [ 32, 1, 128 ], "cached_nonlin_attn_6": [ 1, 1, 32, 288 ], "cached_val1_6": [ 32, 1, 48 ], "cached_val2_6": [ 32, 1, 48 ], "cached_conv1_6": [ 1, 384, 7 ], "cached_conv2_6": [ 1, 384, 7 ], "cached_key_7": [ 16, 1, 256 ], "cached_nonlin_attn_7": [ 1, 1, 16, 384 ], "cached_val1_7": [ 16, 1, 96 ], "cached_val2_7": [ 16, 1, 96 ], "cached_conv1_7": [ 1, 512, 7 ], "cached_conv2_7": [ 1, 512, 7 ], "cached_key_8": [ 16, 1, 256 ], "cached_nonlin_attn_8": [ 1, 1, 16, 384 ], "cached_val1_8": [ 16, 1, 96 ], "cached_val2_8": [ 16, 1, 96 ], "cached_conv1_8": [ 1, 512, 7 ], "cached_conv2_8": [ 1, 512, 7 ], "cached_key_9": [ 16, 1, 256 ], "cached_nonlin_attn_9": [ 1, 1, 16, 384 ], "cached_val1_9": [ 16, 1, 96 ], "cached_val2_9": [ 16, 1, 96 ], "cached_conv1_9": [ 1, 512, 7 ], "cached_conv2_9": [ 1, 512, 7 ], "cached_key_10": [ 32, 1, 128 ], "cached_nonlin_attn_10": [ 1, 1, 32, 288 ], "cached_val1_10": [ 32, 1, 48 ], "cached_val2_10": [ 32, 1, 48 ], "cached_conv1_10": [ 1, 384, 7 ], "cached_conv2_10": [ 1, 384, 7 ], "cached_key_11": [ 32, 1, 128 ], "cached_nonlin_attn_11": [ 1, 1, 32, 288 ], "cached_val1_11": [ 32, 1, 48 ], "cached_val2_11": [ 32, 1, 48 ], "cached_conv1_11": [ 1, 384, 7 ], "cached_conv2_11": [ 1, 384, 7 ], "cached_key_12": [ 32, 1, 128 ], "cached_nonlin_attn_12": [ 1, 1, 32, 288 ], "cached_val1_12": [ 32, 1, 48 ], "cached_val2_12": [ 32, 1, 48 ], "cached_conv1_12": [ 1, 384, 7 ], "cached_conv2_12": [ 1, 384, 7 ], "cached_key_13": [ 64, 1, 128 ], "cached_nonlin_attn_13": [ 1, 1, 64, 192 ], "cached_val1_13": [ 64, 1, 48 ], "cached_val2_13": [ 64, 1, 48 ], "cached_conv1_13": [ 1, 256, 15 ], "cached_conv2_13": [ 1, 256, 15 ], "cached_key_14": [ 64, 1, 128 ], "cached_nonlin_attn_14": [ 1, 1, 64, 192 ], "cached_val1_14": [ 64, 1, 48 ], "cached_val2_14": [ 64, 1, 48 ], "cached_conv1_14": [ 1, 256, 15 ], "cached_conv2_14": [ 1, 256, 15 ], "embed_states": [ 1, 128, 3, 19 ], "processed_lens": [ 1 ] }, "state_dtypes": { "cached_key_0": "torch.float32", "cached_nonlin_attn_0": "torch.float32", "cached_val1_0": "torch.float32", "cached_val2_0": "torch.float32", "cached_conv1_0": "torch.float32", "cached_conv2_0": "torch.float32", "cached_key_1": "torch.float32", "cached_nonlin_attn_1": "torch.float32", "cached_val1_1": "torch.float32", "cached_val2_1": "torch.float32", "cached_conv1_1": "torch.float32", "cached_conv2_1": "torch.float32", "cached_key_2": "torch.float32", "cached_nonlin_attn_2": "torch.float32", "cached_val1_2": "torch.float32", "cached_val2_2": "torch.float32", "cached_conv1_2": "torch.float32", "cached_conv2_2": "torch.float32", "cached_key_3": "torch.float32", "cached_nonlin_attn_3": "torch.float32", "cached_val1_3": "torch.float32", "cached_val2_3": "torch.float32", "cached_conv1_3": "torch.float32", "cached_conv2_3": "torch.float32", "cached_key_4": "torch.float32", "cached_nonlin_attn_4": "torch.float32", "cached_val1_4": "torch.float32", "cached_val2_4": "torch.float32", "cached_conv1_4": "torch.float32", "cached_conv2_4": "torch.float32", "cached_key_5": "torch.float32", "cached_nonlin_attn_5": "torch.float32", "cached_val1_5": "torch.float32", "cached_val2_5": "torch.float32", "cached_conv1_5": "torch.float32", "cached_conv2_5": "torch.float32", "cached_key_6": "torch.float32", "cached_nonlin_attn_6": "torch.float32", "cached_val1_6": "torch.float32", "cached_val2_6": "torch.float32", "cached_conv1_6": "torch.float32", "cached_conv2_6": "torch.float32", "cached_key_7": "torch.float32", "cached_nonlin_attn_7": "torch.float32", "cached_val1_7": "torch.float32", "cached_val2_7": "torch.float32", "cached_conv1_7": "torch.float32", "cached_conv2_7": "torch.float32", "cached_key_8": "torch.float32", "cached_nonlin_attn_8": "torch.float32", "cached_val1_8": "torch.float32", "cached_val2_8": "torch.float32", "cached_conv1_8": "torch.float32", "cached_conv2_8": "torch.float32", "cached_key_9": "torch.float32", "cached_nonlin_attn_9": "torch.float32", "cached_val1_9": "torch.float32", "cached_val2_9": "torch.float32", "cached_conv1_9": "torch.float32", "cached_conv2_9": "torch.float32", "cached_key_10": "torch.float32", "cached_nonlin_attn_10": "torch.float32", "cached_val1_10": "torch.float32", "cached_val2_10": "torch.float32", "cached_conv1_10": "torch.float32", "cached_conv2_10": "torch.float32", "cached_key_11": "torch.float32", "cached_nonlin_attn_11": "torch.float32", "cached_val1_11": "torch.float32", "cached_val2_11": "torch.float32", "cached_conv1_11": "torch.float32", "cached_conv2_11": "torch.float32", "cached_key_12": "torch.float32", "cached_nonlin_attn_12": "torch.float32", "cached_val1_12": "torch.float32", "cached_val2_12": "torch.float32", "cached_conv1_12": "torch.float32", "cached_conv2_12": "torch.float32", "cached_key_13": "torch.float32", "cached_nonlin_attn_13": "torch.float32", "cached_val1_13": "torch.float32", "cached_val2_13": "torch.float32", "cached_conv1_13": "torch.float32", "cached_conv2_13": "torch.float32", "cached_key_14": "torch.float32", "cached_nonlin_attn_14": "torch.float32", "cached_val1_14": "torch.float32", "cached_val2_14": "torch.float32", "cached_conv1_14": "torch.float32", "cached_conv2_14": "torch.float32", "embed_states": "torch.float32", "processed_lens": "torch.int32" }}123version https://git-lfs.github.com/spec/v1oid sha256:e31b271131319f55321d835512ffe517930e72d18f01e7ffdb854297a0b9d87asize 21345241234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080<blk> 0<sos/eos> 1<unk> 2▁ 3, 4. 5? 6! 7: 8… 9— 10- 11" 12« 13» 14% 15$ 16& 17+ 18/ 19№ 20€ 21£ 22<reserved23> 23<reserved24> 24<reserved25> 25<reserved26> 26<reserved27> 27<reserved28> 28<reserved29> 29<reserved30> 30<reserved31> 31<unk> 32, 33. 34? 35! 36: 37… 38— 39- 40" 41▁t 42▁th 43▁a 44in 45re 46▁w 47▁the 48ou 49▁s 50at 51on 52er 53it 54nd 55▁b 56is 57ing 58▁h 59▁I 60▁c 61▁o 62▁to 63▁m 64▁f 65▁d 66ll 67▁y 68en 69an 70▁g 71▁l 72▁p 73or 74es 75▁you 76▁of 77▁and 78ed 79▁in 80▁that 81ar 82▁n 83us 84ow 85om 86as 87ve 88▁it 89et 90ot 91▁be 92▁is 93ay 94ic 95le 96▁A 97▁wh 98▁T 99▁we 100al 101▁e 102▁on 103▁S 104ke 105ion 106ut 107▁re 108▁ha 109▁Th 110gh 111id 112▁he 113ac 114ver 115▁go 116all 117▁li 118▁this 119ent 120▁for 121▁W 122▁k 123▁st 124im 125ld 126ly 127se 128ro 129out 130am 131ri 132ght 133▁And 134st 135▁do 136ec 137ust 138▁have 139▁like 140▁Y 141ith 142▁j 143▁B 144▁So 145ad 146▁was 147od 148if 149▁u 150ally 151▁kn 152▁with 153▁an 154ere 155▁me 156▁are 157ir 158▁know 159▁not 160▁so 161▁can 162ch 163▁O 164ome 165▁sh 166▁just 167ill 168th 169▁as 170▁H 171▁se 172▁they 173▁what 174op 175ant 176ea 177use 178ould 179▁C 180▁ab 181ce 182ation 183oo 184▁at 185▁The 186our 187▁M 188▁ne 189ct 190ter 191▁there 192ur 193▁but 194ore 195▁or 196▁It 197▁all 198▁my 199▁L 200▁N 201▁get 202▁don 203il 204▁one 205▁going 206very 207▁your 208ain 209pp 210▁ch 211ink 212▁al 213ge 214ause 215▁We 216ess 217▁con 218▁You 219ers 220▁com 221▁up 222right 223est 224▁fr 225un 226▁about 227▁pro 228▁out 229▁G 230ul 231▁D 232▁r 233▁if 234ate 235el 236ind 237qu 238ack 239art 240▁think 241eah 242▁here 243▁bec 244▁ex 245▁tr 246king 247▁su 248ab 249▁wor 250▁P 251ol 252ive 253▁right 254▁see 255▁Wh 256▁some 257um 258ake 259▁from 260▁v 261ig 262▁de 263▁pl 264▁because 265▁want 266ist 267and 268nt 269ight 270ame 271ect 272▁thing 273▁then 274rou 275▁us 276▁will 277▁R 278▁F 279▁say 280ort 281▁But 282os 283▁int 284ook 285ity 286▁sp 287▁got 288ard 289▁That 290▁tim 291▁pe 292▁them 293em 294her 295▁J 296ide 297▁really 298ure 299ople 300ast 301ven 302▁E 303ich 304ap 305▁now 306▁le 307▁people 308hing 309▁would 310ment 311ie 312▁when 313one 314▁more 315ose 316▁Yeah 317▁our 318▁by 319▁did 320▁any 321▁who 322kay 323▁time 324▁He 325▁sa 326▁man 327▁how 328▁act 329ine 330ies 331▁qu 332are 333▁gu 334itt 335so 336▁no 337▁pre 338▁back 339▁has 340▁these 341ep 342ff 343ost 344▁ag 345act 346▁need 347▁fe 348ag 349▁which 350▁had 351ong 352▁very 353ice 354ck 355▁every 356▁good 357▁Oh 358omet 359▁te 360▁way 361ually 362own 363ther 364ud 365ous 366age 367▁This 368▁en 369▁cl 370▁were 371▁look 372▁mean 373▁his 374ite 375pl 376▁also 377▁lo 378▁been 379ear 380ick 381▁into 382way 383▁over 384▁somet 385ace 386ra 387▁him 388▁where 389ber 390iv 391ry 392▁tw 393▁kind 394▁im 395reat 396▁their 397ip 398▁other 399▁They 400ions 401ree 402na 403per 404ble 405▁lot 406ire 407ittle 408ak 409iz 410ue 411▁could 412▁What 413be 414▁pr 415pt 416▁little 417oin 418▁Okay 419▁two 420ss 421▁work 422▁things 423▁let 424▁tal 425irst 426▁something 427▁make 428ase 429▁off 430ank 431▁actually 432end 433▁ad 434ys 435iff 436ach 437▁down 438▁part 439▁well 440uch 441▁cont 442ond 443▁even 444▁she 445▁K 446▁those 447▁does 448▁again 449▁said 450▁much 451▁diff 452ting 453▁sc 454ial 455ody 456▁first 457▁start 458▁her 459▁There 460▁year 461▁yeah 462▁play 463onna 464ord 465ass 466▁gonna 467▁If 468thing 469▁In 470▁un 471he 472▁bl 473nder 474▁bu 475▁mo 476▁co 477▁take 478ple 479ving 480ish 481▁U 482▁too 483▁am 484sel 485▁ac 486▁happ 487ning 488round 489ans 490rough 491▁try 492orm 493▁ro 494ough 495▁may 496ance 497xt 498other 499able 500▁differe 501ound 502ence 503▁put 504▁bet 505▁through 506▁doing 507▁Ch 508▁only 509▁res 510▁come 511▁br 512▁fu 513▁bit 514▁should 515og 516▁app 517ang 518▁call 519▁fo 520oint 521▁use 522▁day 523▁No 524vel 525ult 526▁dis 527ens 528▁ar 529ild 530atch 531▁under 532ated 533▁gr 534▁Now 535ike 536▁ke 537ations 538ount 539fore 540▁comp 541ia 542▁God 543▁new 544▁still 545▁per 546▁imp 547▁than 548ory 549body 550▁St 551▁different 552ade 553ical 554ious 555day 556ty 557▁feel 558ign 559▁show 560▁comm 561▁Let 562ady 563ile 564ark 565ary 566▁being 567▁didn 568▁guys 569ater 570▁V 571fe 572ru 573▁point 574fter 575ft 576self 577▁why 578ail 579av 580ool 581▁talk 582▁sec 583▁fl 584▁rem 585wn 586▁end 587▁stu 588▁rec 589igh 590vers 591▁Well 592ition 593▁hel 594ically 595▁before 596▁around 597▁Like 598▁same 599du 600▁great 601▁wr 602aking 603ways 604▁big 605▁All 606get 607▁quest 608ever 609▁three 610▁tell 611▁give 612form 613ell 614▁many 615cess 616▁help 617▁pers 618▁Is 619▁real 620▁Al 621▁sure 622urn 623▁bas 624ress 625▁bo 626ne 627ably 628▁inc 629▁might 630▁find 631bs 632▁love 633ors 634ood 635▁next 636▁def 637ms 638▁game 639▁bel 640▁long 641▁min 642▁after 643ful 644ents 645oth 646▁ser 647ves 648iss 649ought 650▁most 651▁last 652▁happen 653ath 654ub 655ons 656▁Bec 657ower 658▁years 659▁dec 660▁run 661ange 662▁another 663bably 664ved 665▁vide 666▁Because 667▁set 668▁okay 669ual 670▁stuff 671▁always 672▁supp 673▁cour 674ise 675ction 676▁life 677▁des 678red 679ee 680▁How 681▁sy 682ock 683▁sm 684ute 685▁sl 686ict 687▁att 688▁keep 689▁op 690ward 691▁pos 692▁high 693ob 694ily 695▁add 696▁person 697▁ph 698▁done 699▁num 700ix 701ait 702we 703▁today 704old 705ooking 706ci 707ope 708pect 709▁inter 710▁probably 711▁maybe 712▁world 713▁em 714ject 715ian 716▁never 717▁fin 718▁saying 719ible 720ating 721▁own 722▁getting 723▁fun 724tty 725ew 726▁hand 727oy 728▁doesn 729▁rel 730les 731▁Thank 732▁trying 733ull 734▁cr 735ert 736▁able 737▁An 738▁better 739ces 740▁second 741pe 742▁everything 743stand 744sh 745▁made 746oh 747▁cons 748▁thought 749ason 750ready 751▁pretty 752erest 753▁looking 754▁ev 755akes 756ates 757▁already 758▁Yes 759▁coming 760▁She 761ib 762▁talking 763▁ear 764▁inv 765ech 766gin 767ense 768▁car 769▁ind 770▁video 771▁anything 772▁Do 773▁inst 774▁gen 775ember 776▁mod 777▁understand 778▁ins 779▁course 780stem 781ular 782▁ent 783▁As 784▁watch 785▁For 786gr 787▁import 788ks 789▁interest 790▁str 791▁name 792▁id 793▁wee 794▁place 795▁open 796▁belie 797▁el 798▁ter 799cus 800ata 801▁Sh 802▁four 803▁question 804ah 805ility 806ave 807oney 808ness 809▁spec 810▁Just 811aw 812ather 813▁mon 814ize 815▁build 816▁ob 817ph 818▁number 819▁says 820ities 821▁top 822▁Am 823▁sim 824ren 825▁rep 826▁used 827▁away 828▁system 829▁care 830lease 831▁whole 832ings 833ments 834▁When 835oc 836als 837▁reg 838▁move 839▁side 840▁exam 841▁ass 842ier 843ash 844▁ask 845ific 846atter 847▁fact 848▁though 849▁proble 850ered 851ative 852▁read 853air 854▁turn 855▁tri 856▁word 857ention 858▁called 859ont 860▁hard 861▁important 862iew 863▁gl 864▁sort 865▁list 866ream 867▁lear 868▁went 869▁bro 870▁exper 871▁cou 872olog 873ially 874▁cle 875▁trans 876▁power 877▁ty 878▁To 879ics 880ied 881cri 882▁came 883▁lea 884lic 885ience 886row 887▁stud 888▁money 889▁its 890▁team 891▁data 892▁left 893▁fam 894▁far 895▁cor 896▁sur 897az 898▁best 899ird 900▁acc 901▁My 902ouse 903eck 904nce 905▁bad 906▁count 907▁head 908vious 909riend 910▁both 911▁commun 912▁compl 913▁produ 914▁char 915▁thank 916gg 917llow 918▁pres 919ween 920▁nice 921▁guy 922▁eas 923ner 924▁using 925ited 926its 927▁mom 928▁sch 929▁each 930▁level 931▁Not 932up 933arch 934▁Or 935au 936▁means 937▁between 938▁bus 939▁having 940▁met 941▁book 942cept 943▁hope 944▁bre 945▁ext 946▁defin 947▁else 948▁guess 949▁Chr 950ude 951▁old 952▁change 953▁wait 954ced 955▁few 956▁gener 957ese 958▁whatever 959▁hear 960▁conf 961▁toget 962▁together 963lect 964▁remember 965uck 966ump 967▁five 968▁mind 969▁case 970der 971▁form 972▁believe 973▁coll 974▁pol 975ertain 976▁comes 977amp 978▁wanted 979▁val 980ature 981▁stand 982iness 983▁seen 984▁enough 985ues 986▁sin 987▁Un 988ross 989▁times 990▁friend 991▁ 992e 993t 994o 995a 996n 997i 998s 999h 1000r 1001l 1002d 1003u 1004y 1005c 1006g 1007m 1008w 1009f 1010p 1011b 1012k 1013v 1014' 1015I 1016A 1017T 1018S 1019W 1020j 1021Y 1022B 1023x 1024O 1025H 1026C 1027M 1028N 1029L 10300 1031D 1032P 1033G 1034q 10351 1036z 1037R 1038F 1039E 10402 1041J 1042K 10435 1044U 10453 1046V 10474 10489 10496 10508 10517 1052Z 1053Q 1054X 1055<unk> 1056, 1057. 1058? 1059! 1060: 1061… 1062— 1063- 1064" 1065، 1066؛ 1067؟ 1068▁ا 1069▁ب 1070▁م 1071▁د 1072▁ک 1073ان 1074ای 1075▁و 1076ار 1077ین 1078▁ر 1079▁در 1080▁ت 1081▁ن 1082ست 1083▁ه 1084▁به 1085ام 1086▁که 1087ده 1088ری 1089▁می 1090▁این 1091▁خ 1092▁ش 1093▁س 1094ون 1095▁از 1096▁آ 1097ه 1098▁با 1099ند 1100▁ج 1101ال 1102▁پ 1103▁ح 1104یر 1105▁می 1106▁بر 1107▁رو 1108ود 1109اد 1110ور 1111▁هم 1112▁ی 1113ید 1114اه 1115▁گ 1116یم 1117ات 1118لی 1119رد 1120های 1121▁ف 1122شت 1123▁ع 1124فت 1125▁چ 1126▁ق 1127کن 1128▁است 1129ها 1130اب 1131سی 1132وری 1133▁را 1134▁ز 1135▁اس 1136را 1137▁من 1138▁ام 1139اره 1140انی 1141▁یک 1142لا 1143امی 1144▁برای 1145▁آم 1146▁ایر 1147رو 1148تی 1149می 1150▁کرد 1151ول 1152▁جم 1153از 1154شه 1155▁ص 1156▁ایران 1157وی 1158ریک 1159اری 1160▁دا 1161▁آمریک 1162نگ 1163ایی 1164▁بود 1165▁ما 1166▁هست 1167تر 1168هوری 1169نی 1170▁تو 1171▁ان 1172▁کن 1173▁اسل 1174▁جمهوری 1175گر 1176ه 1177▁شد 1178▁آمریکا 1179ما 1180مان 1181▁اسلامی 1182▁بی 1183▁دی 1184▁اون 1185له 1186▁میکن 1187▁خود 1188▁خو 1189▁مو 1190وم 1191عی 1192زار 1193▁کر 1194▁آن 1195▁گفت 1196گی 1197▁پی 1198که 1199▁نی 1200▁دار 1201▁کش 1202▁خب 1203اس 1204خت 1205▁دو 1206زی 1207▁اع 1208ادی 1209های 1210دی 1211▁ط 1212یا 1213اق 1214کر 1215شته 1216▁تا 1217▁نظ 1218رک 1219▁حال 1220▁او 1221ئی 1222دا 1223▁کرده 1224▁کشور 1225▁مح 1226تون 1227گه 1228اید 1229▁فر 1230▁کار 1231خو 1232▁یا 1233▁مس 1234اده 1235شن 1236انه 1237امه 1238شون 1239▁چه 1240جه 1241▁سال 1242فر 1243▁روز 1244قی 1245▁شما 1246بت 1247▁حم 1248ها 1249گاه 1250▁مرد 1251▁هر 1252▁دست 1253▁تر 1254هر 1255وان 1256▁ل 1257ورد 1258▁ای 1259▁اما 1260▁مق 1261رت 1262بی 1263▁شده 1264▁اق 1265▁قر 1266▁داد 1267▁داره 1268▁مت 1269▁نمی 1270اف 1271▁خواه 1272▁تح 1273شک 1274▁سر 1275وز 1276▁باز 1277▁گر 1278دار 1279▁مردم 1280▁خی 1281▁پر 1282▁ال 1283▁مع 1284رف 1285الی 1286▁ات 1287▁اینکه 1288▁یه 1289های 1290شده 1291فته 1292▁باید 1293شی 1294به 1295ستان 1296▁غ 1297▁چی 1298▁پیش 1299▁بع 1300▁عم 1301▁اد 1302▁میشه 1303بر 1304▁قرار 1305جا 1306▁جنگ 1307▁واق 1308▁نمی 1309بین 1310▁همین 1311▁آق 1312▁نیست 1313▁دول 1314▁گزار 1315دید 1316مت 1317اتی 1318▁نه 1319اند 1320اک 1321▁اج 1322▁حک 1323اط 1324ایت 1325▁بین 1326▁انت 1327▁خیلی 1328▁میگ 1329▁اف 1330رائی 1331▁اسرائی 1332▁خبر 1333▁بد 1334▁بسی 1335▁جه 1336▁بخ 1337▁بکن 1338مین 1339▁آقای 1340▁خار 1341▁گذ 1342▁مورد 1343▁زند 1344▁دولت 1345▁گزارش 1346ره 1347عه 1348▁رس 1349▁بیشت 1350▁اسرائیل 1351رای 1352نان 1353▁اص 1354▁مج 1355تر 1356▁سیا 1357هایی 1358امپ 1359▁صد 1360▁مث 1361نت 1362گیری 1363▁کم 1364▁مر 1365▁یع 1366▁نظر 1367مای 1368▁یعنی 1369جام 1370▁بگ 1371▁نیر 1372وده 1373اخت 1374▁اگر 1375لام 1376▁واقع 1377قه 1378▁ترامپ 1379اع 1380دام 1381▁اح 1382▁نو 1383▁دیگه 1384▁همچ 1385▁داشت 1386▁میک 1387▁تأ 1388▁باشه 1389▁مه 1390▁همه 1391▁میکنه 1392▁تص 1393▁پای 1394نده 1395نامه 1396▁شهر 1397است 1398▁هی 1399▁خواهد 1400▁ولی 1401جود 1402▁حکوم 1403▁علی 1404▁امنی 1405ارد 1406شد 1407وق 1408باره 1409▁ادامه 1410تص 1411▁حالا 1412وند 1413▁داده 1414▁وق 1415▁پس 1416▁بعد 1417▁حق 1418▁انجام 1419اش 1420▁میخو 1421لات 1422شده 1423▁یکی 1424سه 1425▁دیگر 1426▁گفته 1427▁بیشتر 1428وت 1429عیت 1430▁کردن 1431▁تم 1432▁بشه 1433▁میتون 1434▁بز 1435نین 1436▁نظامی 1437▁آز 1438▁اقتص 1439▁وجود 1440ریم 1441یل 1442▁ار 1443▁نق 1444▁اخ 1445▁داشته 1446▁گرو 1447گان 1448ههای 1449وب 1450▁تن 1451▁ایال 1452▁ساز 1453▁روی 1454▁بوده 1455▁منط 1456در 1457▁نش 1458▁هستند 1459▁حکومت 1460روز 1461▁هو 1462▁چند 1463من 1464▁بسیار 1465▁خودش 1466▁عرا 1467تش 1468وع 1469▁شب 1470▁ماه 1471نج 1472ال 1473▁اعت 1474خص 1475طر 1476▁حمله 1477دم 1478یه 1479▁صح 1480▁حتی 1481▁اعلام 1482ذا 1483▁نیرو 1484داشت 1485▁صدای 1486▁جن 1487▁مسئ 1488▁ده 1489▁مش 1490▁هیچ 1491▁شک 1492▁۱ 1493▁خان 1494▁آنها 1495▁ارت 1496▁دید 1497ونه 1498▁تع 1499▁اول 1500▁برنامه 1501▁امروز 1502▁سازمان 1503ایش 1504▁فق 1505▁عراق 1506▁گرفت 1507▁بح 1508▁فع 1509▁سپ 1510رکت 1511▁مقام 1512حده 1513▁بخش 1514▁راه 1515▁گذشته 1516اص 1517▁علیه 1518▁اط 1519یت 1520▁برخ 1521▁افز 1522▁عن 1523افق 1524▁۲ 1525▁ض 1526▁هد 1527▁ببین 1528دود 1529سته 1530روپ 1531ورت 1532▁مید 1533▁شدن 1534▁بن 1535بار 1536▁سیاسی 1537▁بش 1538▁وض 1539انش 1540▁موض 1541▁باش 1542▁دور 1543▁منطقه 1544چه 1545ات 1546ازی 1547▁کنه 1548فاده 1549▁فکر 1550▁مد 1551▁سه 1552▁قب 1553▁عنوان 1554▁نب 1555▁بزر 1556▁درباره 1557مل 1558▁دل 1559▁زی 1560▁اینجا 1561مال 1562▁میکنند 1563لیل 1564اتمت 1565اتمتحده 1566▁استفاده 1567▁ایالاتمتحده 1568ذاکر 1569طور 1570ونی 1571▁مذاکر 1572ستی 1573▁بل 1574▁خارج 1575ادر 1576▁کردند 1577▁چون 1578▁نیروهای 1579زین 1580ازه 1581▁جل 1582▁میکنم 1583لف 1584راه 1585▁صحبت 1586▁هدف 1587ابل 1588امل 1589رسی 1590توان 1591کار 1592▁اروپ 1593زید 1594▁دارد 1595▁میگو 1596فا 1597▁فقط 1598وش 1599▁میش 1600▁مل 1601▁حقوق 1602کی 1603▁« 1604▁چیزی 1605▁میان 1606▁به 1607وه 1608▁قد 1609▁اقتصادی 1610▁کشورهای 1611▁عر 1612زیر 1613شاره 1614بال 1615▁اینها 1616▁پاس 1617▁ره 1618▁روسی 1619▁نفت 1620▁همراه 1621ئیس 1622زیدنت 1623▁افزایش 1624ریت 1625▁هن 1626▁برگ 1627▁پرزیدنت 1628زه 1629شار 1630▁بده 1631اهد 1632اض 1633▁اعترا 1634جم 1635▁توافق 1636▁زندگی 1637▁داخ 1638▁جهان 1639اند 1640▁نفر 1641▁وقتی 1642فاق 1643▁صورت 1644▁چهار 1645کت 1646▁سی 1647▁شرکت 1648▁اتفاق 1649▁مخ 1650▁روسیه 1651▁بار 1652قیق 1653▁شرای 1654▁همچنین 1655▁نمای 1656▁شرایط 1657▁جدید 1658▁تب 1659▁جام 1660▁داریم 1661▁رئیس 1662▁رفت 1663▁وارد 1664▁مهم 1665▁نا 1666▁وا 1667سط 1668▁زیر 1669▁کنند 1670شنبه 1671یدا 1672غی 1673▁الان 1674▁خارجه 1675۰۰ 1676▁حس 1677قل 1678صد 1679▁موضوع 1680بان 1681تما 1682مانی 1683▁اطلا 1684▁وضعیت 1685خاب 1686▁انتخاب 1687▁تلا 1688▁اعتراض 1689یره 1690▁زمین 1691داد 1692▁اقدام 1693▁میده 1694شم 1695▁مست 1696کان 1697▁کل 1698▁وزیر 1699▁توی 1700ژی 1701دن 1702ابط 1703▁ته 1704▁میکند 1705▁پیدا 1706ترین 1707▁نیز 1708▁ساخت 1709▁میلی 1710میت 1711فی 1712▁مص 1713هران 1714▁پنج 1715زارت 1716▁تمام 1717▁آیا 1718▁نز 1719▁وزارت 1720گری 1721▁طرف 1722▁اطلاع 1723▁کشت 1724▁امنیت 1725▁بزرگ 1726▁مثلا 1727▁خواست 1728▁عملی 1729▁تغی 1730▁تهران 1731لاح 1732ران 1733▁گروه 1734▁مرا 1735▁حمایت 1736▁دانش 1737▁ایرانی 1738▁اشاره 1739▁نام 1740▁مشک 1741وریه 1742مون 1743▁جهانی 1744▁بکنه 1745▁کمک 1746▁امنیتی 1747نه 1748▁میده 1749▁حملات 1750▁حض 1751ستر 1752▁ندار 1753▁دارند 1754▁کند 1755▁سو 1756▁سخ 1757▁دلیل 1758▁شم 1759▁میتونه 1760▁تحریم 1761▁آمریکایی 1762▁تلاش 1763رس 1764▁گرفته 1765▁میشود 1766المل 1767▁بینالمل 1768▁قط 1769گو 1770مو 1771▁تغییر 1772ودی 1773▁شن 1774▁نس 1775ینی 1776▁قدرت 1777▁ترک 1778لمان 1779▁مثل 1780▁تق 1781▁غیر 1782▁جز 1783▁مسئله 1784▁کنیم 1785▁آین 1786▁بدون 1787▁زمان 1788ضی 1789▁ملی 1790▁پایان 1791▁تج 1792میم 1793▁احت 1794مد 1795▁مخت 1796اپ 1797تن 1798لح 1799▁توجه 1800▁اینه 1801▁قان 1802▁آینده 1803وط 1804▁نزدی 1805▁سیاست 1806▁اروپا 1807▁سوریه 1808▁اه 1809▁شدند 1810▁اب 1811▁همون 1812▁میکرد 1813نگار 1814کاری 1815▁افر 1816▁میبین 1817▁جمله 1818▁هنوز 1819▁گستر 1820▁حضور 1821▁اعدام 1822ارت 1823ندگان 1824▁جامعه 1825گ 1826▁نگر 1827▁برخی 1828▁ساع 1829▁هفته 1830ژه 1831▁آغ 1832▁آزادی 1833▁هستش 1834▁لب 1835▁خط 1836ضای 1837▁ایج 1838کید 1839▁واقعا 1840▁پیام 1841▁بیش 1842▁میگه 1843▁بینالمللی 1844▁خانو 1845این 1846ترین 1847▁سوی 1848▁اجتما 1849▁مط 1850▁میگوید 1851▁ایجاد 1852▁بیم 1853▁پول 1854▁جای 1855رین 1856▁سپاه 1857▁کسی 1858مکن 1859▁بودند 1860▁ند 1861▁آغاز 1862▁کنید 1863▁میکنیم 1864▁موشک 1865▁کس 1866▁فشار 1867▁چرا 1868▁شبکه 1869▁اخیر 1870▁تصمیم 1871▁رسید 1872▁چین 1873س 1874ونده 1875▁تأکید 1876وس 1877▁همچنان 1878▁دن 1879انیا 1880سم 1881یدی 1882▁وی 1883▁سف 1884ای 1885مند 1886▁هستیم 1887▁اونها 1888وار 1889▁دف 1890▁مختلف 1891▁اجتماعی 1892▁اصلا 1893▁ممکن 1894زمان 1895خواه 1896زب 1897▁میتوان 1898▁نگاه 1899▁میگ 1900▁آخ 1901لس 1902اطر 1903▁بسیاری 1904انس 1905▁عملیات 1906▁رهبر 1907ژیم 1908▁مرک 1909▁رژیم 1910فه 1911لم 1912باط 1913کس 1914ب 1915▁منتش 1916▁بریت 1917شان 1918ریق 1919▁منتشر 1920طور 1921لاف 1922▁خانواده 1923اح 1924▁واکن 1925▁داخل 1926ابر 1927▁ور 1928▁شور 1929▁نداره 1930▁افت 1931▁قیم 1932اور 1933▁دنبال 1934▁تاری 1935ویی 1936ذار 1937▁دری 1938▁بالا 1939▁ث 1940▁ارتباط 1941▁بتون 1942▁بازی 1943▁تروری 1944▁انتق 1945ریان 1946▁اخت 1947▁آب 1948▁آر 1949▁کاه 1950▁پاسخ 1951▁حزب 1952▁میدهد 1953▁نشان 1954ابی 1955▁کنار 1956▁توسط 1957ظه 1958وص 1959تهای 1960▁حرف 1961▁حالی 1962▁بحث 1963▁اوم 1964▁شاید 1965▁تول 1966▁نزدیک 1967▁کاهش 1968▁قطع 1969▁تنگ 1970▁ملل 1971▁محدود 1972▁یاد 1973یشه 1974بری 1975▁دیگری 1976حد 1977▁ارتش 1978▁هفت 1979▁مالی 1980نا 1981▁واکنش 1982آ 1983▁منت 1984▁رسانه 1985▁بازداشت 1986▁دلار 1987▁درصد 1988▁انس 1989▁ 1990ا 1991ی 1992ر 1993ه 1994ن 1995د 1996م 1997و 1998ت 1999ب 2000ک 2001س 2002ش 2003ل 2004ز 2005 2006گ 2007ف 2008خ 2009ق 2010ع 2011ج 2012ح 2013پ 2014آ 2015ط 2016ص 2017چ 2018ض 2019ظ 2020ئ 2021ذ 2022غ 2023ث 2024ژ 2025۰ 2026أ 2027۱ 2028۲ 2029» 2030« 2031۵ 2032۴ 2033۳ 2034ؤ 2035۹ 2036۶ 2037۸ 2038۷ 2039ء 2040ُ 2041٫ 2042( 2043) 2044َ 2045' 2046٪ 2047@ 20480 2049ِ 2050إ 20515 20522 2053# 2054/ 20556 2056[ 2057] 20581 2059– 20607 20613 2062+ 2063$ 20648 20659 2066_ 2067& 20684 2069; 2070= 2071ร 2072` 2073{ 2074} 2075ü 2076ж 2077ব 2078হ 2079.gitattributes+1
LICENSEAdded+674
README.mdAdded+67
export_coreml_stream.pyAdded+29
export_onnx_streaming.pyAdded+52
icefall_export/export-onnx-streaming.pyAdded+1192
reference/chunks.f32Added+3
reference/expected.jsonAdded+65
run_coreml_stream.pyAdded+18
shenava_rizeh_v1_5_decoder_ios15_fp16.mlmodelAdded+3
shenava_rizeh_v1_5_encoder_streaming_c16_l128_ios15_fp16.mlmodelAdded+3
shenava_rizeh_v1_5_encoder_streaming_c16_l128_ios15_fp16_manifest.jsonAdded+588
shenava_rizeh_v1_5_joiner_ios15_fp16.mlmodelAdded+3
tokens.txtAdded+2080